*, *::before, *::after { box-sizing: border-box; }

html, body {
    margin: 0;
    min-height: 100%;
    background:
        radial-gradient(720px 420px at 50% 42%, rgba(166, 31, 45, 0.45), transparent 70%),
        #140c0e;
    color: #f4efe6;
    font-family: "Outfit", sans-serif;
}

button, input { font-family: inherit; }

.login-page {
    width: auto;
    min-height: 100vh;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px 16px;
}

.login-card {
    display: grid;
    grid-template-columns: 320px 420px;
    width: min(740px, 100%);
    border-radius: 28px;
    overflow: hidden;
    border: 1px solid rgba(198, 163, 106, 0.32);
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.38);
}

.left-panel {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 36px 28px;
    background:
        radial-gradient(240px 160px at 18% 0%, rgba(198, 163, 106, 0.18), transparent 72%),
        #3a1218;
    box-shadow: none;
    overflow: hidden;
}

.left-panel::before { content: none; }

.left-content {
    position: relative;
    width: 100%;
}

.brand-logo {
    width: 52px;
    height: auto;
    display: block;
    margin-bottom: 14px;
}

.hero-kicker {
    margin: 0 0 6px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #c6a36a;
}

.left-content h1 {
    margin: 0 0 10px;
    font-family: "Source Serif 4", serif;
    font-size: 34px;
    font-weight: 520;
    line-height: 0.96;
    letter-spacing: -0.03em;
    color: #f4efe6;
}

.left-content h1 span {
    font-style: italic;
    font-weight: 650;
}

.left-lead {
    margin: 0 0 14px;
    max-width: 36ch;
    color: #ead8d6;
    font-size: 16px;
    line-height: 1.5;
}

.table-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 6px;
}

.table-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #f4efe6;
    font-size: 15px;
}

.table-list li::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #c6a36a;
    flex: 0 0 auto;
}

.right-panel {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    padding: 32px 28px;
    background: #f6f1e8;
    color: #2a1618;
    box-shadow: none;
}

.mobile-brand { display: none; }

.form-wrap { width: 100%; }

.form-card { background: transparent; }

.session-alert {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    margin-bottom: 18px;
    padding: 10px 12px;
    border-radius: 12px;
    background: #f3ddd8;
    color: #8d2f2a;
    font-size: 14px;
}

.form-eyebrow {
    margin: 0 0 8px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #6d6254;
}

.form-title {
    margin: 0 0 4px;
    font-family: "Source Serif 4", serif;
    font-size: 28px;
    font-weight: 650;
    letter-spacing: -0.03em;
    line-height: 1;
}

.form-subtitle {
    margin: 0 0 14px;
    color: #6d5556;
    font-size: 15px;
    line-height: 1.45;
}

.field { margin-bottom: 12px; }

.field label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 700;
}

.input-box { position: relative; }

.icon-left {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #6d6254;
    font-size: 14px;
}

.input-box input {
    width: 100%;
    height: 46px;
    padding: 0 44px 0 40px;
    border: 1px solid #e3d9c8;
    border-radius: 14px;
    background: #fffdf8;
    color: #2a1618;
    font-size: 15px;
}

.input-box input:focus {
    outline: 2px solid #a61f2d;
    outline-offset: 1px;
    border-color: transparent;
}

.input-focus-line { display: none; }

.toggle-pw {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border: 0;
    background: transparent;
    color: #6d6254;
    cursor: pointer;
}

.btn-login {
    position: relative;
    width: 100%;
    height: 48px;
    margin-top: 6px;
    border: 0;
    border-radius: 14px;
    background: #a61f2d;
    color: #f4efe6;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-login:hover:not(:disabled) { background: #c4313f; }

.btn-login:disabled {
    background: #d7d0c4;
    color: #6d6254;
    cursor: not-allowed;
}

.btn-login:focus-visible,
.toggle-pw:focus-visible,
.modal-box .close-btn:focus-visible,
.btn-confirm:focus-visible,
.btn-cancel:focus-visible {
    outline: 2px solid #a61f2d;
    outline-offset: 2px;
}

.error-box {
    display: none;
    gap: 8px;
    margin-top: 14px;
    padding: 12px;
    border-radius: 12px;
    background: #f3ddd8;
    color: #8d2f2a;
    font-size: 14px;
}

.form-card-footer { margin-top: 14px; }

.divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    color: #6d6254;
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.divider::before,
.divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #d9d0c2;
}

.signup-row {
    text-align: center;
    color: #6d5556;
    font-size: 14px;
    line-height: 1.6;
}

.signup-row a {
    color: #a61f2d;
    font-weight: 700;
    text-decoration: none;
}

.secure-note {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
    color: #6d6254;
    font-size: 12px;
}

.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9000;
    padding: 24px;
    background: rgba(16, 24, 22, 0.72);
    align-items: center;
    justify-content: center;
}

.modal-box {
    position: relative;
    width: 100%;
    max-width: 420px;
    padding: 28px 24px;
    border-radius: 18px;
    background: #f4efe6;
    color: #2a1618;
}

.modal-box .close-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 50%;
    background: #e7e0d4;
    color: #2a1618;
    cursor: pointer;
}

.modal-icon { font-size: 28px; margin-bottom: 8px; }

.modal-box h3 {
    margin: 0 0 8px;
    font-family: "Source Serif 4", serif;
    font-size: 28px;
}

.modal-box p {
    margin: 0 0 8px;
    color: #6d5556;
    line-height: 1.5;
}

.modal-box p strong { color: #2a1618; }

.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 18px;
}

.modal-actions .btn {
    flex: 1;
    height: 44px;
    border-radius: 999px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-confirm {
    border: 0;
    background: #a61f2d;
    color: #f4efe6;
}

.btn-cancel {
    border: 1px solid #d9d0c2;
    background: transparent;
    color: #2a1618;
}

.btn-external {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 18px;
    border-radius: 999px;
    background: #a61f2d;
    color: #f4efe6;
    font-weight: 700;
    text-decoration: none;
}

.btn-text {
    border: 0;
    background: transparent;
    color: #6d5556;
    cursor: pointer;
}

@media (max-width: 860px) {
    .login-page {
        width: auto;
        align-items: flex-start;
        padding: 20px 16px 32px;
    }
    .login-card {
        grid-template-columns: 1fr;
        width: min(420px, 100%);
        margin-top: 12px;
    }
    .left-panel { display: none; }
    .right-panel {
        min-height: 0;
        align-items: stretch;
        justify-content: flex-start;
        padding: 28px 22px 24px;
        box-shadow: none;
    }
    .form-wrap { width: 100%; max-width: 400px; margin: 0 auto; }
    .mobile-brand {
        display: block;
        margin: 0 auto 14px;
        text-align: center;
    }
    .mobile-brand img { width: 64px; height: auto; }
}

@media (prefers-reduced-motion: reduce) {
    * { scroll-behavior: auto !important; transition: none !important; }
}
