/* ============================================================
   Kampus — Institute Management ERP (Malaysia) · prototype styles
   Identity: deep indigo chrome · warm off-white paper · teal action
   ============================================================ */

/* DM Sans — self-hosted variable font (weights 100–1000), keeps the app offline */
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 100 1000;
  font-display: swap;
  src: url('fonts/DMSans-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'DM Sans';
  font-style: italic;
  font-weight: 100 1000;
  font-display: swap;
  src: url('fonts/DMSans-italic-latin.woff2') format('woff2');
}

:root {
  --indigo-950: #16143a;
  --indigo-900: #201d52;
  --indigo-850: #262263;
  --indigo-800: #2c2870;
  --indigo-100: #e4e2f6;
  --indigo-300: #b7b3e2;

  --paper: #f7f5f0;
  --card: #ffffff;
  --line: #e5e1d6;
  --line-soft: #eeebe2;

  --ink: #23213e;
  --ink-soft: #4c4963;
  --muted: #757088;

  --teal: #0e7c6f;
  --teal-700: #0a6156;
  --teal-100: #d9eeea;
  --teal-050: #ecf6f4;

  --ok-bg: #e2f2e7; --ok-fg: #1c6b3d;
  --warn-bg: #faf0d6; --warn-fg: #8a5f07;
  --bad-bg: #fae4e0; --bad-fg: #a93425;
  --info-bg: #e4edfa; --info-fg: #2d5fa7;
  --neu-bg: #edeae2; --neu-fg: #6e6a7c;
  --sens-bg: #f0e6f7; --sens-fg: #6f3f9e;

  --radius: 13px;
  --radius-sm: 9px;
  --radius-lg: 18px;
  --shadow: 0 1px 2px rgba(35, 33, 62, .04), 0 3px 10px -4px rgba(35, 33, 62, .08);
  --shadow-md: 0 2px 5px -1px rgba(35, 33, 62, .06), 0 12px 26px -10px rgba(35, 33, 62, .16);
  --shadow-pop: 0 14px 44px -10px rgba(22, 20, 58, .34);
  --ring: 0 0 0 3px var(--teal-100);
  --font: 'DM Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
/* the hidden attribute must always win, even over display:flex/grid layers */
[hidden] { display: none !important; }
body {
  font-family: var(--font);
  background: var(--paper);
  color: var(--ink);
  font-size: 14.5px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -.01em; }
p { margin: 0; }
button { font-family: inherit; }
a { color: var(--teal); }

:focus-visible {
  outline: 2.5px solid var(--teal);
  outline-offset: 2px;
  border-radius: 4px;
}

.money, .num { font-variant-numeric: tabular-nums; }

/* default size for every inline icon; contexts (nav, banners) may override */
svg.ic { width: 16px; height: 16px; flex: none; vertical-align: -3px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid var(--line); background: var(--card); color: var(--ink);
  border-radius: var(--radius-sm); padding: 8px 14px;
  font-size: 13.5px; font-weight: 600; cursor: pointer;
  transition: background .12s, border-color .12s, transform .05s;
  text-decoration: none;
}
.btn:hover { background: #fbfaf7; border-color: #d5d0c2; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--teal); border-color: var(--teal); color: #fff; box-shadow: 0 1px 2px rgba(10,97,86,.18), 0 6px 16px -8px rgba(10,97,86,.45); }
.btn.primary:hover { background: var(--teal-700); border-color: var(--teal-700); }
.btn.danger { background: #b23b2b; border-color: #b23b2b; color: #fff; }
.btn.danger:hover { background: #9a3122; }
.btn.quiet { background: transparent; border-color: transparent; color: var(--teal); }
.btn.quiet:hover { background: var(--teal-050); }
.btn.small { padding: 4.5px 10px; font-size: 12.5px; border-radius: 7px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn .ic { width: 15px; height: 15px; }
.btn.busy { opacity: .65; pointer-events: none; }

/* ---------- pills / chips ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2.5px 9px; border-radius: 999px;
  font-size: 11.5px; font-weight: 700; letter-spacing: .015em;
  white-space: nowrap;
}
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.ok   { background: var(--ok-bg);   color: var(--ok-fg); }
.pill.warn { background: var(--warn-bg); color: var(--warn-fg); }
.pill.bad  { background: var(--bad-bg);  color: var(--bad-fg); }
.pill.info { background: var(--info-bg); color: var(--info-fg); }
.pill.neu  { background: var(--neu-bg);  color: var(--neu-fg); }
.pill.sens { background: var(--sens-bg); color: var(--sens-fg); }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--neu-bg); color: var(--ink-soft);
  border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 600;
}

/* ---------- login / persona picker ---------- */
.login { display: grid; grid-template-columns: 1.05fr 1fr; min-height: 100vh; }

/* left brand panel */
.login-brand {
  position: relative; overflow: hidden;
  background: linear-gradient(158deg, var(--indigo-850) 0%, var(--indigo-950) 92%);
  color: #fff; padding: 52px 56px; display: flex; flex-direction: column;
}
.login-brand::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(120% 90% at 20% 0%, #000 30%, transparent 78%);
}
.login-brand > * { position: relative; z-index: 1; }
.logo-row { display: inline-flex; align-items: center; gap: 12px; align-self: flex-start; }
.logo-mark {
  width: 42px; height: 42px; border-radius: 11px; flex: none;
  background: var(--indigo-800); display: grid; place-items: center;
  box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.09);
}
.logo-mark svg { width: 22px; height: 22px; }
.logo-word { font-size: 21px; font-weight: 800; letter-spacing: -.02em; }
.logo-sub { font-size: 11px; color: var(--indigo-300); letter-spacing: .14em; text-transform: uppercase; margin-top: 2px; }
.brand-badge {
  display: inline-flex; align-items: center; gap: 8px; align-self: flex-start;
  margin-top: 46px; padding: 7px 15px; border-radius: 999px;
  background: rgba(43,179,163,.14); color: #6fe3d4;
  font-size: 11.5px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase;
}
.brand-badge .dot { width: 7px; height: 7px; border-radius: 50%; background: #2bb3a3; }
.login-brand h1 { font-size: clamp(30px, 3vw, 40px); line-height: 1.14; margin-top: 22px; letter-spacing: -.025em; max-width: 12ch; }
.login-brand .lede { color: var(--indigo-100); opacity: .82; margin-top: 18px; font-size: 15.5px; max-width: 42ch; }
.brand-feats { margin: 40px 0 0; padding: 0; list-style: none; display: grid; gap: 20px; }
.brand-feats li { display: flex; gap: 13px; align-items: flex-start; font-size: 14px; color: var(--indigo-100); }
.brand-feats .fic {
  width: 26px; height: 26px; flex: none; border-radius: 50%; background: rgba(43, 179, 163, .16);
  color: #2bb3a3; display: grid; place-items: center; margin-top: 1px;
}
.brand-feats .fic svg { width: 15px; height: 15px; }
.brand-feats b { display: block; color: #fff; margin-bottom: 2px; font-size: 14.5px; }
.login-brand .foot { margin-top: auto; font-size: 12px; color: var(--indigo-300); padding-top: 34px; }

/* right sign-in panel */
.login-main { display: grid; place-items: center; padding: 40px 30px; background: var(--paper); min-width: 0; }
.login-card { width: 100%; max-width: 452px; }
.signing-to { display: flex; align-items: center; gap: 12px; margin-bottom: 26px; }
.signing-to .st-mark {
  width: 44px; height: 44px; border-radius: 11px; flex: none; background: #fff;
  border: 1px solid var(--line); display: grid; place-items: center; font-weight: 800; color: var(--indigo-900); font-size: 14px;
}
.signing-to .st-label { font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); font-weight: 800; }
.signing-to .st-tenant { font-size: 14px; font-weight: 700; margin-top: 1px; }
.tenant-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: #eeebe2; border-radius: 11px; padding: 4px; margin-bottom: 28px; }
.tenant-seg button {
  border: 0; background: transparent; border-radius: 8px; padding: 9px 10px; cursor: pointer;
  font: inherit; font-size: 13px; font-weight: 700; color: var(--ink-soft); transition: background .12s, box-shadow .12s;
}
.tenant-seg button:hover { color: var(--ink); }
.tenant-seg button.on { background: #fff; color: var(--indigo-900); box-shadow: var(--shadow); }
.login-card h2 { font-size: 27px; letter-spacing: -.02em; }
.login-card .sub { color: var(--muted); margin-top: 6px; font-size: 14.5px; }
.login-form { margin-top: 26px; }
.login-form .field { margin-bottom: 15px; }
.login-form label { display: flex; justify-content: space-between; align-items: baseline; font-size: 12.5px; font-weight: 700; color: var(--ink-soft); margin-bottom: 6px; }
.login-form label a { font-size: 12px; font-weight: 600; }
.input-wrap { display: flex; align-items: center; gap: 9px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 0 13px; transition: border-color .12s, box-shadow .12s; }
.input-wrap:focus-within { border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-100); }
.input-wrap svg { width: 16px; height: 16px; color: var(--muted); flex: none; }
.input-wrap input { flex: 1; border: 0; outline: 0; background: transparent; font: inherit; font-size: 14.5px; padding: 12px 0; color: var(--ink); min-width: 0; }
.input-wrap .show-btn { border: 0; background: transparent; font: inherit; font-size: 12.5px; font-weight: 700; color: var(--muted); cursor: pointer; padding: 4px; }
.input-wrap .show-btn:hover { color: var(--teal-700); }
.btn.block { width: 100%; justify-content: center; }
.btn.lg { padding: 13px 20px; font-size: 15px; border-radius: 10px; }
.login-divider { display: flex; align-items: center; gap: 14px; margin: 26px 0 20px; color: var(--muted); font-size: 10.5px; letter-spacing: .16em; font-weight: 800; }
.login-divider::before, .login-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.continue-label { font-size: 13px; font-weight: 700; color: var(--ink-soft); margin-bottom: 12px; }
.role-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; }
.role-card {
  display: flex; flex-direction: column; align-items: center; gap: 7px; text-align: center;
  background: #fff; border: 1.5px solid var(--line); border-radius: 12px; padding: 13px 6px; cursor: pointer;
  transition: border-color .12s, box-shadow .12s, transform .08s; min-width: 0;
}
.role-card:hover { border-color: var(--teal); transform: translateY(-1px); box-shadow: var(--shadow); }
.role-card.on { border-color: var(--teal); background: var(--teal-050); box-shadow: 0 0 0 3px var(--teal-100); }
.role-card .rc-ic { width: 24px; height: 24px; color: var(--indigo-900); }
.role-card.on .rc-ic { color: var(--teal-700); }
.role-card .rc-ic svg { width: 24px; height: 24px; }
.role-card .rc-label { font-size: 11.5px; font-weight: 700; color: var(--ink); line-height: 1.2; }
.role-card .rc-sub { font-size: 10px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.role-preview { margin-top: 14px; font-size: 12px; color: var(--muted); line-height: 1.5; }
.role-preview b { color: var(--teal-700); }
.super-link { display: inline-block; margin-top: 18px; font-size: 13.5px; font-weight: 650; color: var(--ink-soft); text-decoration: none; cursor: pointer; }
.super-link:hover { color: var(--teal-700); }
.login-help { margin-top: 24px; font-size: 12px; color: var(--muted); }

/* ---------- app shell ---------- */
.shell { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.sidebar {
  background: linear-gradient(178deg, var(--indigo-900), var(--indigo-950) 92%);
  color: var(--indigo-100); display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; z-index: 30;
}
.side-brand { display: flex; gap: 11px; align-items: center; padding: 20px 18px 16px; }
.side-brand .logo-word { font-size: 18px; color: #fff; }
.side-brand .logo-mark { width: 34px; height: 34px; border-radius: 9px; }
.side-brand .logo-mark svg { width: 18px; height: 18px; }
.side-tenant {
  margin: 2px 14px 10px; padding: 11px 13px; border-radius: 11px;
  background: rgba(255,255,255,.055); border: 1px solid rgba(255,255,255,.09);
  font-size: 11.5px; color: var(--indigo-300);
}
.side-tenant b { display: block; color: #fff; font-size: 13px; font-weight: 700; margin-bottom: 1px; letter-spacing: -.01em; }
.nav { flex: 1; overflow-y: auto; padding: 6px 12px 12px; scrollbar-width: thin; }
.nav-group-label {
  font-size: 10px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase;
  color: var(--indigo-300); opacity: .65; padding: 15px 12px 6px;
}
.nav-item {
  display: flex; align-items: center; gap: 11px; width: 100%;
  background: none; border: 0; color: var(--indigo-100);
  padding: 9px 12px; margin: 1.5px 0; border-radius: 9px;
  font-size: 13.5px; font-weight: 600; cursor: pointer; text-align: left;
  position: relative; transition: background .12s, color .12s;
}
.nav-item svg { width: 17px; height: 17px; opacity: .7; flex: none; }
.nav-item span { flex: 1; min-width: 0; }
.nav-item:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav-item:hover svg { opacity: .95; }
.nav-item.on { background: linear-gradient(90deg, rgba(43,179,163,.16), rgba(44,40,112,.55)); color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); }
.nav-item.on svg { opacity: 1; color: #4fd8c8; }
.nav-item.on::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: #2bb3a3; }
.side-foot { padding: 12px 14px 16px; border-top: 1px solid rgba(255,255,255,.09); display: grid; gap: 8px; }
.userchip { display: flex; gap: 10px; align-items: center; }
.userchip .pc-av { width: 34px; height: 34px; font-size: 12px; }
.userchip .u-name { color: #fff; font-size: 13px; font-weight: 700; line-height: 1.2; }
.userchip .u-role { color: var(--indigo-300); font-size: 11.5px; }
.side-foot .btn {
  background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.14); color: #fff;
  justify-content: center; padding: 7px 10px; font-size: 12.5px;
}
.side-foot .btn:hover { background: rgba(255,255,255,.13); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 28px; background: rgba(247,245,240,.82); backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20;
}
.hamburger { display: none; }
.crumb { font-size: 17px; font-weight: 750; letter-spacing: -.015em; }
.crumb .sep { color: var(--muted); font-weight: 400; margin: 0 7px; }
.topbar .grow { flex: 1; }
.demo-tag { font-size: 10.5px; font-weight: 800; letter-spacing: .08em; color: var(--muted); background: rgba(0,0,0,.03); border: 1px solid var(--line); padding: 4px 10px; border-radius: 999px; }
.tenant-switch { display: flex; align-items: center; gap: 8px; }
.tenant-switch select {
  font: inherit; font-weight: 600; font-size: 13px; color: var(--ink);
  border: 1px solid var(--line); border-radius: 9px; padding: 8px 11px; background: var(--card);
  box-shadow: var(--shadow); cursor: pointer;
}
.tenant-switch select:hover { border-color: #d5d0c2; }
.content { padding: 28px; max-width: 1300px; width: 100%; margin: 0 auto; }

.page-head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head .ph-text { flex: 1; min-width: 220px; }
.page-head h2 { font-size: 24px; letter-spacing: -.025em; }
.page-head .ph-sub { color: var(--muted); margin-top: 4px; font-size: 14px; }
.page-head .ph-actions { display: flex; gap: 9px; flex-wrap: wrap; }

/* ---------- cards, stats, layout ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.card .card-head { display: flex; align-items: center; gap: 10px; padding: 15px 20px; border-bottom: 1px solid var(--line-soft); }
.card .card-head h3 { font-size: 14.5px; flex: 1; letter-spacing: -.01em; }
.card .card-body { padding: 18px 20px; }
.card.pad { padding: 20px; }
.stack { display: grid; gap: 18px; }
.cols-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat {
  position: relative; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 17px 18px; box-shadow: var(--shadow);
  transition: transform .1s, box-shadow .14s, border-color .12s;
}
.stat:hover { box-shadow: var(--shadow-md); border-color: #ddd8ca; }
.stat .s-label { font-size: 11px; color: var(--muted); font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.stat .s-value { font-size: 27px; font-weight: 800; margin-top: 7px; letter-spacing: -.03em; line-height: 1.05; }
.stat .s-sub { font-size: 12px; color: var(--muted); margin-top: 5px; }
.stat.accent::after, .stat.alert::after {
  content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 0 3px 3px 0;
}
.stat.accent::after { background: var(--teal); }
.stat.alert::after { background: #b23b2b; }
.stat.alert .s-value { color: #a93425; }

/* ---------- tables ---------- */
.tscroll { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th {
  text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .07em;
  color: var(--muted); font-weight: 700; padding: 10px 14px; border-bottom: 1px solid var(--line);
  white-space: nowrap; background: #fcfbf8;
}
.tbl td { padding: 11px 14px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr.rowlink { cursor: pointer; }
.tbl tr.rowlink:hover td { background: var(--teal-050); }
.tbl td.r, .tbl th.r { text-align: right; }
.t-main { font-weight: 650; }
.t-sub { font-size: 12px; color: var(--muted); margin-top: 1px; }
.avatar { width: 30px; height: 30px; border-radius: 50%; display: inline-grid; place-items: center; color: #fff; font-size: 11px; font-weight: 800; flex: none; }
.av-cell { display: flex; align-items: center; gap: 10px; }

.empty { padding: 34px 20px; text-align: center; color: var(--muted); font-size: 13.5px; }

/* ---------- banners ---------- */
.banner { display: flex; gap: 12px; padding: 13px 16px; border-radius: var(--radius-sm); font-size: 13.5px; margin-bottom: 18px; align-items: flex-start; line-height: 1.5; }
.banner svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.banner.info { background: var(--info-bg); color: var(--info-fg); }
.banner.warn { background: var(--warn-bg); color: var(--warn-fg); }
.banner.ok { background: var(--ok-bg); color: var(--ok-fg); }

/* ---------- tabs ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1.5px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tab {
  background: none; border: 0; border-bottom: 2.5px solid transparent; margin-bottom: -1.5px;
  padding: 9px 14px; font-size: 13.5px; font-weight: 650; color: var(--muted); cursor: pointer; white-space: nowrap;
}
.tab:hover { color: var(--ink); }
.tab.on { color: var(--teal-700); border-bottom-color: var(--teal); }
.tab .cnt { background: var(--neu-bg); border-radius: 999px; padding: 1px 7px; font-size: 11px; margin-left: 5px; }
.tab.on .cnt { background: var(--teal-100); color: var(--teal-700); }

/* ---------- segmented attendance control ---------- */
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg button {
  border: 0; background: var(--card); padding: 6px 13px; font-size: 12.5px; font-weight: 700;
  color: var(--muted); cursor: pointer; border-right: 1px solid var(--line-soft);
}
.seg button:last-child { border-right: 0; }
.seg button:hover { background: #f6f4ee; }
.seg button.on-P { background: var(--ok-bg); color: var(--ok-fg); }
.seg button.on-L { background: var(--warn-bg); color: var(--warn-fg); }
.seg button.on-A { background: var(--bad-bg); color: var(--bad-fg); }

/* ---------- kanban ---------- */
.kanban { display: grid; grid-template-columns: repeat(4, minmax(235px, 1fr)); gap: 14px; overflow-x: auto; align-items: start; }
.kcol { background: #f0ede5; border: 1px solid var(--line); border-radius: var(--radius); padding: 11px; min-width: 235px; }
.kcol-head { display: flex; align-items: center; gap: 8px; padding: 2px 4px 10px; }
.kcol-head h4 { font-size: 12.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-soft); flex: 1; }
.kcol-head .cnt { background: var(--card); border: 1px solid var(--line); border-radius: 999px; font-size: 11.5px; font-weight: 700; padding: 1px 8px; color: var(--muted); }
.kcard { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 12px 13px; margin-bottom: 9px; box-shadow: var(--shadow); }
.kcard .k-name { font-weight: 700; font-size: 13.5px; }
.kcard .k-meta { font-size: 12px; color: var(--muted); margin: 4px 0 9px; }
.kcard .k-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }

/* ---------- key-value ---------- */
.kv { display: grid; grid-template-columns: minmax(130px, 38%) 1fr; font-size: 13px; border: 1px solid var(--line-soft); border-radius: var(--radius-sm); overflow: hidden; }
.kv > div { padding: 8.5px 13px; border-bottom: 1px solid var(--line-soft); }
.kv > div:nth-last-child(-n+2) { border-bottom: 0; }
.kv .k { color: var(--muted); font-weight: 650; background: #fcfbf8; }
.kv .v { font-weight: 550; }

/* ---------- drawer ---------- */
.overlay { position: fixed; inset: 0; background: rgba(22, 20, 58, .45); z-index: 60; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(500px, 96vw);
  background: var(--card); z-index: 70; box-shadow: var(--shadow-pop);
  display: flex; flex-direction: column; border-left: 1px solid var(--line);
}
.drawer.wide { width: min(640px, 96vw); }
.drawer-head { display: flex; align-items: flex-start; gap: 12px; padding: 18px 22px 14px; border-bottom: 1px solid var(--line); }
.drawer-head h3 { font-size: 16.5px; flex: 1; }
.drawer-head .d-sub { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.drawer-body { padding: 18px 22px 30px; overflow-y: auto; }
.iconbtn { background: none; border: 0; cursor: pointer; color: var(--muted); padding: 5px; border-radius: 7px; line-height: 0; }
.iconbtn:hover { background: var(--neu-bg); color: var(--ink); }
.iconbtn svg { width: 17px; height: 17px; }

/* ---------- modal ---------- */
.modal-wrap { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 18px; background: rgba(22, 20, 58, .5); }
.modal { background: var(--card); border-radius: 16px; width: min(480px, 100%); box-shadow: var(--shadow-pop); max-height: 92vh; overflow-y: auto; }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 17px 20px 13px; border-bottom: 1px solid var(--line-soft); }
.modal-head h3 { font-size: 16px; flex: 1; }
.modal-body { padding: 17px 20px 22px; }

/* pay methods */
.paymethods { display: grid; grid-template-columns: repeat(auto-fit, minmax(88px, 1fr)); gap: 8px; margin-bottom: 16px; }
.paymethod {
  border: 1.5px solid var(--line); background: var(--card); border-radius: 10px;
  padding: 10px 6px; text-align: center; font-size: 12.5px; font-weight: 700; cursor: pointer; color: var(--ink-soft);
}
.paymethod.on { border-color: var(--teal); background: var(--teal-050); color: var(--teal-700); }
.qr-box { display: grid; place-items: center; padding: 10px 0 4px; }
.qr-box svg { width: 168px; height: 168px; border: 1px solid var(--line); border-radius: 10px; padding: 8px; background: #fff; }
.paytotal { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px dashed var(--line); margin-top: 14px; padding-top: 13px; font-weight: 700; }
.paytotal .amt { font-size: 21px; letter-spacing: -.02em; }

/* ---------- forms ---------- */
.field { display: grid; gap: 5px; margin-bottom: 13px; }
.field label { font-size: 12.5px; font-weight: 700; color: var(--ink-soft); }
.field input, .field select, .field textarea {
  font: inherit; font-size: 13.5px; border: 1px solid var(--line); border-radius: 8px;
  padding: 8.5px 11px; background: var(--card); color: var(--ink); width: 100%;
}
.field textarea { resize: vertical; min-height: 74px; }

/* ---------- breach timeline ---------- */
.timeline { display: grid; gap: 0; margin-top: 6px; }
.tl-step { display: grid; grid-template-columns: 26px 1fr; gap: 10px; }
.tl-rail { display: flex; flex-direction: column; align-items: center; }
.tl-dot { width: 13px; height: 13px; border-radius: 50%; border: 2.5px solid var(--line); background: var(--card); flex: none; margin-top: 3px; }
.tl-dot.done { border-color: var(--teal); background: var(--teal); }
.tl-dot.due { border-color: #b23b2b; }
.tl-line { width: 2px; flex: 1; background: var(--line); margin: 3px 0; min-height: 22px; }
.tl-body { padding-bottom: 16px; }
.tl-body .tl-title { font-weight: 700; font-size: 13.5px; }
.tl-body .tl-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.tl-body .tl-act { margin-top: 8px; }

/* ---------- toasts ---------- */
.toasts { position: fixed; bottom: 22px; right: 22px; z-index: 100; display: grid; gap: 9px; max-width: 360px; }
.toast {
  background: var(--indigo-950); color: #fff; border-radius: 11px; padding: 12px 15px;
  font-size: 13px; font-weight: 600; box-shadow: var(--shadow-pop);
  display: flex; gap: 10px; align-items: flex-start;
  animation: toast-in .18s ease-out;
  border-left: 4px solid var(--teal);
}
.toast.warn { border-left-color: #d99a06; }
.toast.bad { border-left-color: #d0442f; }
.toast svg { width: 16px; height: 16px; flex: none; margin-top: 1px; color: #2bb3a3; }
.toast.warn svg { color: #f0b429; }
.toast.bad svg { color: #f08b76; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- misc ---------- */
.subtle { color: var(--muted); font-size: 12.5px; }
.note { font-size: 12px; color: var(--muted); background: #fcfbf7; border: 1px dashed var(--line); border-radius: var(--radius-sm); padding: 10px 13px; }
.divider { height: 1px; background: var(--line-soft); margin: 16px 0; }
.hero-gpa {
  background: linear-gradient(160deg, var(--indigo-900), var(--indigo-950));
  color: #fff; border-radius: var(--radius); padding: 22px; display: flex; gap: 24px; align-items: center; flex-wrap: wrap;
}
.hero-gpa .g-num { font-size: 42px; font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.hero-gpa .g-label { color: var(--indigo-300); font-size: 12px; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; }
.hero-gpa .g-side { border-left: 1px solid rgba(255,255,255,.15); padding-left: 24px; display: grid; gap: 3px; font-size: 13px; color: var(--indigo-100); }
.grade-badge {
  display: inline-grid; place-items: center; min-width: 34px; padding: 3px 7px; border-radius: 7px;
  font-weight: 800; font-size: 12.5px; background: var(--neu-bg); color: var(--ink-soft);
}
.grade-badge.gA { background: var(--ok-bg); color: var(--ok-fg); }
.grade-badge.gB { background: var(--teal-100); color: var(--teal-700); }
.grade-badge.gC { background: var(--warn-bg); color: var(--warn-fg); }
.grade-badge.gF { background: var(--bad-bg); color: var(--bad-fg); }

/* ---------- meter / mini bar chart ---------- */
.meter { display: grid; gap: 14px; }
.meter-row { display: grid; grid-template-columns: minmax(96px, 34%) 1fr auto; gap: 12px; align-items: center; font-size: 13px; }
.meter-row .m-label { color: var(--ink-soft); font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.meter-row .m-track { height: 9px; border-radius: 99px; background: var(--neu-bg); overflow: hidden; }
.meter-row .m-fill { display: block; height: 100%; border-radius: 99px; background: var(--teal); transition: width .5s cubic-bezier(.2,.7,.3,1); }
.meter-row .m-fill.warn { background: #d99a06; }
.meter-row .m-fill.bad { background: #c0442f; }
.meter-row .m-fill.neu { background: var(--indigo-300); }
.meter-row .m-val { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; font-size: 12.5px; color: var(--ink); min-width: 34px; }

.list-plain { list-style: none; margin: 0; padding: 0; display: grid; gap: 13px; }
.list-plain li { display: flex; gap: 12px; align-items: flex-start; font-size: 13.5px; line-height: 1.5; }
.list-plain li > svg:first-child {
  width: 32px; height: 32px; padding: 8px; border-radius: 9px; flex: none;
  background: var(--teal-050); color: var(--teal-700); box-shadow: inset 0 0 0 1px rgba(14,124,111,.09);
}
.list-plain li > span { padding-top: 6px; }

.ann-card { border-left: 3px solid var(--teal); transition: box-shadow .14s, transform .1s; }
.ann-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.ann-card .card-body h4 { font-size: 15px; margin-bottom: 5px; letter-spacing: -.01em; }
.ann-card .ann-meta { font-size: 12px; color: var(--muted); margin-bottom: 9px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ann-card .card-body p { color: var(--ink-soft); }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .login { grid-template-columns: 1fr; }
  .login-brand { padding: 40px 32px; }
  .login-brand::before { mask-image: radial-gradient(140% 80% at 20% 0%, #000 40%, transparent 85%); }
  .login-brand h1 { margin-top: 20px; max-width: none; }
  .login-brand .lede { max-width: none; }
  .login-brand .brand-feats { max-width: 520px; }
  .login-brand .foot { padding-top: 30px; }
  .login-main { padding: 36px 24px 56px; }
  .cols-2 { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  .role-cards { grid-template-columns: repeat(3, 1fr); }
  .tenant-seg button { font-size: 12px; padding: 9px 6px; }
}
@media (max-width: 920px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; width: 262px;
    transform: translateX(-102%); transition: transform .18s ease-out;
  }
  .sidebar.open { transform: none; box-shadow: var(--shadow-pop); }
  .hamburger { display: inline-flex; }
  .content { padding: 18px 14px 40px; }
  .topbar { padding: 11px 14px; }
  .kanban { display: flex; }
  .kcol { flex: 0 0 250px; }
  .demo-tag { display: none; }
}
