:root {
    color-scheme: light;
    --ink: #172033;
    --muted: #687386;
    --blue: #3157d5;
    --blue-dark: #243b9b;
    --line: #dce2ec;
    --surface: #f4f6fa;
    --danger: #a42d3e;
    --success: #236b46;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ink);
    background: #fff;
}

button, input { font: inherit; }

.login-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(300px, 0.9fr) minmax(420px, 1.1fr);
}

.brand-panel {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: clamp(2rem, 6vw, 5.5rem);
    color: #fff;
    background: linear-gradient(145deg, #192558 0%, #3157d5 62%, #647fe2 100%);
}

.brand-panel::after {
    content: "";
    position: absolute;
    width: 28rem;
    height: 28rem;
    right: -13rem;
    bottom: -11rem;
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 50%;
    box-shadow: 0 0 0 70px rgba(255,255,255,.05), 0 0 0 140px rgba(255,255,255,.035);
}

.brand-mark, .mini-brand span {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 13px;
    font-weight: 800;
    background: #fff;
    color: var(--blue);
    box-shadow: 0 12px 30px rgba(0,0,0,.14);
}

.eyebrow {
    margin: 0 0 .75rem;
    font-size: .75rem;
    font-weight: 800;
    letter-spacing: .16em;
}

.brand-panel h1 {
    max-width: 520px;
    margin: 0;
    font-size: clamp(2.5rem, 5vw, 5rem);
    line-height: .98;
    letter-spacing: -.055em;
}

.brand-copy { max-width: 440px; margin: 1.5rem 0 0; color: #dfe6ff; font-size: 1.08rem; line-height: 1.65; }
.brand-foot { z-index: 1; margin: 0; color: #dfe6ff; font-size: .85rem; }

.form-panel { display: grid; place-items: center; padding: 2rem; background: var(--surface); }
.single-form-shell { min-height: 100vh; display: grid; place-items: center; padding: 1.25rem; background: var(--surface); }
.form-card { width: min(100%, 430px); padding: clamp(2rem, 5vw, 3.25rem); border: 1px solid #e3e7ef; border-radius: 24px; background: #fff; box-shadow: 0 24px 70px rgba(23,32,51,.09); }
.form-card h2 { margin: 0; font-size: clamp(2rem, 4vw, 2.6rem); letter-spacing: -.04em; }
.subtitle { margin: .7rem 0 2rem; color: var(--muted); line-height: 1.5; }
.form-card label { display: block; margin: 1.1rem 0 .45rem; font-size: .88rem; font-weight: 700; }
.form-card input { width: 100%; height: 50px; padding: 0 .95rem; border: 1px solid var(--line); border-radius: 11px; color: var(--ink); background: #fff; outline: none; transition: border-color .2s, box-shadow .2s; }
.form-card input:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(49,87,213,.12); }
.password-field { position: relative; }
.password-field input { padding-right: 3.25rem; }
.form-card .password-toggle {
    position: absolute;
    top: 50%;
    right: .55rem;
    width: 38px;
    height: 38px;
    margin: 0;
    padding: 8px;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 8px;
    color: var(--muted);
    background: transparent;
    box-shadow: none;
}
.form-card .password-toggle:hover { color: var(--blue); background: #eef2ff; }
.form-card .password-toggle:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
.password-toggle svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.password-toggle .eye-closed { display: none; }
.password-toggle[aria-pressed="true"] .eye-open { display: none; }
.password-toggle[aria-pressed="true"] .eye-closed { display: block; }
.form-card button { width: 100%; height: 52px; margin-top: 1.5rem; border: 0; border-radius: 11px; color: #fff; background: var(--blue); font-weight: 800; cursor: pointer; box-shadow: 0 10px 25px rgba(49,87,213,.23); }
.form-card button:hover { background: var(--blue-dark); }
.form-card button:disabled { opacity: .48; cursor: not-allowed; box-shadow: none; }
.help-text { margin: 1.5rem 0 0; text-align: center; color: var(--muted); font-size: .82rem; }
.help-secondary { margin-top: .65rem; }
.field-hint { margin: .45rem 0 0; color: var(--muted); font-size: .78rem; line-height: 1.4; }
.register-shell { padding-block: 2.5rem; }
.register-card { width: min(100%, 520px); }
.alert { margin: 1rem 0; padding: .8rem 1rem; border-radius: 10px; font-size: .88rem; line-height: 1.45; }
.alert-error { color: var(--danger); background: #fff0f2; border: 1px solid #f2cbd1; }
.alert-success { color: var(--success); background: #eefaf3; border: 1px solid #c7ead5; }

.dashboard-body { background: var(--surface); }
.topbar { height: 76px; display: flex; align-items: center; justify-content: space-between; padding: 0 clamp(1.25rem, 5vw, 4.5rem); background: #fff; border-bottom: 1px solid var(--line); }
.mini-brand { display: flex; align-items: center; gap: .8rem; color: var(--ink); text-decoration: none; font-weight: 800; }
.mini-brand span { width: 36px; height: 36px; border-radius: 10px; color: #fff; background: var(--blue); box-shadow: none; }
.topbar form { margin: 0; }
.topbar-actions { display: flex; align-items: center; gap: 1rem; }
.text-link, .help-text a { color: var(--blue); text-decoration: none; font-weight: 700; }
.logout-button { padding: .65rem 1rem; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink); font-weight: 700; cursor: pointer; }
.dashboard { width: min(900px, calc(100% - 2rem)); margin: clamp(4rem, 10vw, 8rem) auto; }
.dashboard h1 { margin: 0; font-size: clamp(2.5rem, 7vw, 5rem); letter-spacing: -.055em; }
.dashboard > p:not(.eyebrow) { max-width: 600px; color: var(--muted); font-size: 1.1rem; line-height: 1.7; }
.status-card { display: flex; align-items: center; gap: .9rem; width: min(100%, 420px); margin-top: 2rem; padding: 1.1rem 1.25rem; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.status-dot { width: 12px; height: 12px; border-radius: 50%; background: #2eb875; box-shadow: 0 0 0 5px #dcf6e9; }
.status-card strong, .status-card small { display: block; }
.status-card small { margin-top: .2rem; color: var(--muted); }
.records-page { width: min(1180px, calc(100% - 2rem)); margin: 3.5rem auto; }
.records-heading h1 { margin: 0; font-size: clamp(2.5rem, 6vw, 4.5rem); letter-spacing: -.05em; }
.records-heading p { color: var(--muted); }
.table-card { margin-top: 2rem; overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 1rem 1.15rem; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { color: var(--muted); background: #f8f9fc; font-size: .76rem; letter-spacing: .08em; text-transform: uppercase; }
tbody tr:last-child td { border-bottom: 0; }
.status-pill { display: inline-block; padding: .28rem .6rem; border-radius: 999px; color: var(--muted); background: #edf0f5; font-size: .76rem; font-weight: 800; }
.status-pill.active { color: var(--success); background: #e7f7ee; }
.empty-state { padding: 3rem; text-align: center; color: var(--muted); }

@media (max-width: 760px) {
    .login-shell { grid-template-columns: 1fr; }
    .brand-panel { min-height: 290px; padding: 2rem; }
    .brand-panel h1 { font-size: 2.7rem; }
    .brand-foot { display: none; }
    .form-panel { padding: 1.25rem; }
    .form-card { padding: 1.6rem; }
}
