:root {
    color-scheme: light;
    --bg: #eef1f8;
    --bg-accent: #e3e8f6;
    --surface: #ffffff;
    --surface-soft: #f7f8fc;
    --text: #141a2e;
    --text-soft: #2a3148;
    --muted: #6b7390;
    --primary: #4a54d6;
    --primary-strong: #3a43b8;
    --primary-soft: #eceeff;
    --accent: #c6a75e;
    --accent-soft: rgba(198, 167, 94, 0.16);
    --success: #1f9d68;
    --success-soft: #e8f8f1;
    --border: #dde3f2;
    --border-strong: #c8d0e6;
    --shadow-soft: 0 10px 30px rgba(20, 26, 46, 0.06);
    --shadow-card: 0 18px 44px rgba(20, 26, 46, 0.08);
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 18px;
    --radius-xl: 22px;
    --transition: 0.22s ease;
}

* { box-sizing: border-box; }

body,
.guest-body {
    margin: 0;
    font-family: "Heebo", "Segoe UI", Arial, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 100% 0%, rgba(74, 84, 214, 0.1) 0, transparent 28%),
        radial-gradient(circle at 0% 100%, rgba(198, 167, 94, 0.08) 0, transparent 24%),
        var(--bg);
    line-height: 1.5;
    min-height: 100vh;
}

a { color: inherit; text-decoration: none; }

.page-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Topbar */
.guest-topbar {
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(14px);
    box-shadow: var(--shadow-soft);
}

.guest-topbar-inner {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    min-height: 72px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.guest-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.guest-brand-mark {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary-soft) 0%, #fff 100%);
    border: 1px solid var(--border);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.guest-brand-mark img {
    width: 30px;
    height: auto;
    object-fit: contain;
}

.guest-brand-copy {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.guest-brand-copy strong {
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: 0.2px;
}

.guest-brand-copy small {
    color: var(--muted);
    font-size: 0.82rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.guest-topbar-badge {
    display: none !important; /* inline-flex */
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary-strong);
    font-size: 0.88rem;
    font-weight: 700;
    white-space: nowrap;
}

.guest-topbar-badge.is-soft {
    background: var(--surface-soft);
    color: var(--text-soft);
    border: 1px solid var(--border);
}

/* Footer */
.guest-footer {
    margin-top: auto;
    border-top: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
}

.guest-footer-inner {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 18px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.guest-footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--muted);
    font-size: 0.88rem;
}

.guest-footer-brand img {
    width: 28px;
    height: auto;
    object-fit: contain;
    opacity: 0.85;
}

.guest-footer small {
    color: var(--muted);
    font-size: 0.82rem;
}

/* Auth layout */
.auth-page {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 20px 40px;
}

.auth-layout {
    width: 100%;
    max-width: 980px;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, 420px);
    gap: 24px;
    align-items: stretch;
}

.auth-showcase {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-xl);
    border: 1px solid rgba(255, 255, 255, 0.65);
    background:
        linear-gradient(145deg, rgba(74, 84, 214, 0.96) 0%, rgba(58, 67, 184, 0.92) 52%, rgba(35, 44, 120, 0.94) 100%);
    color: #fff;
    padding: 34px 32px;
    box-shadow: var(--shadow-card);
    display: flex;
    align-items: center;
}

.auth-page-screen .auth-showcase {
    background:
        linear-gradient(145deg, rgba(45, 52, 120, 0.96) 0%, rgba(74, 84, 214, 0.9) 48%, rgba(198, 167, 94, 0.82) 100%);
}

.auth-showcase-glow {
    position: absolute;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    top: -80px;
    left: -60px;
    pointer-events: none;
}

.auth-showcase-glow.is-gold {
    background: rgba(198, 167, 94, 0.22);
    top: auto;
    bottom: -100px;
    left: auto;
    right: -40px;
}

.auth-showcase-content {
    position: relative;
    z-index: 1;
}

.auth-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.18);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

.auth-showcase h2 {
    margin: 18px 0 12px;
    font-size: clamp(1.55rem, 3vw, 2rem);
    line-height: 1.25;
    font-weight: 800;
}

.auth-showcase p {
    margin: 0 0 20px;
    color: rgba(255, 255, 255, 0.88);
    max-width: 34ch;
    font-size: 0.98rem;
}

.auth-showcase-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 10px;
}

.auth-showcase-list li {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.92rem;
    color: rgba(255, 255, 255, 0.92);
}

.auth-showcase-list .fa-check-circle {
    color: rgba(198, 167, 94, 0.95);
}

/* Auth card */
.auth-card {
    width: 100%;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 28px 26px 24px;
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-card-head {
    text-align: center;
    margin-bottom: 22px;
}

.auth-logo-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
}

.auth-logo {
    width: auto;
    max-width: 120px;
    max-height: 56px;
    object-fit: contain;
}

.auth-card h1 {
    margin: 0 0 8px;
    font-size: clamp(1.45rem, 3vw, 1.85rem);
    font-weight: 800;
    line-height: 1.2;
}

.auth-subtitle {
    margin: 0;
    color: var(--muted);
    font-size: 0.94rem;
    line-height: 1.55;
}

.auth-form {
    display: grid;
    gap: 14px;
}

.field {
    display: grid;
    gap: 8px;
}

.field > span {
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--text-soft);
}

.auth-input-wrap {
    position: relative;
}

.auth-input-wrap i {
    position: absolute;
    top: 50%;
    right: 14px;
    transform: translateY(-50%);
    color: var(--muted);
    pointer-events: none;
}

.auth-input-wrap input {
    width: 100%;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    padding-right: 42px;
    font-size: 0.95rem;
    font-family: inherit;
    outline: none;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.auth-input-wrap input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(74, 84, 214, 0.14);
}

.btn-primary {
    margin-top: 4px;
    border: 0;
    width: 100%;
    min-height: 48px;
    background: linear-gradient(135deg, var(--primary) 0%, #6672ff 100%);
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    font-family: inherit;
    padding: 12px 18px;
    border-radius: 999px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 10px 22px rgba(74, 84, 214, 0.24);
    transition: transform var(--transition), box-shadow var(--transition), filter var(--transition);
}

.btn-primary:hover {
    transform: translateY(-1px);
    filter: brightness(1.02);
}

.btn-primary:disabled {
    opacity: 0.72;
    cursor: wait;
    transform: none;
}

a.btn-primary {
    text-decoration: none;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 18px 0 14px;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 600;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border);
}

.auth-alt-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--surface-soft);
    transition: border-color var(--transition), background var(--transition), transform var(--transition);
}

.auth-alt-link:hover {
    border-color: var(--border-strong);
    background: #fff;
    transform: translateY(-1px);
}

.auth-alt-link.is-muted {
    background: #fff;
}

.auth-alt-link-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-soft);
    color: var(--primary);
    flex-shrink: 0;
}

.auth-alt-link.is-muted .auth-alt-link-icon {
    background: var(--surface-soft);
    color: var(--text-soft);
}

.auth-alt-link-copy {
    display: grid;
    gap: 3px;
    min-width: 0;
    flex: 1;
}

.auth-alt-link-copy strong {
    font-size: 0.94rem;
    font-weight: 700;
}

.auth-alt-link-copy small {
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.45;
}

.auth-alt-link-arrow {
    color: var(--muted);
    flex-shrink: 0;
}

.alert {
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: var(--radius-md);
    padding: 12px 14px;
    font-weight: 600;
    margin-bottom: 14px;
}

.alert.success {
    background: var(--success-soft);
    color: var(--success);
}

@media (max-width: 900px) {
    .auth-layout {
        grid-template-columns: 1fr;
        max-width: 460px;
    }

    .auth-showcase {
        padding: 24px 22px;
    }

    .auth-showcase h2 {
        font-size: 1.45rem;
    }

    .auth-showcase-list {
        gap: 8px;
    }
}

@media (max-width: 640px) {
    .guest-topbar-inner,
    .guest-footer-inner {
        padding-inline: 16px;
    }

    .guest-topbar-badge-text,
    .guest-brand-copy small {
        display: none;
    }

    .guest-topbar-badge {
        padding: 8px 10px;
    }

    .auth-page {
        padding: 20px 14px 28px;
    }

    .auth-card {
        padding: 22px 18px 18px;
        border-radius: var(--radius-lg);
    }

    .auth-showcase {
        border-radius: var(--radius-lg);
        padding: 20px 18px;
    }

    .auth-showcase p {
        font-size: 0.9rem;
    }

    .guest-footer-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .guest-footer-brand span {
        display: none;
    }
}

@media (max-width: 420px) {
    .auth-alt-link {
        padding: 12px;
        gap: 10px;
    }

    .auth-alt-link-copy small {
        font-size: 0.78rem;
    }
}
