:root {
    --navy: #12263a;
    --navy-light: #1d3a56;
    --gold: #c8a24b;
    --gold-dark: #a9853a;
    --ink: #1f2933;
    --muted: #616e7c;
    --primary: #2255cc;
    --err: #c0392b;
    --ok: #1e7d46;
    --radius: 14px;
    --shadow-lg: 0 24px 60px rgba(10, 24, 38, .28);
}

* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    background:
        radial-gradient(1000px 500px at 85% -10%, rgba(200, 162, 75, .18), transparent 60%),
        radial-gradient(800px 500px at -10% 110%, rgba(47, 111, 228, .15), transparent 60%),
        linear-gradient(160deg, #16325c 0%, #0e1d2c 100%);
    color: var(--ink);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

::selection { background: rgba(200, 162, 75, .35); }

.auth-wrap {
    width: 100%;
    max-width: 460px;
    padding: 40px 18px;
}
.auth-card {
    background: #fff;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 18px;
    padding: 36px 32px;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}
.auth-card::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--gold) 0%, var(--gold-dark) 100%);
}
.auth-brand {
    font-size: 21px;
    font-weight: 800;
    margin-bottom: 4px;
    color: var(--navy);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    letter-spacing: -.01em;
}
.auth-brand::before {
    content: "";
    width: 34px; height: 34px;
    border-radius: 9px;
    background: linear-gradient(135deg, #d9b45e, var(--gold-dark));
    box-shadow: 0 4px 10px rgba(169, 133, 58, .3);
}
.auth-brand:hover { color: var(--navy); text-decoration: none; }
.auth-home {
    display: inline-block;
    font-size: 14px;
    color: var(--primary);
    text-decoration: none;
    margin-bottom: 18px;
}
.auth-home:hover { text-decoration: underline; }
.auth-card h1 {
    font-size: 22px;
    margin: 6px 0 6px;
    color: var(--navy);
    letter-spacing: -.01em;
}

.form-hint { color: var(--muted); font-size: 14px; margin: 0 0 18px; }
.form-meta { color: var(--muted); font-size: 14px; margin: 18px 0 0; text-align: center; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row-between { display: flex; justify-content: space-between; align-items: center; font-size: 14px; margin-bottom: 16px; }

.field { display: block; margin-bottom: 15px; }
.field span { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; color: #3e4c59; }
.field input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #d4dae0;
    border-radius: 10px;
    font-size: 15px;
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
}
.field input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(34, 85, 204, .16); }

.btn {
    display: inline-block;
    border: 1px solid #cbd2d9;
    background: #fff;
    color: var(--ink);
    padding: 12px 18px;
    border-radius: 10px;
    font-size: 15px;
    cursor: pointer;
    text-align: center;
    box-shadow: 0 2px 6px rgba(18, 38, 58, .06);
    transition: transform .12s, box-shadow .15s, background .15s;
}
.btn:hover { text-decoration: none; background: #f4f6f8; transform: translateY(-1px); }
.btn-primary {
    background: linear-gradient(135deg, #2f6fe4, #2255cc);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 8px 18px rgba(34, 85, 204, .32);
}
.btn-primary:hover { background: linear-gradient(135deg, #4280ea, #1c46ad); color: #fff; }
.btn-block { display: block; width: 100%; margin-top: 10px; }

.alert { padding: 13px 15px; border-radius: 10px; margin-bottom: 16px; font-size: 14px; border-left: 4px solid transparent; }
.alert-error { background: #fdecea; border-color: #f5c6c0; color: #a51d2d; border-left-color: var(--err); }
.alert-success { background: #e7f7ef; border-color: #bfe8d2; color: #147d3c; border-left-color: var(--ok); }
.alert-info { background: #e8f0fe; border-color: #bcd2f7; color: #1d5aa8; border-left-color: var(--primary); }

/* UI/UX standards (Phase 9) */
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 200; background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0; font-weight: 600; }
.skip-link:focus { left: 0; color: #fff; }
:focus { outline: none; }
:focus-visible { outline: 3px solid rgba(200, 162, 75, .65); outline-offset: 2px; border-radius: 4px; }
.field-error { display: block; color: #a51d2d; font-size: 12px; margin-top: 4px; }
.field.has-error input { border-color: #c0392b; box-shadow: 0 0 0 3px rgba(192, 57, 43, .12); }
.field.has-error .field-error { display: block; }