:root {
    --bg: #F3F5F7;
    --surface: #FFFFFF;
    --ink: #10182B;
    --ink-secondary: #5B6472;
    --ink-faint: #697586;
    --border: #E1E5EA;
    --border-strong: #C9D0D9;
    --brand: #0F6656;
    --brand-dark: #0A4A3E;
    --brand-tint: #E7F2EF;
    --radius-sm: 6px;
    --shadow-card: 0 1px 2px rgba(16, 24, 43, 0.04), 0 1px 8px rgba(16, 24, 43, 0.04);
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden;
}

body {
    background: var(--bg);
    color: var(--ink);
    font-family: 'Inter', -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
}

.page {
    flex: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 24px;
    gap: 24px;
}

.story-panel {
    background: var(--brand-dark);
    background-image: radial-gradient(ellipse at 100% 0, rgba(15, 102, 86, 0.9), transparent 65%);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: clamp(32px, 4vw, 64px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 56px;
    position: relative;
    overflow: hidden;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand img {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    object-fit: cover;
}

.brand-name {
    display: block;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 23px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.brand-caption {
    display: block;
    margin-top: 3px;
    font-size: 11px;
    letter-spacing: 0.02em;
    color: rgba(255, 255, 255, 0.7);
}

.story-mid {
    max-width: 460px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.story-mid .eyebrow {
    color: #F4C878;
    margin: 0 0 20px;
}

.story-mid .eyebrow::before {
    content: '';
    width: 20px;
    height: 1px;
    background: currentColor;
}

.story-mid h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(30px, 3.2vw, 46px);
    line-height: 1.15;
    font-weight: 600;
    margin: 0 0 20px;
    letter-spacing: -0.035em;
}

.story-description {
    font-size: 15px;
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.75);
    margin: 0;
}

.feature-list {
    display: grid;
    gap: 22px;
    list-style: none;
    margin: 36px 0 0;
    padding: 28px 0 0;
    border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.feature-list li {
    display: flex;
    align-items: center;
    gap: 14px;
}

.feature-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    color: #D3E8E2;
}

.feature-icon svg {
    width: 20px;
    height: 20px;
}

.feature-list strong {
    display: block;
    font-size: 13px;
    font-weight: 600;
}

.feature-list p {
    margin: 5px 0 0;
    font-size: 12px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.7);
}

.story-bottom {
    font-size: 11px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.7);
}

.story-bottom span {
    display: block;
    margin-bottom: 4px;
    color: #fff;
    font-size: 12px;
    font-weight: 500;
}

.form-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    width: 100%;
    min-width: 0;
}

.login-shell {
    width: 100%;
    max-width: 440px;
}

.login-shell.wide {
    max-width: 520px;
}

.mobile-brand {
    display: none;
    margin-bottom: 32px;
    color: var(--brand-dark);
}

.mobile-brand .brand-caption {
    color: var(--ink-secondary);
}

.login-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 36px;
    box-shadow: var(--shadow-card);
    width: 100%;
}

.login-card .eyebrow {
    color: var(--brand);
    margin: 0 0 14px;
}

.login-card h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 28px;
    font-weight: 600;
    letter-spacing: -0.035em;
    margin: 0 0 10px;
    color: var(--ink);
}

.login-card .subtitle {
    font-size: 14px;
    line-height: 1.65;
    color: var(--ink-secondary);
    margin: 0 0 28px;
}

.form-row {
    display: flex;
    gap: 14px;
}

.form-row .form-group {
    flex: 1;
    min-width: 0;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.form-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--ink);
}

.input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrap > svg {
    position: absolute;
    left: 13px;
    width: 16px;
    height: 16px;
    color: var(--ink-faint);
    pointer-events: none;
    z-index: 1;
}

.form-group input {
    width: 100%;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    min-height: 48px;
    padding: 12px 14px 12px 40px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    color: var(--ink);
    background: var(--surface);
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}

.form-group input.has-toggle {
    padding-right: 48px;
}

.form-group input:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-tint);
}

.form-group input::placeholder {
    color: var(--ink-faint);
}

.toggle-pw {
    position: absolute;
    right: 2px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--ink-faint);
    cursor: pointer;
    padding: 6px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    z-index: 2;
}

.toggle-pw:hover {
    color: var(--ink-secondary);
}

.toggle-pw svg {
    width: 16px;
    height: 16px;
    position: static;
    pointer-events: auto;
}

.field-hint {
    margin: 0;
    font-size: 12px;
    line-height: 1.5;
    color: var(--ink-secondary);
}

.btn-login {
    width: 100%;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    background: var(--brand-dark);
    border: none;
    padding: 13px 20px;
    min-height: 48px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background .15s, transform .1s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 8px;
}

.btn-login:hover {
    background: var(--brand);
}

.btn-login:active {
    transform: translateY(1px);
}

.error-box, .success-box {
    font-size: 13px;
    line-height: 1.5;
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.error-box {
    background: #FBEAE9;
    color: #B3261E;
    border: 1px solid #F0C9C6;
}

.success-box {
    background: var(--brand-tint);
    color: var(--brand-dark);
    border: 1px solid #BFDED6;
}

.error-box svg, .success-box svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 24px 0;
    color: var(--ink-faint);
    font-size: 12px;
}

.divider::before, .divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.signup-hint {
    text-align: center;
    font-size: 13.5px;
    color: var(--ink-secondary);
    margin: 0;
}

.signup-hint a, .back-link {
    color: var(--brand-dark);
    font-weight: 600;
    text-decoration: none;
}

.signup-hint a:hover, .back-link:hover {
    text-decoration: underline;
}

.back-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 13.5px;
    margin-top: 24px;
}

.access-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin: 20px 0 0;
    font-size: 12px;
    line-height: 1.5;
    color: var(--ink-secondary);
}

.access-note svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.login-page .site-footer {
    margin-top: 0;
    padding: 18px 16px;
    border: none;
    background: transparent;
}

.login-page .footer-brand {
    display: none;
}

.login-page .footer-copy {
    font-size: 12px;
    color: var(--ink-secondary);
}

a:focus-visible, button:focus-visible, input[type="checkbox"]:focus-visible {
    outline: 3px solid var(--brand);
    outline-offset: 4px;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        transition: none !important;
    }
}

@media (max-width: 900px) {
    .page {
        grid-template-columns: 1fr;
    }

    .story-panel {
        display: none;
    }

    .mobile-brand {
        display: flex;
    }
}

@media (max-width: 480px) {
    .page {
        padding: 28px 16px;
    }

    .form-panel {
        padding: 0;
    }

    .login-card {
        padding: 28px 22px;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }
}
