/* ================================================================
   GatEvo — Global Stylesheet
   Design System: @efferd/dashboard-4  radix-nova  +  GatEvo Blue
   ================================================================ */

/* ── Radix Nova Token System (from globals.css) ─────────────────── */
:root {
    /* Base */
    --background:            #ffffff;
    --foreground:            #18181b;
    --card:                  #ffffff;
    --card-foreground:       #18181b;
    --popover:               #ffffff;
    --popover-foreground:    #18181b;

    /* Brand primary = GatEvo Blue (maps to oklch 0.488 0.243 264) */
    --primary:               #5e7fea;
    --primary-dark:          #4a6dd4;
    --primary-foreground:    #f5f7ff;

    /* Neutrals */
    --secondary:             #f4f4f5;
    --secondary-foreground:  #3f3f46;
    --muted:                 #f4f4f5;
    --muted-foreground:      #71717a;
    --accent:                #f4f4f5;
    --accent-foreground:     #3f3f46;

    /* States */
    --destructive:           #ef4444;
    --destructive-foreground:#fafafa;

    /* Borders / Inputs */
    --border:                #e4e4e7;
    --input:                 #e4e4e7;
    --ring:                  #a1a1aa;

    /* Radius */
    --radius:                0.625rem;   /* 10px — radix-nova spec */

    /* Sidebar */
    --sidebar:               #fafafa;
    --sidebar-foreground:    #18181b;
    --sidebar-primary:       #5e7fea;
    --sidebar-primary-fg:    #f5f7ff;
    --sidebar-accent:        #f4f4f5;
    --sidebar-accent-fg:     #3f3f46;
    --sidebar-border:        #e4e4e7;
    --sidebar-muted:         #71717a;

    /* GatEvo blue scale (kept for backwards compat) */
    --gb-blue:               #5e7fea;
    --gb-blue-dark:          #4a6dd4;
    --gb-blue-mid:           #3558d0;
    --gb-blue-glow:          rgba(94,127,234,0.38);
    --gb-blue-soft:          rgba(94,127,234,0.12);
    --gb-blue-xsoft:         rgba(94,127,234,0.07);
    --gb-blue-50:            #eff3fd;
    --gb-blue-100:           #dde6fb;
    --gb-blue-200:           #baccf8;
}

/* ── Reset ─────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Base ───────────────────────────────────────────────────────── */
body {
    font-family: 'DM Sans', 'Urbanist', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    color: #2D3748;
    background-color: #F4F7FE;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ── Auth page wrapper (login / register) ───────────────────────── */
body.auth-page {
    background-color: #FFFFFF;
}

/* ================================================================
   SPLIT-PANEL AUTH LAYOUT
   ================================================================ */

.auth-split {
    display: flex;
    min-height: 100vh;
}

/* Left panel — white form area */
.auth-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 48px 40px;
    background: #FFFFFF;
    min-width: 0;
}

.auth-left-inner {
    max-width: 360px;
    width: 100%;
    margin: 0 auto;
}

/* Right panel — deep navy → brand blue */
.auth-right {
    width: 44%;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: linear-gradient(140deg, #0c1635 0%, #172260 42%, #3558d0 72%, #5e7fea 100%);
    border-bottom-left-radius: 160px;
}

@media (max-width: 1023px) {
    .auth-right { display: none; }
    .auth-left  { padding: 40px 24px; }
}

/* decorative circles on right panel */
.auth-right::before,
.auth-right::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
}
.auth-right::before { width: 520px; height: 520px; top: -140px; right: -140px; }
.auth-right::after  { width: 640px; height: 640px; bottom: -200px; left: -200px; }

.auth-brand {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 28px 32px;
    max-height: 100vh;
    overflow-y: auto;
    scrollbar-width: none;
}
.auth-brand::-webkit-scrollbar { display: none; }

/* Logo circle on right panel */
.auth-logo-ring {
    width: 148px;
    height: 148px;
    border-radius: 50%;
    background: rgba(255,255,255,0.12);
    border: 1.5px solid rgba(94,127,234,0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    backdrop-filter: blur(8px);
    box-shadow: 0 8px 40px rgba(0,0,0,0.2), 0 0 0 6px rgba(94,127,234,0.12), 0 0 0 12px rgba(94,127,234,0.06);
}

.auth-logo-ring img {
    height: 68px;
    width: auto;
    filter: brightness(0) invert(1);
    drop-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.auth-brand h2 {
    color: #FFFFFF;
    font-size: 2rem;
    font-weight: 900;
    margin-bottom: 8px;
    letter-spacing: -0.03em;
}

.auth-brand > p {
    color: rgba(255,255,255,0.6);
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.5;
    margin: 0 auto;
}

.auth-info-box {
    margin-top: 44px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    max-width: 380px;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.22);
    border-radius: 20px;
    padding: 24px 40px;
    text-align: center;
}

.auth-info-box p:first-child {
    color: rgba(255,255,255,0.55);
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.auth-info-box p:last-child,
.auth-info-box a {
    color: #FFFFFF;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
}

.auth-info-box a:hover {
    text-decoration: underline;
}

/* ── Auth back link ──────────────────────────────────────────────── */
.auth-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #A3AED0;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    margin-bottom: 40px;
    transition: color 0.2s;
}
.auth-back:hover { color: #2B3674; }

/* ── Auth headings ───────────────────────────────────────────────── */
.auth-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: #2B3674;
    letter-spacing: -0.02em;
    margin-bottom: 6px;
}
.auth-subtitle {
    font-size: 0.875rem;
    color: #A3AED0;
    margin-bottom: 28px;
}

/* ── Auth form controls ──────────────────────────────────────────── */
.auth-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    color: #2B3674;
    margin-bottom: 6px;
    letter-spacing: 0.01em;
}

.auth-input {
    width: 100%;
    padding: 13px 16px;
    border: 1.5px solid #E0E5F2;
    border-radius: 14px;
    background: #FFFFFF;
    font-family: inherit;
    font-size: 0.875rem;
    color: #2D3748;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.auth-input::placeholder { color: #A3AED0; }
.auth-input:focus {
    border-color: #5e7fea;
    box-shadow: 0 0 0 3px rgba(94,127,234,0.13);
}
.auth-input.is-invalid { border-color: #FF5B5B; }

.auth-input-wrap {
    position: relative;
}
.auth-input-wrap .auth-input { padding-right: 44px; }
.auth-eye-btn {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #A3AED0;
    cursor: pointer;
    padding: 0;
    transition: color 0.2s;
}
.auth-eye-btn:hover { color: #2B3674; }

/* ── Primary button ──────────────────────────────────────────────── */
.auth-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #5e7fea 0%, #4a6dd4 50%, #3558d0 100%);
    color: #FFFFFF;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 700;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.01em;
    box-shadow: 0 4px 14px rgba(94,127,234,0.4);
}
.auth-btn:hover  { opacity: 0.92; transform: translateY(-1px); box-shadow: 0 8px 22px rgba(94,127,234,0.5); }
.auth-btn:active { transform: translateY(0); opacity: 1; box-shadow: 0 2px 8px rgba(94,127,234,0.3); }

/* ── Alert messages ──────────────────────────────────────────────── */
.alert {
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 18px;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1.5px solid;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.alert i { margin-top: 1px; flex-shrink: 0; }

.alert-danger  { background: #FFF5F5; color: #C53030; border-color: #FED7D7; }
.alert-success { background: #F0FFF4; color: #276749; border-color: #C6F6D5; }
.alert-info    { background: #EBF8FF; color: #2C5282; border-color: #BEE3F8; }

.alert-danger  ul { padding-left: 16px; margin: 0; }

/* ── Divider ─────────────────────────────────────────────────────── */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    color: #A3AED0;
    font-size: 0.8rem;
    font-weight: 500;
}
.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #E0E5F2;
}

/* ── App store download strip ────────────────────────────────────── */
.auth-store-row {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 20px;
}
.auth-store-row a { display: block; transition: opacity 0.2s, transform 0.2s; }
.auth-store-row a:hover { opacity: 0.88; transform: translateY(-2px); }
.auth-store-row img { height: 36px; width: auto; display: block; }

/* ── Auth feature cards (right panel) ───────────────────────────── */
.auth-features {
    display: flex;
    flex-direction: column;
    gap: 9px;
    width: 100%;
    max-width: 320px;
    margin: 22px auto 0;
}
.auth-feature-item {
    display: flex;
    align-items: center;
    gap: 13px;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.11);
    border-radius: 16px;
    padding: 12px 15px;
    backdrop-filter: blur(10px);
    transition: background 0.2s, border-color 0.2s, transform 0.2s;
    text-align: left;
    cursor: default;
}
.auth-feature-item:hover {
    background: rgba(94,127,234,0.15);
    border-color: rgba(94,127,234,0.32);
    transform: translateX(3px);
}
.auth-feature-icon {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: rgba(94,127,234,0.22);
    border: 1px solid rgba(94,127,234,0.32);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #a8beff;
    font-size: 14px;
}
.auth-feature-title {
    color: #ffffff;
    font-size: 0.8125rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 2px;
}
.auth-feature-desc {
    color: rgba(255,255,255,0.48);
    font-size: 0.7rem;
    font-weight: 400;
    line-height: 1.3;
}

/* ── Auth live status badge ─────────────────────────────────────── */
.auth-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 22px;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.13);
    border-radius: 40px;
    padding: 7px 16px 7px 12px;
    font-size: 0.76rem;
    font-weight: 600;
    color: rgba(255,255,255,0.75);
}
.auth-live-badge .auth-ping-wrap {
    position: relative;
    display: inline-flex;
    height: 8px;
    width: 8px;
    flex-shrink: 0;
}
.auth-live-badge .auth-ping {
    position: absolute;
    display: inline-flex;
    height: 100%;
    width: 100%;
    border-radius: 50%;
    animation: authPing 1.4s cubic-bezier(0,0,0.2,1) infinite;
    opacity: 0.7;
}
.auth-live-badge .auth-dot {
    position: relative;
    display: inline-flex;
    border-radius: 50%;
    height: 8px;
    width: 8px;
}
.auth-live-link {
    color: rgba(255,255,255,0.65);
    font-weight: 700;
    text-decoration: none;
    transition: color 0.2s;
    margin-left: 2px;
    padding-left: 10px;
    border-left: 1px solid rgba(255,255,255,0.18);
}
.auth-live-link:hover { color: #fff; }

/* ── Right panel entrance animations ───────────────────────────── */
@keyframes authPing {
    75%, 100% { transform: scale(1.7); opacity: 0; }
}
@keyframes authFadeUp {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}
.auth-brand {
    animation: authFadeUp 0.55s ease both;
}
.auth-features .auth-feature-item:nth-child(1) { animation: authFadeUp 0.55s 0.12s ease both; }
.auth-features .auth-feature-item:nth-child(2) { animation: authFadeUp 0.55s 0.22s ease both; }
.auth-features .auth-feature-item:nth-child(3) { animation: authFadeUp 0.55s 0.32s ease both; }
.auth-live-badge { animation: authFadeUp 0.55s 0.42s ease both; }
.auth-left-inner { animation: authFadeUp 0.45s 0.05s ease both; }

/* ── Form validation ─────────────────────────────────────────────── */
.invalid-feedback {
    display: block;
    width: 100%;
    margin-top: 5px;
    font-size: 0.8rem;
    color: #FF5B5B;
}

/* ── Spinner ─────────────────────────────────────────────────────── */
.loading {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2.5px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Utility ─────────────────────────────────────────────────────── */
.d-none  { display: none !important; }
.d-block { display: block !important; }
