:root {
    --auth-navy: #040e26;
    --auth-accent: #fc5e28;
    --auth-accent-2: #67a8ff;
    --auth-text: #eff5ff;
    --auth-muted: rgba(239, 245, 255, 0.74);
    --auth-line: rgba(255, 255, 255, 0.12);
    --auth-shadow: 0 26px 70px rgba(1, 7, 18, 0.45);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body.auth-page {
    margin: 0;
    min-height: 100vh;
    font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--auth-text);
    background:
        radial-gradient(circle at top left, rgba(103, 168, 255, 0.14), transparent 26%),
        radial-gradient(circle at top right, rgba(252, 94, 40, 0.10), transparent 20%),
        linear-gradient(180deg, #07111d 0%, #0b1729 40%, #08111e 100%);
    overflow-x: hidden;
}

body.auth-page[data-theme="light"] {
    color: #17314d;
    background:
        radial-gradient(circle at top left, rgba(59, 130, 246, 0.08), transparent 26%),
        radial-gradient(circle at top right, rgba(249, 115, 22, 0.06), transparent 18%),
        linear-gradient(180deg, #f6f9ff 0%, #eef4fb 100%);
}

.auth-topbar {
    position: sticky;
    top: 0;
    z-index: 60;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid rgba(148, 163, 184, 0.14);
    backdrop-filter: blur(18px);
}

.auth-topbar-inner {
    width: min(1180px, calc(100% - 28px));
    margin: 0 auto;
    padding: 14px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.auth-topbar-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: #0f233c;
    text-decoration: none;
}

.auth-topbar-brand img {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.auth-topbar-brand strong {
    display: block;
    font-size: 1rem;
    letter-spacing: 0.08em;
    line-height: 1.1;
}

.auth-topbar-brand span {
    display: block;
    color: #5a6c82;
    font-size: 0.86rem;
    line-height: 1.1;
}

.auth-topbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.auth-topbar-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(255, 255, 255, 0.9);
    color: #17314d;
    text-decoration: none;
    font-weight: 700;
}

.auth-topbar-pill.primary {
    background: linear-gradient(135deg, #fc5e28 0%, #ff7a2f 100%);
    color: #fff;
    border-color: rgba(252, 94, 40, 0.35);
}

.auth-topbar-pill:hover {
    text-decoration: none;
    transform: translateY(-1px);
}

.auth-shell {
    position: relative;
    min-height: calc(100vh - 74px);
    display: flex;
    align-items: stretch;
    padding: 18px 0 28px;
    isolation: isolate;
}

.auth-bg-video {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -3;
    pointer-events: none;
    transform: scale(1.08);
    animation: authPan 24s ease-in-out infinite alternate;
    filter: saturate(1.05) contrast(1.02) brightness(0.52);
}

@keyframes authPan {
    from { transform: scale(1.08) translateX(-1.5%); }
    to { transform: scale(1.08) translateX(1.5%); }
}

.auth-shell::before {
    content: "";
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, rgba(5, 12, 23, 0.84) 0%, rgba(9, 18, 32, 0.62) 45%, rgba(5, 12, 23, 0.84) 100%);
    z-index: -1;
}

.auth-shell::after {
    background: radial-gradient(circle, rgba(76, 141, 246, 0.18), rgba(76, 141, 246, 0));
}

body.auth-page.auth-register-page .auth-shell::before {
    background: linear-gradient(135deg, rgba(5, 12, 23, 0.82) 0%, rgba(9, 18, 32, 0.58) 45%, rgba(5, 12, 23, 0.82) 100%);
}

body.auth-page.auth-reset-page .auth-shell::before {
    background: linear-gradient(135deg, rgba(5, 12, 23, 0.82) 0%, rgba(9, 18, 32, 0.58) 45%, rgba(5, 12, 23, 0.82) 100%);
}

.auth-shell::after {
    content: "";
    position: fixed;
    inset: auto -120px -150px auto;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(76, 141, 246, 0.22), rgba(76, 141, 246, 0));
    z-index: -1;
}

.auth-container {
    width: min(1180px, calc(100% - 28px));
    margin: auto;
}

.auth-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
    gap: 24px;
    align-items: center;
}

.auth-brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: var(--auth-text);
    margin-bottom: 22px;
}

.auth-brand-logo {
    width: 58px;
    height: 58px;
    object-fit: contain;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(217, 232, 255, 0.88));
    padding: 8px;
    box-shadow: 0 12px 28px rgba(46, 109, 222, 0.18);
}

.auth-brand-text strong {
    display: block;
    font-size: 1.05rem;
    letter-spacing: 0.08em;
}

.auth-brand-text span {
    display: block;
    margin-top: 3px;
    color: var(--auth-muted);
    font-size: 0.92rem;
}

.auth-hero {
    padding: 18px 4px;
}

.auth-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 9px 16px;
    border-radius: 999px;
    border: 1px solid var(--auth-line);
    background: rgba(255, 255, 255, 0.05);
    color: var(--auth-muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.8rem;
}

.auth-hero h1 {
    margin: 18px 0 12px;
    font-size: clamp(2.2rem, 4.6vw, 4.6rem);
    line-height: 0.98;
    letter-spacing: -0.04em;
    text-wrap: balance;
}

.auth-hero h1 .accent {
    background: linear-gradient(90deg, #ffffff 0%, #9ec6ff 42%, #67a8ff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.auth-hero p {
    margin: 0;
    max-width: 60ch;
    color: var(--auth-muted);
    line-height: 1.8;
    font-size: 1.02rem;
}

.auth-benefits {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 24px;
}

.auth-benefit {
    padding: 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-benefit strong {
    display: block;
    margin-bottom: 6px;
    font-size: 1rem;
}

.auth-benefit span {
    display: block;
    color: var(--auth-muted);
    line-height: 1.6;
    font-size: 0.92rem;
}

.auth-card {
    background: rgba(4, 14, 38, 0.90);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 28px;
    box-shadow: var(--auth-shadow);
    overflow: hidden;
    backdrop-filter: blur(14px);
}

.auth-card-body {
    padding: 30px;
}

.auth-title {
    margin: 0 0 8px;
    font-size: clamp(1.5rem, 2.8vw, 2rem);
    font-weight: 800;
    letter-spacing: -0.03em;
}

.auth-subtitle {
    margin: 0 0 18px;
    color: var(--auth-muted);
    line-height: 1.7;
}

.auth-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0 18px;
}

.auth-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.10);
    color: #dce8ff;
    font-size: 0.85rem;
    font-weight: 700;
}

.auth-chip i {
    color: var(--auth-accent-2);
}

.auth-social-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: 10px 0 10px;
}

.auth-social-btn {
    appearance: none;
    font: inherit;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 10px 14px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: #eff5ff;
    text-decoration: none;
    font-weight: 700;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.auth-social-btn:hover {
    transform: translateY(-1px);
    color: #fff;
    text-decoration: none;
}

.auth-social-btn.google:hover {
    background: rgba(234, 67, 53, 0.18);
    border-color: rgba(234, 67, 53, 0.34);
}

.auth-social-btn.wa:hover {
    background: rgba(37, 211, 102, 0.16);
    border-color: rgba(37, 211, 102, 0.34);
}

.auth-social-btn.phone:hover {
    background: rgba(103, 168, 255, 0.16);
    border-color: rgba(103, 168, 255, 0.34);
}

.auth-note {
    margin: 0 0 14px;
    font-size: 0.88rem;
    line-height: 1.65;
    color: var(--auth-muted);
}

.auth-form .input-group {
    margin-bottom: 14px;
}

.auth-form .form-control,
.auth-form select.form-control {
    min-height: 52px;
    border-radius: 14px 0 0 14px;
    border-color: #d7e2f0;
}

.auth-form .input-group-text {
    min-width: 48px;
    justify-content: center;
    background: #eef5ff;
    border-color: #d7e2f0;
    color: #33547e;
    border-radius: 0 14px 14px 0;
}

.auth-form .input-group-append .input-group-text {
    cursor: pointer;
}

.auth-form .form-control:focus {
    box-shadow: 0 0 0 0.2rem rgba(76, 141, 246, 0.15);
    border-color: rgba(76, 141, 246, 0.7);
}

.auth-form .btn-primary {
    min-height: 52px;
    border: 0;
    border-radius: 14px;
    background: linear-gradient(135deg, #67a8ff, #2e6dde);
    box-shadow: 0 16px 32px rgba(46, 109, 222, 0.3);
    font-weight: 700;
}

.auth-form .btn-primary:hover {
    background: linear-gradient(135deg, #74b0ff, #295ecf);
}

.auth-form .btn-outline-light {
    border-color: rgba(255, 255, 255, 0.18);
}

.auth-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: space-between;
    margin-top: 18px;
    color: var(--auth-muted);
}

.auth-links a {
    color: #dce8ff;
    text-decoration: none;
}

.auth-links a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.auth-alert {
    border-radius: 16px;
    border: 0;
}

.auth-loading {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.auth-spinner {
    width: 60px;
    height: 60px;
    border: 6px solid rgba(255, 255, 255, 0.35);
    border-top: 6px solid #fff;
    border-radius: 50%;
    animation: auth-spin 1s linear infinite;
}

@keyframes auth-spin {
    100% {
        transform: rotate(360deg);
    }
}

.theme-fab {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 9998;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, #0f2742 0%, #214b7b 100%);
    color: #fff;
    box-shadow: 0 18px 36px rgba(15, 39, 66, 0.24);
    cursor: pointer;
    font-weight: 700;
}

.theme-fab:hover {
    transform: translateY(-1px);
}

.theme-fab i {
    font-size: 0.92rem;
}

body.auth-page[data-theme="light"] .auth-topbar {
    background: rgba(255, 255, 255, 0.94);
}

body.auth-page[data-theme="light"].auth-login-page .auth-shell::before {
    background: linear-gradient(135deg, rgba(246, 249, 255, 0.76) 0%, rgba(234, 243, 255, 0.44) 45%, rgba(246, 249, 255, 0.76) 100%);
}

body.auth-page[data-theme="light"].auth-register-page .auth-shell::before {
    background: linear-gradient(135deg, rgba(246, 249, 255, 0.76) 0%, rgba(234, 243, 255, 0.44) 45%, rgba(246, 249, 255, 0.76) 100%);
}

body.auth-page[data-theme="light"].auth-reset-page .auth-shell::before {
    background: linear-gradient(135deg, rgba(246, 249, 255, 0.76) 0%, rgba(234, 243, 255, 0.44) 45%, rgba(246, 249, 255, 0.76) 100%);
}

body.auth-page[data-theme="light"] .auth-topbar-brand {
    color: #0f233c;
}

body.auth-page[data-theme="light"] .auth-topbar-pill {
    background: rgba(255, 255, 255, 0.88);
    color: #17314d;
    border-color: rgba(148, 163, 184, 0.18);
}

body.auth-page[data-theme="light"] .auth-shell::after {
    background: radial-gradient(circle, rgba(59, 130, 246, 0.16), rgba(59, 130, 246, 0));
}

body.auth-page[data-theme="light"] .auth-card {
    background: rgba(255, 255, 255, 0.94);
    border-color: rgba(148, 163, 184, 0.14);
}

body.auth-page[data-theme="light"] .auth-hero h1,
body.auth-page[data-theme="light"] .auth-title {
    color: #0f233c;
}

body.auth-page[data-theme="light"] .auth-hero p,
body.auth-page[data-theme="light"] .auth-subtitle,
body.auth-page[data-theme="light"] .auth-benefit span,
body.auth-page[data-theme="light"] .auth-links {
    color: #31465f;
}

body.auth-page[data-theme="light"] .auth-benefit,
body.auth-page[data-theme="light"] .auth-chip {
    background: rgba(255, 255, 255, 0.92);
    border-color: rgba(148, 163, 184, 0.16);
    color: #24405f;
}

body.auth-page[data-theme="light"] .auth-social-btn {
    background: rgba(15, 23, 42, 0.10);
    color: #0f233c;
    border-color: rgba(15, 23, 42, 0.12);
}

body.auth-page[data-theme="light"] .auth-social-btn:hover {
    color: #0f233c;
}

body.auth-page[data-theme="light"] .auth-chip i {
    color: #2563eb;
}

body.auth-page[data-theme="light"] .auth-form .input-group-text {
    background: #eaf2ff;
    color: #17314d;
}

body.auth-page[data-theme="light"] .auth-form .form-control,
body.auth-page[data-theme="light"] .auth-form select.form-control {
    background: #fff;
    color: #0f233c;
    border-color: #cbd7e6;
}

body.auth-page[data-theme="light"] .auth-links a {
    color: #0f4aa8;
}

body.auth-page[data-theme="light"] .auth-note {
    color: #5a6c82;
}

body.auth-page[data-theme="dark"] .auth-topbar {
    background: rgba(4, 14, 38, 0.92);
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

body.auth-page[data-theme="dark"] .auth-topbar-brand,
body.auth-page[data-theme="dark"] .auth-brand,
body.auth-page[data-theme="dark"] .auth-title {
    color: #f8fbff;
}

body.auth-page[data-theme="dark"] .auth-topbar-pill {
    background: rgba(255, 255, 255, 0.08);
    color: #eff5ff;
}

body.auth-page[data-theme="dark"] .auth-form .form-control,
body.auth-page[data-theme="dark"] .auth-form select.form-control {
    background: rgba(255, 255, 255, 0.96);
    color: #0f233c;
    border-color: rgba(215, 226, 240, 0.92);
}

body.auth-page[data-theme="dark"] .auth-form .input-group-text {
    background: #eaf2ff;
    color: #17314d;
}

body.auth-page[data-theme="dark"] .auth-form .btn-primary {
    box-shadow: 0 16px 32px rgba(46, 109, 222, 0.34);
}

body.auth-page[data-theme="dark"] .auth-brand-text span,
body.auth-page[data-theme="dark"] .auth-subtitle,
body.auth-page[data-theme="dark"] .auth-hero p,
body.auth-page[data-theme="dark"] .auth-benefit span,
body.auth-page[data-theme="dark"] .auth-links,
body.auth-page[data-theme="dark"] .auth-note {
    color: rgba(226, 232, 240, 0.76);
}

body.auth-page[data-theme="dark"] .auth-social-btn {
    color: #eff5ff;
}

body.auth-page[data-theme="light"] .theme-fab {
    background: linear-gradient(135deg, #ffffff 0%, #e8f0ff 100%);
    color: #17324f;
    border: 1px solid rgba(148, 163, 184, 0.22);
}

@media (max-width: 980px) {
    .auth-topbar-inner,
    .auth-grid {
        display: flex;
        flex-direction: column;
        align-items: stretch;
    }

    .auth-topbar-actions {
        justify-content: flex-start;
    }

    .auth-social-grid {
        grid-template-columns: 1fr;
    }

    .auth-hero {
        padding: 8px 2px 0;
    }

    .auth-bg-video {
        filter: saturate(1.02) contrast(1.02) brightness(0.45);
    }
}

@media (max-width: 768px) {
    .auth-container {
        width: min(100% - 22px, 1180px);
        padding: 14px 0;
    }

    .auth-card {
        border-radius: 24px;
    }

    .auth-card-body {
        padding: 20px;
    }

    .auth-brand-logo {
        width: 52px;
        height: 52px;
    }

    .auth-hero h1 {
        font-size: clamp(2rem, 8vw, 3rem);
    }

    .auth-benefits {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .auth-shell::after {
        width: 280px;
        height: 280px;
        right: -130px;
        bottom: -120px;
    }

    .auth-card-body {
        padding: 18px;
    }

    .auth-brand {
        align-items: flex-start;
    }

    .auth-links {
        flex-direction: column;
        gap: 8px;
    }

    .auth-form .form-control,
    .auth-form select.form-control {
        min-height: 50px;
    }
}
