/* Login page — "Aurora glass", light: dashboard palette (#f0f4ff page, white cards, blue #1e3a8a→#3b82f6 accents).
   Self-contained (the other auth pages still use login.css). */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

:root {
    --blue-600: #2563eb; --blue-500: #3b82f6; --blue-400: #60a5fa; --navy: #1e3a8a;
    --ink: #0f172a; --muted: #64748b; --border: #e2e8f0; --page: #f0f4ff;
    --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

html, body { min-height: 100%; }
body {
    font-family: var(--font);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    background: var(--page);
    color: var(--ink);
}
svg { display: block; }
button, input { font: inherit; color: inherit; }
a { color: inherit; }
.icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ── stage ── */
.va {
    position: relative; min-height: 100vh; display: flex; flex-direction: column; overflow: hidden;
    background: var(--page) url('/img/login-bg.svg') center bottom / cover no-repeat;   /* illustrated backdrop */
}
.va > * { position: relative; z-index: 2; }
.va > .a-top { z-index: 6; }   /* keep the Help dropdown above the centred card area so its items are clickable */
.va .orb, .va .dots { position: absolute; z-index: 1; pointer-events: none; }
/* floating payroll illustrations (chart card, payslip, coins) — only where there's room beside the card */
.va::before { content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: url('/img/login-floats.svg') center / cover no-repeat; }
@media (max-width: 1100px) { .va::before { display: none; } }
.va .orb { width: 560px; height: 560px; border-radius: 50%; filter: blur(90px); opacity: .30; animation: drift 20s ease-in-out infinite alternate; }
.va .o1 { background: #93c5fd; left: -160px; top: -140px; }
.va .o2 { background: #c7d2fe; right: -160px; top: 16%; animation-delay: -6s; opacity: .7; }
.va .o3 { background: #a5d8ff; left: 32%; bottom: -260px; animation-delay: -11s; opacity: .45; }
@keyframes drift { to { transform: translate3d(60px, 40px, 0) scale(1.08); } }
.va .dots {
    inset: 0;
    background-image: radial-gradient(rgba(59,130,246,.22) 1px, transparent 1.2px);
    background-size: 26px 26px;
    -webkit-mask-image: radial-gradient(ellipse at 50% 40%, #000 15%, transparent 70%);
            mask-image: radial-gradient(ellipse at 50% 40%, #000 15%, transparent 70%);
}

/* ── brand ── */
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark { width: 42px; height: 42px; flex: none; filter: drop-shadow(0 6px 14px rgba(59,130,246,.35)); }
.brand-name { font-size: 24px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; color: var(--ink); }
.brand-name span { color: var(--blue-500); }
.brand-tag { font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin-top: 3px; }

/* ── top bar ── */
.a-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 24px 40px; }
.a-links { display: flex; align-items: center; gap: 18px; font-size: 14px; }
.a-links a, .a-links button {
    display: inline-flex; align-items: center; gap: 7px;
    color: #475569; text-decoration: none; font-weight: 500;
    background: none; border: 0; cursor: pointer; padding: 6px 2px;
}
.a-links a:hover, .a-links button:hover { color: var(--blue-600); }
.a-links .icon { width: 16px; height: 16px; }

/* ── centre ── */
.a-center { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px; padding: 8px 20px 24px; }

.a-card {
    position: relative; width: 100%; max-width: 440px; padding: 36px;
    border-radius: 24px;
    background: rgba(255,255,255,.92);
    border: 1px solid var(--border);
    -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px);
    box-shadow: 0 30px 70px -20px rgba(30,58,138,.30), 0 2px 8px rgba(15,23,42,.05), inset 0 1px 0 #fff;
    animation: rise .6s cubic-bezier(.2,.8,.2,1) both;
}
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.a-card::before {
    content: ""; position: absolute; top: -1px; left: 12%; right: 12%; height: 2px; border-radius: 2px;
    background: linear-gradient(90deg, transparent, var(--navy), var(--blue-500), #22c55e, transparent);
}

.pill {
    display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px;
    font-size: 11.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
    color: #1d4ed8; background: #eff6ff; border: 1px solid #bfdbfe;
}
.pill i { width: 7px; height: 7px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 4px rgba(34,197,94,.2); }

.a-card h1 { color: var(--ink); margin: 16px 0 6px; font-size: 30px; letter-spacing: -.03em; line-height: 1.15; font-weight: 750; }
.a-card .sub { margin: 0 0 26px; color: var(--muted); }

/* ── form (dark theme) ── */
.lf { --ink:#0f172a; --line:#e2e8f0; --line-hover:#cbd5e1; --field:#f8fafc;
      --ph:#94a3b8; --focus:#3b82f6; --ring:rgba(59,130,246,.18); --icon:#94a3b8;
      --link:#2563eb; --hover:#eff6ff; --danger:#dc2626; --warn:#d97706; }
.lf .field { margin-bottom: 18px; }
.lf label { font-size: 14px; font-weight: 600; color: var(--ink); }
.lf .field > label { display: block; margin-bottom: 6px; }
.lf .row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.lf .wrap { position: relative; }
.lf .wrap > .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--icon); pointer-events: none; }
.lf .input {
    width: 100%; height: 48px; padding: 0 44px;
    background: var(--field); color: var(--ink);
    border: 1px solid var(--line); border-radius: 12px; outline: none;
    font-size: 15.5px; transition: border-color .15s, box-shadow .15s;
}
.lf .input::placeholder { color: var(--ph); }
.lf .input:hover { border-color: var(--line-hover); }
.lf .input:focus { border-color: var(--focus); box-shadow: 0 0 0 4px var(--ring); background: #fff; }
.lf .input:-webkit-autofill { -webkit-box-shadow: 0 0 0 1000px #eef4ff inset; -webkit-text-fill-color: #0f172a; caret-color: #0f172a; }
.lf .toggle {
    position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
    width: 36px; height: 36px; display: grid; place-items: center;
    border: 0; background: transparent; border-radius: 8px; color: var(--icon); cursor: pointer;
}
.lf .toggle:hover { background: var(--hover); color: var(--blue-600); }
.lf .link { color: var(--link); font-weight: 600; font-size: 14px; text-decoration: none; }
.lf .link:hover { text-decoration: underline; }
.lf .err, .lf .hint { margin: 6px 0 0; font-size: 13px; display: flex; gap: 6px; align-items: center; }
.lf .err { color: var(--danger); }
.lf .err:empty { display: none; }
.lf .hint.warn { color: var(--warn); }
.lf .hint .icon { width: 15px; height: 15px; }
.lf .check { display: inline-flex; align-items: center; gap: 10px; font-size: 14.5px; font-weight: 400; color: var(--ink); cursor: pointer; user-select: none; }
.lf .check input { width: 18px; height: 18px; margin: 0; accent-color: var(--blue-600); cursor: pointer; }
.lf .row2 { margin: 2px 0 22px; }
.lf .banner { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; margin-bottom: 18px; border-radius: 10px; font-size: 14px; }
.lf .banner.ok  { background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; }
.lf .banner.bad { background: #fff1f2; border: 1px solid #fda4af; color: #be123c; }
.lf .banner .icon { width: 18px; height: 18px; margin-top: 2px; }
.lf .banner ul { list-style: none; }

.lf .btn {
    width: 100%; height: 50px; border: 0; border-radius: 12px; cursor: pointer;
    font-weight: 650; font-size: 16px; color: #fff;
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 55%, #3b82f6 100%);   /* same as the dashboard welcome banner */
    box-shadow: 0 10px 24px -6px rgba(37,99,235,.55), inset 0 1px 0 rgba(255,255,255,.2);
    transition: transform .08s, filter .15s, box-shadow .15s;
}
.lf .btn:hover { filter: brightness(1.08); }
.lf .btn:active { transform: translateY(1px); }
.lf .btn[disabled] { cursor: progress; filter: saturate(.7); }
.lf .btn:focus-visible, .lf .toggle:focus-visible, .lf .link:focus-visible, .lf .check input:focus-visible { outline: 3px solid rgba(59,130,246,.45); outline-offset: 2px; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid rgba(255,255,255,.4); border-top-color: #fff; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── feature chips + footer ── */
.a-chips { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; max-width: 760px; }
.a-chips li {
    display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px;
    font-size: 13.5px; font-weight: 500; color: #334155;
    background: #fff; border: 1px solid var(--border);
    box-shadow: 0 1px 4px rgba(0,0,0,.05);
}
.a-chips .icon { width: 16px; height: 16px; color: var(--blue-500); }
.a-chips li:nth-child(2) .icon { color: #22c55e; }
.a-chips li:nth-child(3) .icon { color: #d97706; }
.a-chips li:nth-child(4) .icon { color: #7c3aed; }
.a-foot { padding: 0 20px 22px; text-align: center; font-size: 12.5px; font-weight: 500; color: #1e3a8a; }

/* ── short / small screens ── */
@media (max-height: 860px) {
    .a-top { padding: 16px 40px; }
    .a-center { gap: 20px; padding-bottom: 12px; }
    .a-card { padding: 28px 32px; }
    .a-card h1 { margin-top: 12px; font-size: 27px; }
    .a-card .sub { margin-bottom: 18px; }
    .lf .field { margin-bottom: 14px; }
    .lf .row2 { margin-bottom: 16px; }
    .a-foot { padding-bottom: 14px; }
}
@media (max-height: 700px) {
    .a-top { padding: 8px 40px; }
    .a-center { gap: 0; padding: 0 20px 6px; }
    .a-card { padding: 18px 28px; }
    .a-card h1 { margin: 8px 0 2px; font-size: 24px; }
    .a-card .sub { margin-bottom: 10px; font-size: 14px; }
    .lf .field { margin-bottom: 10px; }
    .lf .row2 { margin-bottom: 12px; }
    .a-foot { padding-bottom: 6px; font-size: 12px; }
}
@media (max-height: 740px) {
    .a-chips { display: none; }
    .a-card { padding: 24px 30px; }
    .a-card .sub { margin-bottom: 14px; }
    .lf .input { height: 44px; }
    .lf .btn { height: 46px; }
}
@media (max-width: 720px) {
    .a-top { padding: 16px 20px; }
    .a-links .txt { display: none; }
    .a-card { padding: 28px 22px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ── Help button + menu ── */
.help { position: relative; }
.help-btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 9px 18px 9px 14px; border-radius: 999px; cursor: pointer;
    font-size: 14px; font-weight: 600; color: #1d4ed8;
    background: rgba(255,255,255,.85); border: 1px solid #bfdbfe;
    box-shadow: 0 1px 4px rgba(15,23,42,.06);
    transition: background .15s, box-shadow .15s, transform .1s;
}
.help-btn:hover { background: #fff; box-shadow: 0 6px 16px -6px rgba(37,99,235,.4); }
.help-btn:active { transform: translateY(1px); }
.help-btn[aria-expanded="true"] { background: #fff; border-color: #93c5fd; }
.help-btn .icon { width: 18px; height: 18px; }
.help-menu {
    position: absolute; right: 0; top: calc(100% + 10px); z-index: 20; width: 260px; padding: 8px;
    background: #fff; border: 1px solid var(--border); border-radius: 16px;
    box-shadow: 0 24px 50px -16px rgba(30,58,138,.35), 0 2px 8px rgba(15,23,42,.06);
    animation: rise .18s ease both;
}
.help-menu button {
    width: 100%; display: flex; align-items: center; gap: 12px; text-align: left;
    padding: 10px 12px; border: 0; background: transparent; border-radius: 10px; cursor: pointer; color: var(--ink);
}
.help-menu button:hover, .help-menu button:focus-visible { background: #eff6ff; outline: none; }
.help-menu .icon { width: 36px; height: 36px; padding: 9px; border-radius: 10px; background: #dbeafe; color: #2563eb; }
.help-menu button:nth-child(2) .icon { background: #dcfce7; color: #15803d; }
.help-menu b { display: block; font-size: 14px; font-weight: 650; }
.help-menu small { display: block; font-size: 12px; color: var(--muted); }

/* ── Modals (brochure + email) ── */
.ov { position: fixed; inset: 0; z-index: 9000; background: rgba(15,23,42,.55); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.modal {
    position: fixed; z-index: 9001; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: min(500px, 94vw); max-height: 92vh; overflow-y: auto;
    background: #fff; color: var(--ink); border-radius: 20px; box-shadow: 0 30px 70px rgba(2,6,23,.4);
    animation: pop .22s cubic-bezier(.2,.8,.2,1) both;
}
.modal.wide { width: min(780px, 96vw); border-radius: 18px; }
@keyframes pop { from { opacity: 0; transform: translate(-50%, -46%) scale(.98); } to { opacity: 1; transform: translate(-50%, -50%); } }
.modal-head { display: flex; justify-content: space-between; gap: 12px; padding: 22px 24px 8px; }
.modal-head h3 { font-size: 20px; font-weight: 750; letter-spacing: -.02em; }
.modal-head p { font-size: 13.5px; color: var(--muted); margin-top: 2px; }
.modal-head .x { width: 34px; height: 34px; border: 0; border-radius: 10px; background: #f1f5f9; color: #475569; cursor: pointer; display: grid; place-items: center; flex-shrink: 0; }
.modal-head .x:hover { background: #e2e8f0; }
.modal-head .x .icon { width: 16px; height: 16px; }
#mailForm { padding: 10px 24px 22px; }
.mrow { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mf { margin-bottom: 14px; }
.mf label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; }
.mf input, .mf select, .mf textarea {
    width: 100%; padding: 11px 13px; border: 1px solid var(--border); border-radius: 11px; background: #f8fafc;
    font-size: 14.5px; color: var(--ink); outline: none; font-family: inherit; transition: border-color .15s, box-shadow .15s, background .15s;
}
.mf textarea { resize: vertical; min-height: 110px; }
.mf input:focus, .mf select:focus, .mf textarea:focus { border-color: #3b82f6; box-shadow: 0 0 0 4px rgba(59,130,246,.18); background: #fff; }
.mmsg { min-height: 20px; font-size: 13px; margin: -4px 0 10px; }
.mmsg.ok { color: #15803d; } .mmsg.bad { color: #dc2626; }
.mact { display: flex; justify-content: flex-end; gap: 10px; }
.mbtn {
    height: 44px; padding: 0 22px; border: 0; border-radius: 11px; cursor: pointer; font-weight: 650; font-size: 15px; color: #fff;
    display: inline-flex; align-items: center; gap: 8px;
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 55%, #3b82f6 100%);
    box-shadow: 0 8px 20px -6px rgba(37,99,235,.55);
}
.mbtn.ghost { background: #f1f5f9; color: #334155; box-shadow: none; }
.mbtn[disabled] { cursor: progress; filter: saturate(.7); }
@media (max-width: 560px) { .mrow { grid-template-columns: 1fr; } }
/* ── Draft-mail look ── */
.draft-title { display: flex; align-items: center; gap: 12px; }
.draft-title > .icon { width: 40px; height: 40px; padding: 10px; border-radius: 12px; background: #dcfce7; color: #15803d; flex-shrink: 0; }
#mailForm { padding: 6px 0 20px; }
.dline { display: flex; align-items: center; gap: 12px; padding: 0 24px; min-height: 46px; border-bottom: 1px solid var(--border); }
.dline .dk { width: 64px; flex-shrink: 0; font-size: 13px; font-weight: 600; color: var(--muted); }
.dline input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 14.5px; color: var(--ink); padding: 12px 0; font-family: inherit; }
.dline input::placeholder { color: #94a3b8; }
.dline:focus-within { background: #f8fbff; }
.dchip { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 9px; border-radius: 999px; background: #eff6ff; border: 1px solid #bfdbfe; color: #1d4ed8; font-size: 13.5px; font-weight: 600; }
.dchip .icon { width: 15px; height: 15px; }
.dbody { margin: 0; }
.dbody textarea { border: 0; border-radius: 0; background: #fff; padding: 16px 24px; min-height: 170px; box-shadow: none !important; }
.dbody textarea:focus { background: #fbfdff; }
#mailForm .mmsg { padding: 0 24px; margin: 10px 0 8px; }
#mailForm .mact { padding: 0 24px; }