/* Login & logout pages — compact + responsive */
.auth-page {
    padding: 36px 0 56px;
    background: radial-gradient(900px 420px at 100% 0%, var(--primary-soft), transparent 65%), var(--tint);
}

.auth-card {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    padding: 28px 28px 24px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
    box-shadow: var(--shadow-lg);
}

.auth-split {
    display: grid;
    grid-template-columns: 0.95fr 1.05fr;
    max-width: 880px;
    margin: 0 auto;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
    box-shadow: var(--shadow-lg);
}

/* Visual panel — clear photo, readable text card */
.auth-visual {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 420px;
    color: #0b1f4b;
    background: var(--navy);
}

.auth-visual picture,
.auth-visual img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.auth-visual img {
    object-fit: cover;
    object-position: center center;
    filter: none;
}

.auth-visual::after {
    display: none;
}

.auth-visual-body {
    position: relative;
    z-index: 1;
    margin: 16px;
    padding: 14px 16px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 8px 20px rgba(11, 31, 75, 0.16);
}

.auth-kicker {
    display: inline-block;
    margin-bottom: 8px;
    padding: 4px 8px;
    border-radius: 5px;
    background: rgba(29, 95, 214, 0.12);
    color: var(--primary);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.auth-visual h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 800;
    line-height: 1.2;
    color: #0b1f4b;
}

.auth-visual-lead {
    margin: 8px 0 0;
    max-width: none;
    font-size: 13px;
    line-height: 1.45;
    color: #3a4a66;
}

.auth-benefits {
    display: grid;
    gap: 8px;
    margin: 12px 0 0;
    padding: 10px 0 0;
    border-top: 1px solid rgba(11, 31, 75, 0.1);
    list-style: none;
    font-size: 12.5px;
    font-weight: 600;
    color: #0b1f4b;
}

.auth-benefits li {
    position: relative;
    padding-left: 26px;
    line-height: 1.35;
}

.auth-benefits li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 0;
    display: grid;
    place-items: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
}

/* Form panel */
.auth-panel {
    display: flex;
    align-items: center;
    padding: 28px 32px;
}

.auth-form {
    width: 100%;
}

.auth-card .auth-form h1,
.auth-form h1 {
    margin: 0;
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.02em;
    text-align: center;
}

.auth-card .auth-lead {
    text-align: center;
}

.auth-lead {
    margin: 6px 0 16px;
    font-size: 14px;
    color: var(--muted);
}

.auth-demo {
    margin: -4px 0 14px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #f3ead3;
    color: #4d3e1c;
    font-size: 12.5px;
    line-height: 1.45;
}

.auth-demo strong {
    display: block;
    margin-bottom: 4px;
}

.auth-demo span {
    display: block;
}

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

.auth-form .field {
    gap: 5px;
    margin-bottom: 12px;
}

.auth-form .field > span:first-child,
.auth-form .field-label-row label {
    font-size: 13px;
    font-weight: 700;
}

.auth-form .field input,
.auth-form .field select {
    padding: 10px 12px;
    border-radius: 10px;
    border-width: 1.5px;
}

.password-wrap {
    position: relative;
}

.password-wrap input {
    padding-right: 70px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 6px;
    transform: translateY(-50%);
    padding: 5px 10px;
    border: 0;
    border-radius: 7px;
    background: var(--primary-soft);
    color: var(--primary);
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.password-toggle:hover {
    background: #dbe7fc;
}

.password-toggle:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.caps-warning {
    font-size: 12px;
    font-weight: 600;
    color: #b45309;
}

.auth-form .btn-block {
    margin-top: 4px;
    padding-top: 12px;
    padding-bottom: 12px;
}

.auth-form .auth-switch {
    margin: 14px 0 0;
    font-size: 13.5px;
}

.auth-help {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
    font-size: 12.5px;
    text-align: center;
    color: var(--muted);
}

.auth-help a {
    font-weight: 600;
    color: var(--primary);
}

/* Logout message card */
.auth-message {
    max-width: 480px;
    margin: 16px auto;
    padding: 32px 28px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
    box-shadow: var(--shadow-lg);
    text-align: center;
}

.auth-message-icon {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    margin: 0 auto 14px;
    border-radius: 50%;
    background: var(--primary-soft);
    color: var(--primary);
}

.auth-message-icon svg {
    width: 24px;
    height: 24px;
}

.auth-message-ok {
    background: #e7f6ee;
    color: #157347;
}

.auth-message h1 {
    font-size: 24px;
    font-weight: 800;
}

.auth-message p {
    margin-top: 10px;
    color: var(--muted);
}

.auth-message-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

@media (max-width: 900px) {
    .auth-page {
        padding: 20px 0 40px;
    }

    .auth-card {
        max-width: 400px;
        padding: 24px 20px 20px;
        border-radius: 14px;
    }

    .auth-split {
        grid-template-columns: 1fr;
        max-width: 440px;
        border-radius: 14px;
    }

    .auth-visual {
        min-height: 180px;
    }

    .auth-visual-body {
        margin: 12px;
        padding: 12px 14px;
    }

    .auth-benefits {
        display: none;
    }

    .auth-visual h2 {
        font-size: 18px;
    }

    .auth-visual-lead {
        font-size: 12.5px;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .auth-panel {
        padding: 22px 20px 24px;
    }

    .auth-form h1 {
        font-size: 22px;
    }
}

@media (max-width: 560px) {
    .auth-page {
        padding: 14px 0 max(32px, env(safe-area-inset-bottom));
    }

    .auth-page > .container {
        padding-left: 12px;
        padding-right: 12px;
    }

    .auth-card {
        max-width: 100%;
        padding: 20px 16px 18px;
        border-radius: 12px;
    }

    .auth-form .btn-block {
        min-height: 46px;
    }

    .auth-split {
        border-radius: 12px;
    }

    .auth-visual {
        min-height: 150px;
    }

    .auth-panel {
        padding: 18px 16px 20px;
    }

    .auth-form h1 {
        font-size: 20px;
    }

    .auth-form .btn-block {
        width: 100%;
    }

    .auth-message {
        padding: 24px 18px;
        border-radius: 12px;
    }

    .auth-message-actions .btn {
        width: 100%;
    }
}

/* Admin login & logout (standalone pages) */
.admin-auth-body {
    min-height: 100vh;
    background: radial-gradient(800px 480px at 85% -10%, rgba(29, 95, 214, 0.45), transparent 60%), var(--navy);
}

.admin-auth {
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 20px;
    min-height: 100vh;
    padding: 24px 16px;
}

.admin-auth-logo {
    color: #fff;
}

.admin-auth-card {
    width: 100%;
    max-width: 400px;
    padding: 28px 24px;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.admin-auth-card.auth-message {
    margin: 0;
}

@media (max-width: 560px) {
    .admin-auth-card {
        padding: 22px 16px;
    }
}
