:root {
    --royal-navy: #001F3F;
    --royal-navy-soft: #0A2A52;
    --royal-purple: #6A0DAD;
    --royal-purple-dark: #4F0A82;
    --royal-gold: #FFD700;
    --royal-gold-soft: #F3C623;
    --bone: #F4F4F4;
    --bone-strong: #E9E7E1;
    --white: #FFFFFF;
    --text-dark: #102033;
    --text-muted: #5B6472;
    --border-soft: rgba(0, 31, 63, .14);
    --shadow-deep: 0 24px 64px rgba(0, 10, 25, .32);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
    min-height: 100%;
}

body.auth-page {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--royal-navy);
    color: var(--text-dark);
}

.login-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background:
        radial-gradient(circle at top left, rgba(255, 215, 0, .12), transparent 34%),
        radial-gradient(circle at bottom right, rgba(106, 13, 173, .15), transparent 30%),
        linear-gradient(135deg, #001227 0%, #001F3F 48%, #0A2A52 100%);
}

.login-card {
    width: 100%;
    max-width: 980px;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(320px, .92fr);
    border-radius: 28px;
    overflow: hidden;
    background: rgba(255, 255, 255, .08);
    box-shadow: var(--shadow-deep);
    border: 1px solid rgba(255, 255, 255, .08);
    backdrop-filter: blur(8px);
}

.login-panel {
    padding: 2.6rem 2.5rem 2.2rem;
    background: var(--bone);
    color: var(--text-dark);
}

.login-brand {
    margin-bottom: 2rem;
}

.login-brand__name {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--royal-navy);
    letter-spacing: .01em;
}

.login-brand__sub {
    margin-top: .35rem;
    color: var(--text-muted);
    font-size: .92rem;
}

.login-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--royal-navy);
    margin-bottom: .4rem;
}

.login-copy {
    color: var(--text-muted);
    font-size: .95rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    max-width: 42ch;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.field {
    display: flex;
    flex-direction: column;
    gap: .42rem;
}

.field label {
    color: var(--royal-navy);
    font-size: .82rem;
    font-weight: 800;
    letter-spacing: .02em;
}

.field input {
    width: 100%;
    min-height: 48px;
    padding: .82rem .95rem;
    border-radius: 14px;
    border: 1px solid rgba(0, 31, 63, .18);
    background: #FFFFFF;
    color: var(--text-dark);
    font-size: .95rem;
    outline: none;
    transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.field input::placeholder {
    color: #7B8491;
}

.field input:focus {
    border-color: var(--royal-gold-soft);
    box-shadow: 0 0 0 4px rgba(255, 215, 0, .20);
    background: #FFFFFF;
}

.login-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .9rem;
    flex-wrap: wrap;
    margin-top: .35rem;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: .78rem 1.4rem;
    border: 1px solid var(--royal-gold-soft);
    border-radius: 999px;
    background: var(--royal-navy);
    color: var(--bone);
    font-weight: 800;
    font-size: .92rem;
    cursor: pointer;
    transition: transform .16s ease, box-shadow .16s ease, background .16s ease, border-color .16s ease;
    box-shadow: 0 14px 30px rgba(0, 31, 63, .24);
}

.btn-primary:hover {
    transform: translateY(-1px);
    background: var(--royal-navy-soft);
    border-color: var(--royal-gold);
}

.login-link {
    color: var(--royal-purple);
    text-decoration: none;
    font-size: .89rem;
    font-weight: 700;
}

.login-link:hover {
    color: var(--royal-purple-dark);
    text-decoration: underline;
}

.quote-panel {
    padding: 2.5rem 2.2rem;
    border-left: 1px solid rgba(255, 255, 255, .08);
    background:
        linear-gradient(to bottom, rgba(255, 255, 255, .03), rgba(255, 255, 255, .01)),
        linear-gradient(180deg, #001F3F 0%, #0A2A52 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.quote-brand {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
    margin: .35rem 0 2rem;
}

.quote-brand__logo-wrap {
    width: 200px;
    height: 200px;
    border-radius: 999px;
    background: #FFFFFF;
    border: 4px solid rgba(255, 215, 0, .92);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    margin: 0 auto;
    box-shadow:
        0 16px 40px rgba(0, 0, 0, .22),
        0 0 0 8px rgba(255, 255, 255, .05);
}

.quote-brand__logo {
    width: 88%;
    height: 88%;
    object-fit: contain;
}

.quote-label {
    font-size: .76rem;
    text-transform: uppercase;
    letter-spacing: .14em;
    font-weight: 800;
    color: var(--royal-gold);
    margin-bottom: .95rem;
    text-align: center;
}

.quote-text {
    color: #F8FAFC;
    font-size: 1rem;
    line-height: 1.8;
    text-align: center;
}

.quote-author {
    margin-top: .95rem;
    color: #D8DDE7;
    font-size: .88rem;
    font-weight: 700;
    text-align: center;
}

.quote-empty {
    color: #D8DDE7;
    font-size: .92rem;
    line-height: 1.6;
    text-align: center;
}

@media (max-width: 900px) {
    .login-card {
        grid-template-columns: 1fr;
    }

    .quote-panel {
        border-left: 0;
        border-top: 1px solid rgba(255, 255, 255, .08);
        padding-top: 1.8rem;
    }
}

@media (max-width: 640px) {
    .login-shell {
        padding: 1rem;
    }

    .login-panel,
    .quote-panel {
        padding: 1.6rem 1.3rem;
    }

    .quote-brand__logo-wrap {
        width: 160px;
        height: 160px;
    }

    .login-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .btn-primary {
        width: 100%;
    }

    .login-link {
        text-align: center;
    }
}

.password-field {
    position: relative;
    display: flex;
    align-items: center;
}

.password-field input {
    width: 100%;
    padding-right: 3.5rem;
    min-width: 0;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: .8rem;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    border: none;
    border-radius: 999px;
    background: transparent;
    color: #5b6472;
    cursor: pointer;
    transition: color .18s ease, background-color .18s ease, box-shadow .18s ease;
}

.password-toggle:hover {
    background: rgba(16, 32, 51, .06);
    color: #102033;
}

.password-toggle:focus-visible {
    outline: 0;
    background: rgba(106, 13, 173, .08);
    box-shadow: 0 0 0 4px rgba(106, 13, 173, .14);
}

.password-toggle__icon {
    position: absolute;
    width: 1.25rem;
    height: 1.25rem;
    pointer-events: none;
    transition: opacity .18s ease, transform .18s ease;
}

.password-toggle__icon--show {
    opacity: 1;
    transform: scale(1);
}

.password-toggle__icon--hide {
    opacity: 0;
    transform: scale(.92);
}

.password-toggle[aria-pressed="true"] .password-toggle__icon--show {
    opacity: 0;
    transform: scale(.92);
}

.password-toggle[aria-pressed="true"] .password-toggle__icon--hide {
    opacity: 1;
    transform: scale(1);
}

@media (max-width: 640px) {
    .password-field {
        display: flex;
    }

    .password-field input {
        padding-right: 3.2rem;
    }

    .password-toggle {
        width: 2.25rem;
        height: 2.25rem;
        min-width: 36px;
        min-height: 36px;
        right: .7rem;
    }
}