/* Vara look and feel: navy header, white icon menu, soft cards, pastel tiles. Tokens match the rest of the Vara family (copied, not linked). */
:root {
  --bg: #eef2f8; --card: #fff; --text: #1f2430; --muted: #6b7280; --line: #dfe3e8; --pill: #f1f4f8;
  --accent: #3b6ef6; --accent-hover: #2d55c7; --err: #b42318; --ok: #1b8a58;
  --nav-bg: #0f2747; --nav-bg-2: #1a3f72; --navy: #14284b; --sidebar-w: 216px;
  --shadow: 0 1px 2px rgba(15, 39, 71, .05), 0 8px 22px rgba(15, 39, 71, .06);
  --tint-blue: #e8f0fe; --ink-blue: #2f62d8; --tint-green: #e3f5ec; --ink-green: #1b8a58;
  --tint-purple: #efe9fb; --ink-purple: #6a45c2; --tint-orange: #fdeddc; --ink-orange: #d5701a;
  --tint-red: #fde8e6; --ink-red: #c0372f;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0e1522; --card: #172033; --text: #e6eaf2; --muted: #9aa5b8; --line: #2b3548; --pill: #1f2a40; --accent: #6b93ff; --accent-hover: #8aa9ff; --err: #ff8a8f; --ok: #4cc38a;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 22px rgba(0, 0, 0, .25);
    --tint-blue: #1b2c52; --ink-blue: #8fb0ff; --tint-green: #153a2b; --ink-green: #6fd6a2; --tint-purple: #2b2150; --ink-purple: #b9a2ff; --tint-orange: #46301a; --ink-orange: #ffb067; --tint-red: #4a2220; --ink-red: #ff9c94; }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; }
h1 { font-size: 1.6rem; line-height: 1.25; margin: 0 0 6px; }
h2 { font-size: 1.2rem; margin: 26px 0 8px; }
h3 { font-size: 1rem; margin: 20px 0 6px; }
small, .muted { color: var(--muted); }
hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }
code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9em; }
code { background: var(--pill); padding: 1px 5px; border-radius: 5px; }
pre { background: var(--pill); padding: 12px; border-radius: 10px; overflow: auto; }
ul, ol { padding-left: 22px; }
li { margin: 3px 0; }
.error { color: var(--err); }
p.error[role="alert"], .error[role="alert"] { background: var(--tint-red); border: 1px solid color-mix(in srgb, var(--err) 30%, transparent); border-radius: 10px; padding: 8px 12px; }

/* ---- forms ---- */
label { display: block; margin: 14px 0 4px; font-weight: 600; font-size: .92rem; }
input, select, textarea { font: inherit; color: inherit; background: var(--card); border: 1px solid var(--line); border-radius: 9px; padding: 9px 11px; max-width: 100%; }
input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=hidden]), textarea { width: 100%; }
select { padding-right: 28px; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 0; border-color: var(--accent); }
input[type=checkbox], input[type=radio] { width: 16px; height: 16px; margin-right: 6px; vertical-align: -2px; accent-color: var(--accent); }
label:has(> input[type=checkbox]), label:has(> input[type=radio]) { font-weight: 500; }
td input:not([type=checkbox]):not([type=radio]), td select, td textarea, li input:not([type=checkbox]):not([type=radio]), li select { width: auto; }
fieldset { border: 1px solid var(--line); border-radius: 12px; margin: 16px 0; padding: 8px 16px 14px; }
legend { padding: 0 8px; font-weight: 600; }
.btn, button { font: inherit; }
.btn { display: inline-block; margin-top: 14px; padding: 9px 16px; border: 1px solid transparent; border-radius: 9px; background: var(--accent); color: #fff; font-weight: 600; font-size: .93rem; text-decoration: none; cursor: pointer; line-height: 1.3; }
.btn:hover { background: var(--accent-hover); color: #fff; text-decoration: none; }
.btn.secondary { background: var(--card); color: var(--text); border-color: var(--line); font-weight: 500; }
.btn.secondary:hover { background: var(--pill); color: var(--text); }
td .btn, li .btn, form.inline .btn { margin-top: 0; padding: 6px 12px; font-size: .88rem; }
details { margin: 10px 0; } summary { cursor: pointer; font-weight: 600; }

/* ---- tables ---- */
table { width: 100%; border-collapse: collapse; margin: 10px 0; font-size: .94rem; }
th { text-align: left; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; background: var(--pill); }
th:first-child { border-radius: 9px 0 0 9px; } th:last-child { border-radius: 0 9px 9px 0; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
tbody tr:hover td { background: color-mix(in srgb, var(--accent) 4%, transparent); }
main.card { overflow-x: auto; }

/* ---- cards ---- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 24px 26px; }
.card.narrow { max-width: 440px; }
body.shell > main.card { max-width: 1140px; margin: 24px auto; }
body.shell > main.card.narrow { margin-left: auto; margin-right: auto; }
body.shell > main { padding-left: 16px; padding-right: 16px; }

/* ---- sign-in and other pages without the frame ---- */
body.bare { padding: 16px; background: linear-gradient(180deg, var(--nav-bg) 0, var(--nav-bg-2) 280px, var(--bg) 280px); min-height: 100vh; }
body.bare .card { max-width: 900px; margin: 56px auto 24px; }
body.bare .card.narrow { max-width: 420px; }
body.bare h1 { font-size: 1.5rem; }

/* ---- home ---- */
.hero { position: relative; overflow: hidden; border-radius: 14px; padding: 28px 30px 30px; margin-bottom: 18px; color: #fff; background: linear-gradient(120deg, var(--nav-bg), var(--nav-bg-2) 55%, #2f62d8); box-shadow: var(--shadow); }
.hero::after { content: ""; position: absolute; right: 0; bottom: 0; width: 46%; height: 78%; background: linear-gradient(160deg, rgba(255, 255, 255, .13), rgba(255, 255, 255, .03)); clip-path: polygon(0 100%, 28% 38%, 46% 66%, 70% 14%, 100% 62%, 100% 100%); pointer-events: none; }
.hero h1 { color: #fff; margin: 0 0 6px; font-size: 1.75rem; }
.hero p { margin: 4px 0 0; color: rgba(255, 255, 255, .88); position: relative; z-index: 1; }
.hero a { color: #fff; text-decoration: underline; }
.hero .alert { margin-top: 12px; display: inline-block; background: var(--ink-orange); color: #fff; border-radius: 9px; padding: 6px 12px; text-decoration: none; font-weight: 600; position: relative; z-index: 1; }
.quick-cards, .stat-tiles, .panels { display: grid; gap: 14px; margin-bottom: 18px; }
.quick-cards { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.stat-tiles { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.panels { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); align-items: start; }
.quick-card { display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 14px 16px; color: var(--text); text-decoration: none; }
.quick-card:hover { text-decoration: none; border-color: var(--accent); color: var(--text); }
.quick-card b { display: block; font-size: .95rem; color: var(--text); } .quick-card > span:last-child > span { color: var(--muted); font-size: .8rem; }
.qc-icon { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 11px; }
.qc-icon .ic { width: 20px; height: 20px; }
.t-blue { background: var(--tint-blue); color: var(--ink-blue); } .t-green { background: var(--tint-green); color: var(--ink-green); }
.t-purple { background: var(--tint-purple); color: var(--ink-purple); } .t-orange { background: var(--tint-orange); color: var(--ink-orange); } .t-red { background: var(--tint-red); color: var(--ink-red); }
.stat-tile { display: block; border-radius: 14px; padding: 14px 16px; text-decoration: none; }
.stat-tile:hover { text-decoration: none; filter: brightness(.97); }
.stat-tile b { display: block; font-size: 1.9rem; line-height: 1.1; } .stat-tile span { font-size: .82rem; font-weight: 600; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 16px 20px; }
.panel h2 { margin: 0 0 8px; font-size: 1.02rem; }
.panel ul { margin: 0; padding-left: 18px; }
.panel p:last-child { margin-bottom: 0; }
.chip { display: inline-block; padding: 1px 9px; border-radius: 999px; background: var(--pill); font-size: .78rem; font-weight: 600; color: var(--muted); }
.section-title { font-size: 1.1rem; margin: 6px 0 10px; }
body.shell > main:not(.card) { max-width: 1520px; margin: 0 auto; padding: 18px 20px 40px; }
.stat-tile b { font-size: 1.35rem; }
input[type=date], input[type=time], input[type=number], input[type=datetime-local], input[type=month] { width: auto !important; }
select, input[type=date], input[type=time], input[type=number] { margin: 4px 6px 4px 0; }
td select, td input, li select, li input { margin: 0; }
