/* ================================================================
   GatEvo — Global Stylesheet  (Horizon UI Design System)
   ================================================================ */

/* ── 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 — purple brand area */
.auth-right {
    width: 42%;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #4318FF 0%, #9F7AEA 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: 40px;
}

/* Logo circle on right panel */
.auth-logo-ring {
    width: 168px;
    height: 168px;
    border-radius: 50%;
    background: rgba(255,255,255,0.18);
    border: 1.5px solid rgba(255,255,255,0.28);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 32px;
    backdrop-filter: blur(6px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
}

.auth-logo-ring img {
    height: 76px;
    width: auto;
    filter: brightness(0) invert(1);
}

.auth-brand h2 {
    color: #FFFFFF;
    font-size: 2.25rem;
    font-weight: 800;
    margin-bottom: 10px;
    letter-spacing: -0.025em;
}

.auth-brand > p {
    color: rgba(255,255,255,0.65);
    font-size: 0.9rem;
    font-weight: 400;
    line-height: 1.5;
    margin: 0 auto;
    white-space: nowrap;
}

.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: #4318FF;
    box-shadow: 0 0 0 3px rgba(67,24,255,0.1);
}
.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, #4318FF 0%, #7551FF 100%);
    color: #FFFFFF;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 700;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.15s;
    letter-spacing: 0.01em;
}
.auth-btn:hover  { opacity: 0.92; transform: translateY(-1px); }
.auth-btn:active { transform: translateY(0); opacity: 1; }

/* ── 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; }

/* ── 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; }
