/* NiyamHR — SchoolFeel UI language (sidebar / fonts / logo), HRMS logic unchanged.
   Themes map to SchoolFeel: sky→royal, teal→campus, navy→heritage, indigo→indigo */

:root,
[data-theme="sky"] {
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Noto Sans Devanagari", sans-serif;
  --font-head: var(--font);
  --font-display: var(--font-head);
  --font-ui: var(--font);
  --bg: #f4f6fb;
  --bg-soft: #eef2f8;
  --surface: #ffffff;
  --surface-2: #f8fafd;
  --text: #0f172a;
  --text-soft: #1e293b;
  --muted: #64748b;
  --line: #e3e8f2;
  --line-strong: #cbd5e1;
  --primary: #1e3a8a;
  --primary-hover: #152a66;
  --primary-strong: #152a66;
  --primary-soft: #e8edfb;
  --primary-soft-2: #d5def5;
  --on-primary: #ffffff;
  --accent: #d4a017;
  --on-accent: #1b1300;
  --ok: #15803d;
  --ok-soft: #dcfce7;
  --warn: #b45309;
  --warn-soft: #fef3c7;
  --danger: #b91c1c;
  --sidebar: #13235a;
  --sidebar-solid: #13235a;
  --sidebar-text: #c9d4f2;
  --sidebar-muted: #7f8fc0;
  --sidebar-border: transparent;
  --sidebar-hover: color-mix(in srgb, #c9d4f2 8%, transparent);
  --sidebar-active-bg: rgba(212, 160, 23, 0.16);
  --sidebar-active: #f5c542;
  --sidebar-ico: #c9d4f2;
  --hero-wash: radial-gradient(900px 420px at 88% -8%, rgba(30, 58, 138, 0.12), transparent 55%),
    radial-gradient(700px 380px at 5% 20%, rgba(212, 160, 23, 0.1), transparent 50%),
    linear-gradient(180deg, #f8fafd 0%, #f4f6fb 45%, #eef2f8 100%);
}

[data-theme="teal"] {
  --primary: #0f766e;
  --primary-hover: #0b5952;
  --primary-strong: #0b5952;
  --primary-soft: #e3f4f1;
  --primary-soft-2: #cceae4;
  --accent: #f59e0b;
  --on-accent: #1f1300;
  --bg: #f4f8f7;
  --bg-soft: #e8f2ef;
  --line: #e1ebe8;
  --sidebar: #ffffff;
  --sidebar-solid: #ffffff;
  --sidebar-text: #334155;
  --sidebar-muted: #94a3b8;
  --sidebar-border: #e1ebe8;
  --sidebar-hover: color-mix(in srgb, #334155 8%, transparent);
  --sidebar-active-bg: #e3f4f1;
  --sidebar-active: #0f766e;
  --sidebar-ico: #0f766e;
  --hero-wash: radial-gradient(900px 420px at 88% -8%, rgba(15, 118, 110, 0.12), transparent 55%),
    linear-gradient(180deg, #f7fffc 0%, #f4f8f7 45%, #e8f2ef 100%);
}

[data-theme="navy"] {
  --font-head: Georgia, "Times New Roman", serif;
  --font-display: var(--font-head);
  --primary: #8b1e3f;
  --primary-hover: #6b1630;
  --primary-strong: #6b1630;
  --primary-soft: #f7e8ed;
  --primary-soft-2: #efd5de;
  --accent: #b7791f;
  --on-accent: #1b1300;
  --bg: #faf6ef;
  --bg-soft: #f3ece1;
  --surface: #fffdf9;
  --surface-2: #fbf7f0;
  --text: #2a1a12;
  --text-soft: #3d2a1f;
  --muted: #7c6a5c;
  --line: #ece3d6;
  --sidebar: #4a0f22;
  --sidebar-solid: #4a0f22;
  --sidebar-text: #ecd5dc;
  --sidebar-muted: #b38593;
  --sidebar-border: transparent;
  --sidebar-hover: rgba(255, 255, 255, 0.08);
  --sidebar-active-bg: rgba(255, 255, 255, 0.1);
  --sidebar-active: #ffd58a;
  --sidebar-ico: #ecd5dc;
  --hero-wash: radial-gradient(900px 420px at 88% -8%, rgba(139, 30, 63, 0.1), transparent 55%),
    linear-gradient(180deg, #fffdf9 0%, #faf6ef 45%, #f3ece1 100%);
}

[data-theme="indigo"] {
  --primary: #4f46e5;
  --primary-hover: #3730a3;
  --primary-strong: #3730a3;
  --primary-soft: #eef2ff;
  --primary-soft-2: #e0e7ff;
  --accent: #06b6d4;
  --on-accent: #ffffff;
  --bg: #f5f6fa;
  --bg-soft: #eceef5;
  --line: #e6e8f0;
  --sidebar: #0f172a;
  --sidebar-solid: #0f172a;
  --sidebar-text: #cbd5e1;
  --sidebar-muted: #64748b;
  --sidebar-border: transparent;
  --sidebar-hover: rgba(255, 255, 255, 0.06);
  --sidebar-active-bg: #1e293b;
  --sidebar-active: #ffffff;
  --sidebar-ico: #cbd5e1;
  --hero-wash: radial-gradient(900px 420px at 88% -8%, rgba(79, 70, 229, 0.12), transparent 55%),
    linear-gradient(180deg, #fafaff 0%, #f5f6fa 45%, #eceef5 100%);
}

:root {
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 4px 14px rgba(15, 23, 42, 0.05);
  --shadow-lg: 0 22px 50px rgba(15, 23, 42, 0.1);
  --radius: 12px;
  --radius-sm: 9px;
  --radius-pill: 999px;
  --max: 1160px;
  --focus: 0 0 0 3px color-mix(in srgb, var(--primary) 22%, transparent);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-ui);
  color: var(--text);
  background: var(--bg);
  line-height: 1.45;
  min-height: 100vh;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); }

h1, h2, h3, .brand-mark {
  font-family: var(--font-display);
  letter-spacing: -0.025em;
  line-height: 1.2;
  color: var(--text);
}

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

.atmosphere {
  background: var(--hero-wash);
  min-height: 100vh;
}

/* Header — full left-to-right bar */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(14px);
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(37, 99, 235, 0.04);
}

.nav-bar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 0.8rem 0;
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--text);
  font-weight: 700;
  flex-shrink: 0;
}

.brand-mark { font-size: 1.2rem; font-weight: 700; }

.crest {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: inline-grid;
  place-items: center;
  flex: none;
  background: var(--accent, #d4a017);
  color: var(--on-accent, #1b1300);
  font: 800 15px var(--font-display);
  letter-spacing: 0.5px;
}
.brand-logo,
.crest-logo {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: block;
  flex: none;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.18);
  object-fit: cover;
}
.login-art-brand .crest-logo {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.22);
}
.app-sidebar .crest-logo {
  width: 40px;
  height: 40px;
}
.crest-sm {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  font-size: 13px;
}
.brand-dot,
.logo-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--accent, #d4a017);
  color: var(--on-accent, #1b1300);
  display: inline-grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 800;
  flex: none;
}
.brand-dot::after { content: "NH"; }

.nav-center {
  display: flex;
  justify-content: center;
  position: relative;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.35rem 1.4rem;
}

.nav-links a {
  color: var(--text-soft);
  font-size: 0.92rem;
  font-weight: 600;
  padding: 0.25rem 0;
}

.nav-links a:hover { color: var(--primary); }

.nav-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  flex-shrink: 0;
}

.nav-links .mobile-only { display: none; }

.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.7rem;
  font: inherit;
  cursor: pointer;
}

.nav-actions { display: flex; align-items: center; gap: 0.55rem; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border-radius: var(--radius-pill);
  padding: 0.68rem 1.15rem;
  font: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { box-shadow: var(--shadow-sm); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); color: #fff; }
.btn-secondary { background: var(--surface); border-color: var(--line); color: var(--text-soft); }
.btn-secondary:hover { border-color: var(--line-strong); color: var(--text); }
.btn-soft { background: var(--primary-soft); color: var(--primary-hover); border-color: var(--primary-soft-2); }
.btn-block { width: 100%; }
.btn-sm { padding: 0.45rem 0.85rem; font-size: 0.82rem; }
.btn-lg { padding: 0.82rem 1.25rem; font-size: 0.95rem; height: 46px; }

/* Marketing hero */
.hero {
  padding: 3.25rem 0 2.5rem;
}

.hero-grid {
  display: grid;
  gap: 2rem;
  align-items: center;
}

@media (min-width: 920px) {
  .hero-grid { grid-template-columns: 1.05fr 0.95fr; }
}

.hero-brand {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6.5vw, 4.1rem);
  font-weight: 750;
  margin: 0 0 0.7rem;
  letter-spacing: -0.04em;
}
.hero-brand span { color: var(--primary); }

.hero h1 {
  font-size: clamp(1.2rem, 2.4vw, 1.55rem);
  font-weight: 600;
  margin: 0 0 0.85rem;
  color: var(--text-soft);
}

.hero p {
  margin: 0 0 1.4rem;
  color: var(--muted);
  font-size: 1.02rem;
  max-width: 44ch;
}

.hero-cta { display: flex; flex-wrap: wrap; gap: 0.7rem; }

.hero-visual {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--line);
  aspect-ratio: 16 / 11;
  background: var(--primary-soft);
}

.hero-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-visual .float-chip {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.75rem 0.9rem;
  box-shadow: var(--shadow);
  font-size: 0.85rem;
}

.hero-visual .float-chip strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--primary);
}

.reveal { animation: fade-up 0.65s ease both; }
.reveal-delay { animation-delay: 0.1s; }
.reveal-delay-2 { animation-delay: 0.18s; }

@keyframes fade-up {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.section { padding: 3.25rem 0; }
.section-tight { padding: 2rem 0; }
.section-head { max-width: 40rem; margin-bottom: 1.75rem; }
.section-head h2 { margin: 0 0 0.5rem; font-size: clamp(1.45rem, 2.8vw, 1.95rem); }
.section-head p { margin: 0; color: var(--muted); }

.eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.feature-media-grid {
  display: grid;
  gap: 1rem;
}
@media (min-width: 800px) {
  .feature-media-grid { grid-template-columns: 1.1fr 0.9fr; }
}

.media-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.media-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.media-card .body { padding: 1.1rem 1.15rem 1.25rem; }
.media-card h3 { margin: 0 0 0.35rem; font-size: 1.1rem; }
.media-card p { margin: 0; color: var(--muted); font-size: 0.94rem; }

.layer-grid, .moat-grid, .price-grid {
  display: grid;
  gap: 0.9rem;
}
@media (min-width: 720px) {
  .moat-grid { grid-template-columns: repeat(2, 1fr); }
  .price-grid, .layer-grid { grid-template-columns: repeat(3, 1fr); }
}

.layer-item, .moat-item, .price-tier {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.15rem 1.2rem;
  box-shadow: var(--shadow-sm);
}
.layer-item h3, .moat-item h3, .price-tier h3 { margin: 0 0 0.4rem; font-size: 1.08rem; }
.layer-item p, .moat-item p, .price-tier p { margin: 0; color: var(--muted); font-size: 0.94rem; }
.price-tier .amount {
  font-family: var(--font-display);
  font-size: 1.85rem;
  margin: 0.45rem 0;
}
.price-tier.featured {
  border-color: var(--primary-soft-2);
  background: linear-gradient(180deg, #fff 0%, var(--primary-soft) 140%);
  box-shadow: var(--shadow);
}
.price-tier.featured .amount { color: var(--primary); }

.feature-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.75rem; }
.feature-list li {
  padding: 0.85rem 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text-soft);
  box-shadow: var(--shadow-sm);
}

.split { display: grid; gap: 1.75rem; }
@media (min-width: 860px) {
  .split-2 { grid-template-columns: 1.05fr 0.95fr; align-items: start; }
}

/* Auth */
.auth-shell {
  min-height: calc(100vh - 72px);
  display: grid;
  place-items: center;
  padding: 2.25rem 1rem;
}
.auth-panel {
  width: min(100%, 440px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.6rem 1.45rem 1.45rem;
  box-shadow: var(--shadow);
}
.auth-panel h1 { margin: 0 0 0.35rem; font-size: 1.65rem; }
.auth-panel .lede { color: var(--muted); margin: 0 0 1.25rem; }
.form-stack { display: grid; gap: 0.9rem; }
.field label {
  display: block;
  font-size: 0.8rem;
  font-weight: 650;
  margin-bottom: 0.35rem;
  color: var(--text-soft);
}
.field input, .field select, .field textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  padding: 0.72rem 0.85rem;
  font: inherit;
  color: var(--text);
  outline: none;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: color-mix(in srgb, var(--primary) 55%, #fff);
  background: #fff;
  box-shadow: var(--focus);
}
.field .errorlist, .errorlist {
  list-style: none; margin: 0.3rem 0 0; padding: 0; color: var(--danger); font-size: 0.8rem;
}
.form-meta {
  display: flex; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap;
  margin-top: 0.9rem; font-size: 0.88rem;
}
.messages { list-style: none; padding: 0; margin: 0 0 1rem; }
.messages li {
  padding: 0.7rem 0.85rem;
  border-radius: var(--radius-sm);
  background: var(--primary-soft);
  color: var(--primary-hover);
  font-size: 0.88rem;
  border: 1px solid var(--primary-soft-2);
}
.slug-preview { font-size: 0.82rem; color: var(--muted); margin-top: 0.35rem; }
.slug-preview strong { color: var(--primary); }

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.75rem 0;
  color: var(--muted);
  font-size: 0.88rem;
  background: color-mix(in srgb, var(--surface) 55%, transparent);
}
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; }
.footer-links { display: flex; gap: 1rem; flex-wrap: wrap; }
.footer-links a { color: var(--muted); }

/* ========== App shell ========== */
.app-body { background: var(--bg); }
.app-layout { display: grid; min-height: 100vh; }

/* Sidebar — SchoolFeel base.css (.sidebar / .nav / .crest) */
.app-sidebar {
  background: var(--sidebar);
  color: var(--sidebar-text);
  border-right: 1px solid var(--sidebar-border);
  padding: 18px 14px 14px 0;
  display: none;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
@media (min-width: 960px) {
  .app-sidebar {
    display: flex;
    flex-direction: column;
    gap: 14px;
    position: sticky;
    top: 0;
    height: 100vh;
    width: 100%;
  }
  .app-layout { grid-template-columns: 260px 1fr; }
}
.app-sidebar .brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 6px 4px 14px;
  color: var(--sidebar-text);
  text-decoration: none;
  border: 0;
  margin: 0;
  flex: none;
}
.app-sidebar .crest {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex: none;
  background: var(--accent);
  color: var(--on-accent, #1b1300);
  font: 800 15px "Segoe UI", system-ui, sans-serif;
  letter-spacing: 0.5px;
}
.app-sidebar .brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.app-sidebar .brand-name {
  font: 700 15px/1.25 "Segoe UI", system-ui, sans-serif;
  color: inherit;
  filter: brightness(1.25);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.app-sidebar .brand-sub {
  font-size: 11.5px;
  color: var(--sidebar-muted);
  font-weight: 400;
  line-height: 1.3;
}
.side-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: visible;
  padding: 0 0 0 14px;
  flex: 1 1 auto;
  min-height: 0;
}
.side-nav .nav-title {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sidebar-muted);
  padding: 12px 10px 5px;
}
.side-nav a {
  color: var(--sidebar-text);
  height: 35px;
  padding: 0 10px;
  border-radius: 9px;
  font-size: 13.5px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 11px;
  position: relative;
  line-height: 1.25;
  letter-spacing: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background 0.12s ease, color 0.12s ease;
}
.side-nav a:hover {
  background: var(--sidebar-hover);
  color: var(--sidebar-text);
}
.side-nav a.is-active {
  background: var(--sidebar-active-bg);
  color: var(--sidebar-active);
  font-weight: 650;
  box-shadow: none;
}
.side-nav a.is-active::before {
  content: "";
  position: absolute;
  left: -14px;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--sidebar-active);
  pointer-events: none;
  z-index: 2;
}
/* SchoolFeel .i — same as base.css */
.i {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}
.i.sm { width: 14px; height: 14px; }
.app-sidebar .sync {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--sidebar-muted);
  padding: 0 6px 0 14px;
  margin-top: auto;
  flex: none;
}
.app-sidebar .sync .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18);
  flex: none;
}

.app-main { min-width: 0; background: var(--bg); }
.app-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 1rem;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(10px);
}
.app-topbar .tenant-name {
  font-weight: 700;
  font-family: var(--font-display);
}
.role-pill {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--primary-hover);
  background: var(--primary-soft);
  border: 1px solid color-mix(in srgb, var(--primary) 22%, transparent);
  border-radius: var(--radius-pill);
  padding: 0.28rem 0.65rem;
}
.role-chip {
  margin: 0.35rem 0 0;
  font-size: 0.82rem;
  color: var(--muted);
}
.role-chip strong { color: var(--primary-hover); }

.org-grid {
  display: grid;
  gap: 1rem;
}
@media (min-width: 900px) {
  .org-grid { grid-template-columns: 1fr 1fr; }
}
.muted-line {
  color: var(--muted);
  font-size: 0.78rem;
  margin-top: 0.15rem;
}
.check-row {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 600;
  cursor: pointer;
}
.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.action-cells {
  white-space: nowrap;
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}
.punch-box {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  align-items: flex-start;
  padding: 0.35rem 0.15rem 0.15rem;
}
.punch-list {
  margin: 0.45rem 0 0;
  padding-left: 1.1rem;
  color: var(--text-soft);
  font-size: 0.88rem;
}
.punch-list li { margin: 0.2rem 0; }
.top-search {
  flex: 1;
  max-width: 420px;
  display: none;
}
@media (min-width: 720px) { .top-search { display: block; } }
.top-search input {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--bg);
  border-radius: var(--radius-pill);
  padding: 0.55rem 0.95rem;
  font: inherit;
  color: var(--text);
}

.app-content {
  padding: 0.55rem 1rem 1.35rem;
  max-width: 1240px;
}

.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}
.page-title {
  margin: 0;
  font-size: clamp(1.2rem, 2vw, 1.45rem);
}
.page-lede {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  max-width: 52rem;
}
.section-label {
  font-size: 0.9rem;
  margin: 0 0 0.55rem;
  color: var(--text-soft);
  font-weight: 650;
}

.welcome-row {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: flex-start;
  margin-bottom: 0.75rem;
}
.welcome-row h1 { margin: 0; font-size: clamp(1.2rem, 2vw, 1.45rem); }
.welcome-row p { margin: 0.2rem 0 0; color: var(--muted); }

.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.65rem;
  margin-bottom: 0.85rem;
}
.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.7rem 0.85rem;
  box-shadow: var(--shadow-sm);
}
.stat .label { color: var(--muted); font-size: 0.72rem; font-weight: 650; text-transform: uppercase; letter-spacing: 0.03em; }
.stat .value {
  font-family: var(--font-display);
  font-size: 1.35rem;
  margin-top: 0.15rem;
  color: var(--text);
}
.stat .trend {
  margin-top: 0.25rem;
  font-size: 0.74rem;
  color: var(--ok);
  font-weight: 600;
}

.hero-card {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: 1.2fr 1fr;
  background: linear-gradient(135deg, var(--primary-soft) 0%, var(--surface) 55%);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.95rem 1.05rem;
  margin-bottom: 0.85rem;
  box-shadow: var(--shadow-sm);
}
@media (max-width: 720px) {
  .hero-card { grid-template-columns: 1fr; }
}
.hero-kicker {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.hero-status {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text);
  margin-top: 0.2rem;
}
.shift-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.65rem;
}
.shift-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.75rem 0.85rem;
}
.shift-code {
  font-size: 0.7rem;
  font-weight: 750;
  color: var(--primary);
  letter-spacing: 0.04em;
}
.shift-name { font-weight: 700; margin-top: 0.15rem; }
.shift-time { font-size: 0.88rem; color: var(--text-soft); margin-top: 0.2rem; }
.info-strip {
  background: var(--primary-soft);
  border: 1px solid color-mix(in srgb, var(--primary) 18%, transparent);
  border-radius: 10px;
  padding: 0.55rem 0.8rem;
  font-size: 0.86rem;
  margin-bottom: 0.85rem;
  color: var(--text-soft);
}
.rule-list {
  margin: 0;
  padding: 0.65rem 0.85rem 0.85rem 1.35rem;
  font-size: 0.88rem;
  color: var(--text-soft);
}
.rule-list li { margin: 0.3rem 0; }
.row-muted { opacity: 0.62; }

[x-cloak] { display: none !important; }

.accordion {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.acc-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.acc-item.is-open {
  border-color: color-mix(in srgb, var(--primary) 28%, var(--line));
  box-shadow: 0 8px 20px color-mix(in srgb, var(--primary) 10%, transparent);
}
.acc-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.7rem 0.85rem;
  background: transparent;
  border: 0;
  cursor: pointer;
  font: inherit;
  color: var(--text);
  text-align: left;
}
.acc-trigger:hover { background: var(--bg-soft); }
.acc-title {
  flex: 1;
  font-weight: 700;
  font-size: 0.92rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.acc-actions {
  display: inline-flex;
  gap: 0.35rem;
  flex-shrink: 0;
}
.acc-chevron {
  width: 0.55rem;
  height: 0.55rem;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 0.15s ease;
  margin-left: 0.15rem;
  flex-shrink: 0;
}
.acc-item.is-open .acc-chevron {
  transform: rotate(-135deg);
  margin-top: 0.2rem;
}
.acc-panel {
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 92%, var(--bg));
}
.acc-panel .empty { margin: 0; border: 0; border-radius: 0; }

.approvals-panel .panel-head { border-bottom: 0; }
.tab-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0 0.75rem 0.55rem;
  border-bottom: 1px solid var(--line);
}
.tab-btn {
  border: 1px solid var(--line);
  background: var(--bg-soft);
  color: var(--text-soft);
  border-radius: var(--radius-pill);
  padding: 0.35rem 0.75rem;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 650;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.tab-btn:hover { border-color: color-mix(in srgb, var(--primary) 35%, var(--line)); color: var(--text); }
.tab-btn.is-active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.tab-count {
  font-size: 0.72rem;
  font-weight: 750;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: color-mix(in srgb, currentColor 14%, transparent);
}
.tab-btn.is-active .tab-count {
  background: rgba(255, 255, 255, 0.22);
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}
.panel-head h2 { margin: 0; font-size: 0.98rem; }
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
table.data th, table.data td {
  text-align: left;
  padding: 0.82rem 1rem;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
table.data th {
  color: var(--muted);
  font-weight: 700;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: #fbfcfe;
}
table.data tr:hover td { background: #f8fafc; }
.empty { padding: 1.5rem 1rem; color: var(--muted); }

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: var(--radius-pill);
  padding: 0.18rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 700;
}
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-muted { background: var(--bg-soft); color: var(--muted); }

.chip-row { display: flex; flex-wrap: wrap; gap: 0.45rem; margin: 0.85rem 0 1.25rem; }
.chip {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius-pill);
  padding: 0.32rem 0.7rem;
  font-size: 0.8rem;
  color: var(--text-soft);
}

.module-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
}
.module-link {
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
  color: var(--text);
  box-shadow: var(--shadow-sm);
}
.module-link:hover {
  border-color: var(--primary-soft-2);
  box-shadow: var(--shadow);
  color: var(--text);
}
.module-link .code { color: var(--primary); font-size: 0.72rem; font-weight: 750; }
.module-link h3 { margin: 0.35rem 0 0.15rem; font-size: 1rem; }

/* Theme picker */
.theme-grid {
  display: grid;
  gap: 0.9rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.theme-option {
  border: 2px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: var(--surface);
  cursor: pointer;
  text-align: left;
  padding: 0;
  font: inherit;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.theme-option:hover, .theme-option.is-selected {
  border-color: var(--primary);
  box-shadow: var(--shadow);
}
.theme-option img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  object-position: top;
}
.theme-option .meta { padding: 0.75rem 0.85rem 0.9rem; }
.theme-option .meta strong { display: block; margin-bottom: 0.15rem; }
.theme-option .meta span { color: var(--muted); font-size: 0.82rem; }

.mobile-nav {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--line);
  background: var(--sidebar-solid, var(--surface));
}
@media (min-width: 960px) { .mobile-nav { display: none; } }
.mobile-nav a {
  flex: 0 0 auto;
  border: 1px solid var(--sidebar-border, var(--line));
  border-radius: var(--radius-pill);
  padding: 0.32rem 0.65rem;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--sidebar-text, var(--text-soft));
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.mobile-nav .nav-ico {
  width: 1rem;
  height: 1rem;
  display: inline-flex;
  color: var(--sidebar-ico, var(--primary));
}
.mobile-nav .nav-ico svg {
  width: 1rem;
  height: 1rem;
}

@media (max-width: 900px) {
  .nav-bar {
    grid-template-columns: 1fr auto;
  }
  .nav-center {
    order: 3;
    grid-column: 1 / -1;
    justify-content: stretch;
  }
  .nav-toggle { display: inline-flex; margin-left: auto; }
  .nav-right { display: none; }
  .nav-links {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0.55rem;
    margin-top: 0.65rem;
    padding: 0.85rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow);
  }
  .nav-links.is-open { display: flex; }
  .nav-links .mobile-only { display: inline-flex; width: fit-content; }
}

/* Colourful marketing extras */
.hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 1.15rem;
}
.hero-pills span {
  background: #fff;
  border: 1px solid var(--primary-soft-2);
  color: var(--primary-hover);
  border-radius: var(--radius-pill);
  padding: 0.35rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 650;
}

.color-strip {
  background: linear-gradient(90deg, #2563eb, #38bdf8 45%, #34d399);
  color: #fff;
  padding: 1.35rem 0;
}
.strip-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  text-align: center;
}
.strip-grid strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.65rem;
}
.strip-grid span { font-size: 0.85rem; opacity: 0.92; }
@media (max-width: 720px) {
  .strip-grid { grid-template-columns: repeat(2, 1fr); }
}

.section-alt {
  background: linear-gradient(180deg, rgba(219, 234, 254, 0.45), rgba(244, 247, 254, 0.2));
}

.info-steps {
  display: grid;
  gap: 0.9rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.info-card {
  border-radius: 18px;
  padding: 1.2rem 1.15rem;
  border: 1px solid transparent;
  box-shadow: var(--shadow-sm);
  min-height: 160px;
}
.info-card .step {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  margin-bottom: 0.55rem;
}
.info-card h3 { margin: 0 0 0.4rem; font-size: 1.08rem; }
.info-card p { margin: 0; color: var(--text-soft); font-size: 0.92rem; }
.info-card.c-blue { background: #eff6ff; border-color: #bfdbfe; }
.info-card.c-sky { background: #f0f9ff; border-color: #bae6fd; }
.info-card.c-mint { background: #ecfdf5; border-color: #a7f3d0; }
.info-card.c-lavender { background: #f5f3ff; border-color: #ddd6fe; }
.info-card.c-blue .step { color: #1d4ed8; }
.info-card.c-sky .step { color: #0284c7; }
.info-card.c-mint .step { color: #059669; }
.info-card.c-lavender .step { color: #7c3aed; }

/* Auth pages — SchoolFeel split (left art + right form), theme tokens */
.auth-page {
  min-height: 100vh;
  background: var(--surface);
}

.login {
  display: grid;
  grid-template-columns: 1fr;
  min-height: 100vh;
}
@media (min-width: 960px) {
  .login { grid-template-columns: 1.1fr 1fr; }
}

.login-art {
  background: linear-gradient(150deg, var(--primary-strong), var(--primary));
  color: #fff;
  padding: 40px 28px 32px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  position: relative;
  overflow: hidden;
}
@media (min-width: 960px) {
  .login-art { padding: 48px 56px; min-height: 100vh; }
}
.login-art::after {
  content: "";
  position: absolute;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  right: -180px;
  bottom: -200px;
  background: rgba(255, 255, 255, 0.07);
  pointer-events: none;
}
.login-art-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  text-decoration: none;
  position: relative;
  z-index: 1;
  width: fit-content;
}
.login-art-brand .crest {
  background: var(--accent);
  color: var(--on-accent);
}
.art-title {
  display: block;
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  line-height: 1.25;
}
.art-sub {
  display: block;
  opacity: 0.75;
  font-size: 12.5px;
  font-weight: 400;
  margin-top: 2px;
}
.art-hero {
  position: relative;
  z-index: 1;
  margin-top: 12px;
}
@media (min-width: 960px) {
  .art-hero { margin-top: 48px; }
}
.art-hero h1 {
  margin: 0;
  font: 800 clamp(1.7rem, 3.2vw, 2.5rem) / 1.15 var(--font-head);
  letter-spacing: -0.02em;
  color: #fff;
}
.art-hero p {
  margin: 14px 0 0;
  opacity: 0.82;
  font-size: 16px;
  line-height: 1.55;
  max-width: 440px;
  color: #fff;
}
.art-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  max-width: 460px;
  position: relative;
  z-index: 1;
}
.art-grid div {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  padding: 14px;
}
.art-grid b {
  font-size: 16px;
  font-weight: 700;
  display: block;
  color: #fff;
  margin-bottom: 4px;
}
.art-grid span {
  opacity: 0.75;
  font-size: 12.5px;
  line-height: 1.35;
  color: #fff;
}
.art-foot {
  margin-top: auto;
  opacity: 0.65;
  font-size: 12.5px;
  position: relative;
  z-index: 1;
}

.login-form {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px 40px;
  background: var(--surface);
}
@media (min-width: 960px) {
  .login-form { padding: 40px; }
}
.form {
  width: min(100%, 380px);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.form.form-signup { width: min(100%, 520px); }

/* Signup: fit viewport — no page scrollbar */
.auth-page--signup {
  height: 100vh;
  overflow: hidden;
}
.auth-page--signup .login {
  height: 100vh;
  min-height: 0;
}
/* Left art matches login (same padding, hero, cards) */
.auth-page--signup .login-art {
  min-height: 0;
  height: 100%;
}
.auth-page--signup .login-form {
  padding: 20px 28px;
  align-items: center;
  overflow: hidden;
}
.auth-page--signup .form-signup {
  gap: 10px;
  width: min(100%, 500px);
}
.auth-page--signup .login-h {
  font-size: 22px;
  margin-bottom: 4px;
}
.auth-page--signup .form > div > .muted {
  font-size: 13px;
}
.auth-page--signup .form-section-label {
  margin-top: 0.1rem;
  margin-bottom: -0.15rem;
  font-size: 0.7rem;
}
.auth-page--signup .form-grid-2 {
  gap: 0.65rem;
}
.auth-page--signup .field label {
  margin-bottom: 0.25rem;
  font-size: 0.75rem;
}
.auth-page--signup .field input,
.auth-page--signup .field select,
.auth-page--signup .field textarea {
  padding: 0.52rem 0.7rem;
}
.auth-page--signup .form-meta {
  margin-top: 0.15rem;
  font-size: 0.84rem;
}
.auth-page--signup .form-meta-inline {
  justify-content: center;
  text-align: center;
  display: block;
  margin: 0;
}
.auth-page--signup .btn-block {
  height: 42px;
  padding: 0.6rem 1rem;
}
@media (max-width: 959px) {
  .auth-page--signup {
    height: auto;
    overflow: auto;
  }
  .auth-page--signup .login {
    height: auto;
  }
  .auth-page--signup .login-form {
    overflow: visible;
  }
}

.login-h {
  margin: 0 0 6px;
  font-size: 26px;
  font-weight: 750;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.form > div > .muted {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}
.login-note {
  padding: 12px 14px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--primary-soft);
  border: 1px solid color-mix(in srgb, var(--primary) 18%, var(--line));
  border-radius: 12px;
  font-size: 13px;
  color: var(--text-soft);
  line-height: 1.4;
}
.login-note b {
  display: block;
  margin-bottom: 2px;
  color: var(--text);
}
.login-note-ico {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--primary);
  color: var(--on-primary);
  font-size: 14px;
  font-weight: 700;
}
.msg.error {
  background: color-mix(in srgb, var(--danger) 10%, #fff);
  border: 1px solid color-mix(in srgb, var(--danger) 28%, #fff);
  color: var(--danger);
  border-radius: 10px;
  padding: 0.65rem 0.8rem;
  font-size: 0.88rem;
}

/* Legacy / password-reset centered cards */
.auth-center {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1rem 2rem;
  gap: 1rem;
  background: var(--hero-wash);
}
.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text);
  font-weight: 700;
}
.auth-card-center {
  width: min(100%, 560px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 1.55rem 1.4rem 1.35rem;
  box-shadow: var(--shadow-lg);
}
.auth-card-narrow { width: min(100%, 420px); }
.auth-card-center h1 { margin: 0 0 0.35rem; font-size: 1.7rem; }
.auth-card-center .lede { color: var(--muted); margin: 0 0 1.15rem; }
.auth-card {
  width: min(100%, 560px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 1.5rem 1.35rem 1.35rem;
  box-shadow: var(--shadow-lg);
}
.auth-card-sm { width: min(100%, 440px); }
.auth-card h1 { margin: 0 0 0.35rem; font-size: 1.7rem; }
.auth-card .lede { color: var(--muted); margin: 0 0 1.15rem; }
.form-section-label {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--primary);
  margin-top: 0.35rem;
}
.form-grid-2 {
  display: grid;
  gap: 0.85rem;
}
@media (min-width: 640px) {
  .form-grid-2 { grid-template-columns: 1fr 1fr; }
  .form-grid-span { grid-column: 1 / -1; }
}

/* ---------- Dashboard analytics ---------- */
.dash-hero {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1.35fr 1fr;
  background: linear-gradient(135deg, var(--primary-soft) 0%, var(--surface) 48%, color-mix(in srgb, var(--ok) 8%, var(--surface)) 100%);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.05rem 1.15rem;
  margin-bottom: 0.9rem;
  box-shadow: var(--shadow-sm);
}
@media (max-width: 900px) {
  .dash-hero { grid-template-columns: 1fr; }
}
.dash-hero h1 {
  margin: 0.15rem 0 0;
  font-size: clamp(1.25rem, 2.2vw, 1.55rem);
  font-family: var(--font-display);
}
.dash-hero .lede { margin: 0.35rem 0 0; color: var(--text-soft); font-size: 0.92rem; max-width: 42rem; }
.dash-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.85rem;
  margin-top: 0.75rem;
  font-size: 0.8rem;
  color: var(--muted);
}
.dash-hero-meta strong { color: var(--text); font-weight: 650; }
.dash-pulse {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.55rem;
}
.dash-pulse-item {
  background: color-mix(in srgb, var(--surface) 88%, white);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.55rem 0.7rem;
}
.dash-pulse-item .k { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); font-weight: 700; }
.dash-pulse-item .v { font-family: var(--font-display); font-size: 1.2rem; font-weight: 700; margin-top: 0.1rem; }
.dash-pulse-item .s { font-size: 0.72rem; color: var(--muted); margin-top: 0.1rem; }

.health-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 0.5rem;
  margin-bottom: 0.9rem;
}
.health-chip {
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.55rem 0.65rem;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.health-chip:hover { border-color: color-mix(in srgb, var(--primary) 45%, var(--line)); transform: translateY(-1px); }
.health-chip .name { font-size: 0.72rem; font-weight: 750; text-transform: uppercase; letter-spacing: 0.03em; color: var(--muted); }
.health-chip .metric { font-size: 0.88rem; font-weight: 650; margin-top: 0.2rem; color: var(--text); }
.health-chip.is-ok .metric { color: var(--ok); }
.health-chip.is-bad .metric { color: #b45309; }

.alert-stack { display: grid; gap: 0.4rem; margin-bottom: 0.9rem; }
.alert-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  border-radius: 10px;
  padding: 0.5rem 0.75rem;
  font-size: 0.86rem;
  border: 1px solid var(--line);
  background: var(--surface);
}
.alert-item.warn { background: color-mix(in srgb, #f59e0b 12%, var(--surface)); border-color: color-mix(in srgb, #f59e0b 28%, var(--line)); }
.alert-item.danger { background: color-mix(in srgb, #ef4444 10%, var(--surface)); border-color: color-mix(in srgb, #ef4444 28%, var(--line)); }
.alert-item.info { background: var(--primary-soft); border-color: color-mix(in srgb, var(--primary) 22%, var(--line)); }

.dash-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 0.75rem;
  margin-bottom: 0.9rem;
}
.dash-span-4 { grid-column: span 4; }
.dash-span-5 { grid-column: span 5; }
.dash-span-6 { grid-column: span 6; }
.dash-span-7 { grid-column: span 7; }
.dash-span-8 { grid-column: span 8; }
.dash-span-12 { grid-column: span 12; }
@media (max-width: 1100px) {
  .dash-span-4, .dash-span-5, .dash-span-6, .dash-span-7, .dash-span-8 { grid-column: span 6; }
}
@media (max-width: 720px) {
  .dash-span-4, .dash-span-5, .dash-span-6, .dash-span-7, .dash-span-8, .dash-span-12 { grid-column: span 12; }
}

.chart-panel { margin: 0; height: 100%; }
.chart-panel .panel-body { padding: 0.75rem 0.9rem 0.95rem; }
.chart-empty { color: var(--muted); font-size: 0.86rem; padding: 0.5rem 0; }

.donut-wrap {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: center;
}
@media (max-width: 480px) {
  .donut-wrap { grid-template-columns: 1fr; justify-items: center; }
}
.donut {
  width: 132px;
  height: 132px;
  position: relative;
}
.donut svg { width: 132px; height: 132px; transform: rotate(-90deg); }
.donut-center {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
  pointer-events: none;
}
.donut-center .big {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 750;
  line-height: 1;
}
.donut-center .sub { font-size: 0.7rem; color: var(--muted); margin-top: 0.15rem; }
.legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35rem; }
.legend li {
  display: grid;
  grid-template-columns: 10px 1fr auto;
  gap: 0.45rem;
  align-items: center;
  font-size: 0.8rem;
}
.legend .swatch { width: 10px; height: 10px; border-radius: 3px; }
.legend .lbl { color: var(--text-soft); }
.legend .val { font-weight: 650; color: var(--text); font-variant-numeric: tabular-nums; }

.bar-list { display: grid; gap: 0.55rem; }
.bar-row { display: grid; gap: 0.2rem; }
.bar-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.8rem;
}
.bar-meta .lbl { color: var(--text-soft); font-weight: 550; }
.bar-meta .val { font-weight: 700; font-variant-numeric: tabular-nums; }
.bar-track {
  height: 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--line) 80%, var(--surface));
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  border-radius: 999px;
  min-width: 2px;
  transition: width 0.45s ease;
}

.spark-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.35rem;
  align-items: end;
  min-height: 88px;
  padding-top: 0.35rem;
}
.spark-col {
  display: grid;
  gap: 0.25rem;
  justify-items: center;
  align-content: end;
}
.spark-bar {
  width: 100%;
  max-width: 28px;
  border-radius: 6px 6px 3px 3px;
  background: linear-gradient(180deg, var(--primary), color-mix(in srgb, var(--primary) 55%, #0f172a));
  min-height: 4px;
}
.spark-lbl { font-size: 0.68rem; color: var(--muted); font-weight: 650; }
.spark-val { font-size: 0.72rem; font-weight: 700; font-variant-numeric: tabular-nums; }

.money-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.55rem;
}
.money-tile {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.55rem 0.65rem;
  background: color-mix(in srgb, var(--surface) 92%, var(--primary-soft));
}
.money-tile .k { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--muted); font-weight: 700; }
.money-tile .v { font-family: var(--font-display); font-size: 1.05rem; font-weight: 700; margin-top: 0.15rem; }

.stat .trend.is-muted { color: var(--muted); font-weight: 550; }
.stat .trend.is-warn { color: #b45309; }

/* bump css cache via query already in base */
