/* NSSTA TMS — Admin design tokens */
:root {
  /* Surfaces */
  --bg: oklch(0.985 0.004 80);
  --bg-elev: #ffffff;
  --bg-sunken: oklch(0.965 0.005 80);
  --bg-rail: oklch(0.98 0.004 80);

  /* Ink */
  --ink: oklch(0.22 0.015 265);
  --ink-2: oklch(0.42 0.012 265);
  --ink-3: oklch(0.6 0.01 265);
  --ink-4: oklch(0.72 0.008 265);

  /* Lines */
  --line: oklch(0.92 0.005 265);
  --line-2: oklch(0.95 0.004 265);

  /* Accent (indigo) */
  --accent: oklch(0.42 0.16 265);
  --accent-hover: oklch(0.36 0.17 265);
  --accent-soft: oklch(0.96 0.025 265);
  --accent-soft-2: oklch(0.93 0.04 265);
  --accent-ink: oklch(0.32 0.16 265);

  /* Status */
  --ok: oklch(0.55 0.12 150);
  --ok-soft: oklch(0.95 0.03 150);
  --warn: oklch(0.68 0.13 75);
  --warn-soft: oklch(0.96 0.04 80);
  --danger: oklch(0.55 0.18 25);
  --danger-soft: oklch(0.96 0.03 25);
  --info: oklch(0.55 0.12 230);
  --info-soft: oklch(0.95 0.03 230);

  /* Radii */
  --r-sm: 6px;
  --r-md: 8px;
  --r-lg: 12px;
  --r-xl: 16px;

  /* Shadow */
  --shadow-1: 0 1px 0 oklch(0.9 0.005 265 / 0.4), 0 1px 2px oklch(0.7 0.01 265 / 0.05);
  --shadow-2: 0 4px 12px -2px oklch(0.5 0.02 265 / 0.08), 0 2px 4px -1px oklch(0.5 0.02 265 / 0.04);
  --shadow-pop: 0 18px 40px -12px oklch(0.3 0.04 265 / 0.18), 0 4px 12px -4px oklch(0.3 0.04 265 / 0.1);

  /* Type */
  --font-ui: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Instrument Serif", "Times New Roman", serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Sidebar */
  --sidebar-w: 248px;
  --topbar-h: 56px;
}

* { box-sizing: border-box; }
html, body, #root { height: 100%; }
body {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }

/* ---------- App shell ---------- */
.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  grid-template-rows: var(--topbar-h) 1fr;
  grid-template-areas: "brand topbar" "sidebar main";
  height: 100vh;
}

/* Brand cell (top-left, above sidebar) */
.brand {
  grid-area: brand;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--bg-elev);
}
.brand-seal {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, oklch(0.55 0.16 265), oklch(0.32 0.14 265));
  position: relative;
  flex-shrink: 0;
}
.brand-seal::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  border: 1px dashed oklch(1 0 0 / 0.5);
}
.brand-text { line-height: 1.1; }
.brand-text .org { font-size: 9px; letter-spacing: 0.08em; color: var(--ink-3); text-transform: uppercase; }
.brand-text .ttl { font-family: var(--font-display); font-size: 20px; letter-spacing: 0.01em; }

/* Topbar */
.topbar {
  grid-area: topbar;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 20px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-elev);
}
.topbar .crumbs { display: flex; align-items: center; gap: 6px; color: var(--ink-3); font-size: 13px; }
.topbar .crumbs .sep { color: var(--ink-4); }
.topbar .crumbs .here { color: var(--ink); font-weight: 500; }
.topbar .grow { flex: 1; }
.topbar .search {
  display: flex; align-items: center; gap: 8px;
  height: 32px; padding: 0 10px;
  border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--bg-sunken); color: var(--ink-3);
  font-size: 13px; min-width: 240px;
}
.topbar .search kbd {
  margin-left: auto;
  font: 500 10px var(--font-mono);
  padding: 2px 5px; border-radius: 4px;
  background: var(--bg-elev); border: 1px solid var(--line);
  color: var(--ink-3);
}
.topbar .icon-btn {
  width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--bg-elev);
  cursor: pointer;
  color: var(--ink-2);
  position: relative;
}
.topbar .icon-btn:hover { background: var(--bg-sunken); color: var(--ink); }
.topbar .icon-btn .dot { position: absolute; top: 6px; right: 6px; width: 6px; height: 6px; border-radius: 50%; background: var(--danger); border: 1.5px solid var(--bg-elev); }
.topbar .who {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 10px 4px 4px; border-radius: 100px;
  border: 1px solid var(--line); background: var(--bg-elev);
  cursor: pointer;
}
.topbar .who:hover { background: var(--bg-sunken); }
.topbar .who .av { width: 24px; height: 24px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--accent-hover)); color: white; display: inline-flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 600; }
.topbar .who .lbl { font-size: 12px; }
.topbar .who .lbl .name { color: var(--ink); font-weight: 500; }
.topbar .who .lbl .role { color: var(--ink-3); font-size: 10.5px; }

/* Sidebar */
.sidebar {
  grid-area: sidebar;
  border-right: 1px solid var(--line);
  background: var(--bg-rail);
  overflow-y: auto;
  padding: 14px 10px 24px;
}
.sidebar-group { margin-top: 14px; }
.sidebar-group:first-child { margin-top: 4px; }
.sidebar-label {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-4);
  padding: 0 10px;
  margin-bottom: 6px;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 10px;
  border-radius: var(--r-md);
  color: var(--ink-2);
  font-size: 13px;
  cursor: pointer;
  user-select: none;
  margin-bottom: 1px;
}
.nav-item:hover { background: oklch(0.94 0.005 265); color: var(--ink); }
.nav-item.active {
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-weight: 500;
}
.nav-item .ico { width: 16px; height: 16px; flex-shrink: 0; color: currentColor; opacity: 0.85; }
.nav-item.active .ico { opacity: 1; }
.nav-item .badge {
  margin-left: auto;
  font: 500 10px var(--font-ui);
  padding: 1px 6px; border-radius: 100px;
  background: var(--bg-elev); border: 1px solid var(--line);
  color: var(--ink-3);
}
.nav-item.active .badge { background: white; border-color: var(--accent-soft-2); color: var(--accent-ink); }

/* Main area */
.main {
  grid-area: main;
  overflow-y: auto;
  background: var(--bg);
}
.main-inner { padding: 24px 28px 64px; max-width: 1400px; }

/* Page header */
.page-head { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 24px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.page-head .title-wrap { flex: 1; }
.page-head .eyebrow { font-size: 11px; letter-spacing: 0.12em; color: var(--ink-3); text-transform: uppercase; margin-bottom: 6px; }
.page-head h1 {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 400;
  margin: 0;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.page-head .sub { color: var(--ink-3); margin-top: 4px; font-size: 13px; max-width: 60ch; }
.page-head .actions { display: flex; gap: 8px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 12px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--bg-elev);
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.12s, border-color 0.12s;
}
.btn:hover { background: var(--bg-sunken); }
.btn.primary {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--bg-sunken); }
.btn.sm { height: 26px; padding: 0 9px; font-size: 12px; }
.btn .ico { width: 14px; height: 14px; }

/* Card */
.card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-1);
}
.card .card-head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.card .card-head h3 { margin: 0; font-size: 13px; font-weight: 600; letter-spacing: -0.005em; }
.card .card-head .sub { color: var(--ink-3); font-size: 12px; }
.card .card-head .grow { flex: 1; }
.card .card-body { padding: 18px; }
.card .card-body.tight { padding: 0; }

/* KPI */
.kpi { padding: 16px 18px; }
.kpi .label { font-size: 11px; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.08em; }
.kpi .val { font-family: var(--font-display); font-size: 34px; line-height: 1; margin-top: 8px; letter-spacing: -0.01em; }
.kpi .delta { font-size: 11.5px; margin-top: 6px; color: var(--ink-3); display: flex; gap: 6px; align-items: center; }
.kpi .delta.up { color: var(--ok); }
.kpi .delta.down { color: var(--danger); }
.kpi .spark { margin-top: 12px; height: 36px; }

/* Badges */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px;
  font-weight: 500;
  padding: 2px 7px;
  border-radius: 100px;
  background: var(--bg-sunken);
  color: var(--ink-2);
  border: 1px solid var(--line);
  white-space: nowrap;
}
.badge.dot::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.badge.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.badge.warn { background: var(--warn-soft); color: oklch(0.5 0.13 75); border-color: transparent; }
.badge.danger { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.badge.info { background: var(--info-soft); color: var(--info); border-color: transparent; }
.badge.accent { background: var(--accent-soft); color: var(--accent-ink); border-color: transparent; }

/* Tables */
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th {
  text-align: left;
  font-size: 11px; font-weight: 500;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-sunken);
  position: sticky; top: 0;
}
.tbl td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line-2);
  vertical-align: middle;
}
.tbl tr:last-child td { border-bottom: none; }
.tbl tr:hover td { background: var(--bg-sunken); }
.tbl .id { font: 500 11.5px var(--font-mono); color: var(--ink-3); }
.tbl .avatar-cell { display: flex; align-items: center; gap: 10px; }
.tbl .av {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-ink);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 600;
  flex-shrink: 0;
}
.tbl .av.gn { background: oklch(0.95 0.04 150); color: oklch(0.4 0.12 150); }
.tbl .av.am { background: oklch(0.95 0.05 60); color: oklch(0.45 0.13 60); }
.tbl .av.rd { background: oklch(0.95 0.04 25); color: oklch(0.45 0.15 25); }
.tbl .name-cell .nm { font-weight: 500; }
.tbl .name-cell .sub { color: var(--ink-3); font-size: 11.5px; }

/* Grid utilities */
.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.span-2 { grid-column: span 2; }
.row { display: flex; align-items: center; gap: 12px; }

/* Tabs */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.tab {
  padding: 9px 14px;
  font-size: 13px;
  color: var(--ink-3);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  position: relative;
  display: flex; align-items: center; gap: 7px;
}
.tab .count { font-size: 11px; color: var(--ink-4); }
.tab:hover { color: var(--ink-2); }
.tab.active { color: var(--ink); border-bottom-color: var(--accent); font-weight: 500; }
.tab.active .count { color: var(--accent-ink); }

/* Filter row */
.filter-row {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-elev);
}
.filter-row .field {
  display: flex; align-items: center; gap: 6px;
  height: 28px; padding: 0 10px;
  border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--bg-elev);
  font-size: 12.5px; color: var(--ink-2);
  cursor: pointer;
}
.filter-row .field.search { min-width: 220px; color: var(--ink-3); }
.filter-row .grow { flex: 1; }

/* Inputs */
input.in, select.in, textarea.in {
  width: 100%;
  height: 34px;
  padding: 0 11px;
  font: inherit; font-size: 13px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--bg-elev);
  color: var(--ink);
}
textarea.in { min-height: 80px; padding: 9px 11px; resize: vertical; }
input.in:focus, select.in:focus, textarea.in:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.label { font-size: 11.5px; font-weight: 500; color: var(--ink-2); margin-bottom: 5px; display: block; }
.hint { font-size: 11px; color: var(--ink-3); margin-top: 4px; }

/* Modal */
.scrim {
  position: fixed; inset: 0;
  background: oklch(0.2 0.02 265 / 0.35);
  backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center;
  z-index: 60;
  animation: fade 0.12s ease-out;
}
.modal {
  width: 520px; max-width: 92vw;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-pop);
  animation: pop 0.16s ease-out;
}
.modal .m-head { padding: 18px 22px 12px; }
.modal .m-head h2 { margin: 0 0 4px; font-family: var(--font-display); font-size: 22px; font-weight: 400; letter-spacing: -0.005em; }
.modal .m-head .sub { font-size: 12.5px; color: var(--ink-3); }
.modal .m-body { padding: 8px 22px 18px; display: grid; gap: 12px; }
.modal .m-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 22px 18px; border-top: 1px solid var(--line-2); }

@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(0.98); } to { opacity: 1; transform: none; } }

/* Toast */
.toasts { position: fixed; bottom: 22px; right: 22px; display: flex; flex-direction: column; gap: 8px; z-index: 80; }
.toast {
  background: oklch(0.22 0.015 265);
  color: white;
  border-radius: var(--r-md);
  padding: 10px 14px;
  font-size: 13px;
  display: flex; align-items: center; gap: 10px;
  box-shadow: var(--shadow-pop);
  animation: pop 0.15s ease-out;
  max-width: 360px;
}
.toast .ok { color: oklch(0.78 0.13 150); }

/* Calendar */
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; background: var(--line-2); border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--line); }
.cal .cell { background: var(--bg-elev); min-height: 88px; padding: 6px 8px; font-size: 11.5px; color: var(--ink-2); }
.cal .cell.muted { background: var(--bg-sunken); color: var(--ink-4); }
.cal .cell .num { font-weight: 500; font-size: 12px; }
.cal .cell.today .num {
  background: var(--accent); color: white;
  width: 20px; height: 20px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px;
}
.cal .ev {
  display: block;
  margin-top: 4px;
  font-size: 10.5px;
  padding: 2px 5px;
  border-radius: 3px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  border-left: 2px solid var(--accent);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}
.cal .ev.ev-2 { background: oklch(0.95 0.04 150); border-left-color: var(--ok); color: oklch(0.35 0.12 150); }
.cal .ev.ev-3 { background: oklch(0.95 0.04 60); border-left-color: var(--warn); color: oklch(0.4 0.12 60); }
.cal .head-row { display: grid; grid-template-columns: repeat(7, 1fr); padding: 6px 0; font-size: 10.5px; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.06em; }
.cal .head-row > div { padding: 0 8px; }

/* Activity list */
.activity-item { display: flex; gap: 12px; padding: 12px 18px; border-top: 1px solid var(--line-2); }
.activity-item:first-child { border-top: none; }
.activity-item .icd {
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--bg-sunken); color: var(--ink-2);
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.activity-item .icd.ok { background: var(--ok-soft); color: var(--ok); }
.activity-item .icd.warn { background: var(--warn-soft); color: oklch(0.5 0.13 75); }
.activity-item .icd.info { background: var(--info-soft); color: var(--info); }
.activity-item .icd.accent { background: var(--accent-soft); color: var(--accent-ink); }
.activity-item .meta { font-size: 11.5px; color: var(--ink-3); margin-top: 2px; }
.activity-item .who-x { color: var(--ink); font-weight: 500; }

/* Tree (KMS) */
.tree { font-size: 13px; }
.tree .node { display: flex; align-items: center; gap: 7px; padding: 5px 8px; border-radius: var(--r-sm); cursor: pointer; color: var(--ink-2); }
.tree .node:hover { background: var(--bg-sunken); color: var(--ink); }
.tree .node.sel { background: var(--accent-soft); color: var(--accent-ink); }
.tree .node .chev { width: 12px; height: 12px; color: var(--ink-3); transition: transform 0.12s; }
.tree .node.open .chev { transform: rotate(90deg); }
.tree .node.leaf .chev { visibility: hidden; }
.tree .children { padding-left: 18px; border-left: 1px dashed var(--line); margin-left: 14px; }

/* Hostel grid */
.rooms { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; }
.room {
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--bg-elev);
  font-size: 10.5px;
  font: 500 11px var(--font-mono);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--ink-2);
  position: relative;
}
.room:hover { border-color: var(--ink-3); }
.room .sub { font-size: 9px; color: var(--ink-4); margin-top: 2px; font-family: var(--font-ui); }
.room.occ { background: var(--accent-soft); border-color: transparent; color: var(--accent-ink); }
.room.occ .sub { color: var(--accent-ink); opacity: 0.7; }
.room.mtn { background: var(--warn-soft); border-color: transparent; color: oklch(0.45 0.13 75); }
.room.mtn .sub { color: inherit; opacity: 0.7; }

/* Footer */
.footer-credit {
  border-top: 1px solid var(--line);
  padding: 18px 28px;
  font-size: 11px;
  color: var(--ink-3);
  display: flex; gap: 18px; align-items: center;
  background: var(--bg-elev);
}
.footer-credit .grow { flex: 1; }

/* Chart placeholder */
.chart-ph {
  height: 220px;
  border-radius: var(--r-md);
  background:
    linear-gradient(transparent 0 calc(100% - 1px), var(--line-2) calc(100% - 1px)) 0 0 / 100% 25%,
    var(--bg-sunken);
  position: relative;
  overflow: hidden;
}
.chart-ph svg { width: 100%; height: 100%; }

/* Empty state */
.empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--ink-3);
  font-size: 13px;
}
.empty .big { font-family: var(--font-display); font-size: 22px; color: var(--ink-2); margin-bottom: 4px; }

/* Misc */
.divider { height: 1px; background: var(--line); margin: 16px 0; }
.muted { color: var(--ink-3); }
.mono { font-family: var(--font-mono); }
.dl { display: grid; grid-template-columns: 140px 1fr; gap: 10px 16px; font-size: 12.5px; }
.dl dt { color: var(--ink-3); }
.dl dd { margin: 0; color: var(--ink); }

/* Sparkline */
.spark-svg { width: 100%; height: 36px; display: block; }

/* ---------- Auth screens ---------- */
.auth-stage {
  min-height: 100vh;
  display: grid;
  grid-template-rows: 1fr auto;
  background: var(--bg);
  position: relative;
  overflow: hidden;
}
.auth-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 10%, var(--accent-soft) 0%, transparent 45%),
    radial-gradient(ellipse at 80% 90%, oklch(0.96 0.02 80) 0%, transparent 50%);
  opacity: 0.6;
  pointer-events: none;
}
.auth-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}
.auth-inner { width: 100%; max-width: 440px; }
.auth-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
  text-align: center;
}
.auth-brand .seal {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, oklch(0.55 0.16 265), oklch(0.32 0.14 265));
  position: relative;
}
.auth-brand .seal::after {
  content: "";
  position: absolute; inset: 6px;
  border-radius: 50%;
  border: 1px dashed oklch(1 0 0 / 0.55);
}
.auth-brand .org {
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--ink-3);
  text-transform: uppercase;
}
.auth-brand .ttl {
  font-family: var(--font-display);
  font-size: 28px;
  letter-spacing: -0.005em;
  line-height: 1.1;
}
.auth-brand .sub { color: var(--ink-3); font-size: 12.5px; margin-top: -2px; }

.auth-card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-pop);
  padding: 32px;
}
.auth-card h2 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 400;
  margin: 0 0 4px;
  letter-spacing: -0.005em;
}
.auth-card .lede { color: var(--ink-3); font-size: 13px; margin-bottom: 22px; }

.sso-btn {
  display: flex; align-items: center; gap: 12px;
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--bg-elev);
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.12s, background 0.12s, transform 0.06s;
}
.sso-btn:hover { border-color: var(--ink-3); background: var(--bg-sunken); }
.sso-btn:active { transform: translateY(1px); }
.sso-btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}
.sso-btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.sso-btn .logo {
  width: 32px; height: 32px;
  border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-family: var(--font-display);
  font-size: 17px;
  background: var(--bg-sunken);
  color: var(--ink);
}
.sso-btn.primary .logo { background: oklch(1 0 0 / 0.18); color: white; }
.sso-btn .txt { flex: 1; line-height: 1.25; }
.sso-btn .txt .meta { font-size: 11.5px; font-weight: 400; color: var(--ink-3); margin-top: 2px; }
.sso-btn.primary .txt .meta { color: oklch(1 0 0 / 0.7); }
.sso-btn .arr { color: var(--ink-3); }
.sso-btn.primary .arr { color: oklch(1 0 0 / 0.85); }

.auth-or {
  display: flex; align-items: center; gap: 10px;
  font-size: 11px; color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 14px 0;
}
.auth-or::before, .auth-or::after {
  content: ""; flex: 1; height: 1px; background: var(--line);
}

.auth-foot-links {
  display: flex; justify-content: center; gap: 14px;
  margin-top: 18px; font-size: 11.5px; color: var(--ink-3);
}
.auth-foot-links a { color: var(--ink-3); }
.auth-foot-links a:hover { color: var(--accent-ink); }

.auth-strip {
  border-top: 1px solid var(--line);
  background: var(--bg-elev);
  padding: 16px 24px;
  font-size: 11px;
  color: var(--ink-3);
  display: flex; gap: 22px; align-items: center; justify-content: center;
  flex-wrap: wrap;
}
.auth-strip .pill {
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: 100px;
  font-size: 10.5px;
}

/* SSO consent screen — generic GoI SSO representation */
.consent-shell {
  background: var(--bg-elev);
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
}
.consent-topbar {
  border-bottom: 1px solid var(--line);
  padding: 14px 24px;
  display: flex; align-items: center; gap: 12px;
  font-size: 12.5px;
  background: var(--bg-elev);
}
.consent-topbar .lock {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--bg-sunken);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--ink-2);
}
.consent-topbar .ttl {
  font-weight: 600;
  color: var(--ink);
}
.consent-topbar .sub {
  color: var(--ink-3);
}
.consent-topbar .secure {
  margin-left: auto;
  display: flex; align-items: center; gap: 5px;
  color: var(--ok);
  font-size: 11.5px;
}

.consent-wrap {
  display: flex; align-items: center; justify-content: center;
  padding: 40px 24px;
  background:
    repeating-linear-gradient(135deg, transparent 0, transparent 24px, oklch(0.96 0.005 80) 24px, oklch(0.96 0.005 80) 25px),
    var(--bg);
}
.consent-card {
  width: 100%;
  max-width: 520px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-pop);
  overflow: hidden;
}
.consent-card .head {
  padding: 24px 28px 16px;
  border-bottom: 1px solid var(--line-2);
  text-align: center;
}
.consent-card .head .app-icon {
  width: 56px; height: 56px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  color: white;
  margin: 0 auto 12px;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 22px;
}
.consent-card .head .req {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 400;
  line-height: 1.3;
  margin: 0;
}
.consent-card .head .meta {
  font-size: 12px;
  color: var(--ink-3);
  margin-top: 4px;
}
.consent-card .who-box {
  margin: 18px 28px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 12px 14px;
  display: flex; align-items: center; gap: 12px;
}
.consent-card .who-box .av {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  color: white;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600;
}
.consent-card .who-box .info { flex: 1; line-height: 1.3; }
.consent-card .who-box .info .nm { font-weight: 500; font-size: 13.5px; }
.consent-card .who-box .info .meta { font-size: 11.5px; color: var(--ink-3); }
.consent-card .who-box .switch { font-size: 11.5px; color: var(--accent-ink); cursor: pointer; }

.consent-scopes {
  padding: 4px 28px 16px;
}
.consent-scopes .label {
  font-size: 11.5px; color: var(--ink-3);
  margin: 0 0 10px;
}
.consent-scopes ul { margin: 0; padding: 0; list-style: none; }
.consent-scopes li {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 8px 0;
  font-size: 12.5px;
  color: var(--ink-2);
}
.consent-scopes li .tick {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--ok-soft);
  color: var(--ok);
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.consent-foot {
  padding: 16px 28px 22px;
  display: flex; gap: 8px; justify-content: flex-end;
  border-top: 1px solid var(--line-2);
  background: var(--bg-sunken);
}

.consent-bottom {
  padding: 18px 24px;
  font-size: 11px;
  color: var(--ink-3);
  border-top: 1px solid var(--line);
  text-align: center;
  background: var(--bg-elev);
}

/* OTP input */
.otp-row {
  display: flex; gap: 8px; justify-content: center;
  margin: 18px 0 10px;
}
.otp-row input {
  width: 44px; height: 52px;
  text-align: center;
  font: 500 22px var(--font-mono);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--bg-elev);
  color: var(--ink);
}
.otp-row input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.otp-meta {
  text-align: center;
  font-size: 12px;
  color: var(--ink-3);
  margin-bottom: 16px;
}
.otp-meta .lnk { color: var(--accent-ink); cursor: pointer; }

/* Connecting spinner */
.connecting {
  display: flex; flex-direction: column; align-items: center;
  padding: 40px 0 32px;
  gap: 18px;
}
.spinner {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 2.5px solid var(--line);
  border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Account menu (topbar) */
.menu-pop {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-pop);
  min-width: 220px;
  padding: 6px;
  z-index: 50;
  animation: pop 0.12s ease-out;
}
.menu-pop .item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  font-size: 13px;
  cursor: pointer;
  color: var(--ink-2);
}
.menu-pop .item:hover { background: var(--bg-sunken); color: var(--ink); }
.menu-pop .item.danger { color: var(--danger); }
.menu-pop .item.danger:hover { background: var(--danger-soft); }
.menu-pop .hr { height: 1px; background: var(--line); margin: 4px 0; }
.menu-pop .user-row {
  padding: 10px 10px 8px;
  border-bottom: 1px solid var(--line-2);
  margin-bottom: 4px;
}
.menu-pop .user-row .nm { font-weight: 500; font-size: 13px; }
.menu-pop .user-row .em { font-size: 11.5px; color: var(--ink-3); }

/* ---------- Trainee Preview (LMS learner view) ---------- */
.tp-scrim {
  position: fixed; inset: 0;
  background: oklch(0.2 0.02 265 / 0.45);
  backdrop-filter: blur(3px);
  z-index: 70;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  animation: fade 0.15s ease-out;
}
.tp-frame {
  width: 100%; max-width: 1080px;
  height: 100%; max-height: 760px;
  background: var(--bg);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-pop);
  overflow: hidden;
  display: flex; flex-direction: column;
  animation: pop 0.18s ease-out;
}
.tp-chrome {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px;
  background: var(--ink);
  color: white;
  flex-shrink: 0;
}
.tp-chrome .badge-pv {
  font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase;
  background: oklch(1 0 0 / 0.16); padding: 3px 8px; border-radius: 100px;
}
.tp-chrome .url {
  flex: 1;
  font: 400 12px var(--font-mono);
  color: oklch(1 0 0 / 0.6);
  text-align: center;
}
.tp-chrome .close {
  width: 28px; height: 28px; border-radius: 6px;
  background: oklch(1 0 0 / 0.12); color: white; border: none;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.tp-chrome .close:hover { background: oklch(1 0 0 / 0.22); }

.tp-scroll { flex: 1; overflow-y: auto; }

.tp-topbar {
  height: 52px;
  background: var(--bg-elev);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 12px;
  padding: 0 22px;
  position: sticky; top: 0; z-index: 2;
}
.tp-topbar .seal { width: 24px; height: 24px; border-radius: 50%; background: radial-gradient(circle at 30% 30%, oklch(0.55 0.16 265), oklch(0.32 0.14 265)); flex-shrink: 0; }
.tp-topbar .wm { font-family: var(--font-display); font-size: 17px; }
.tp-topbar .nav { display: flex; gap: 18px; margin-left: 18px; font-size: 13px; color: var(--ink-3); }
.tp-topbar .nav .on { color: var(--ink); font-weight: 500; }
.tp-topbar .grow { flex: 1; }
.tp-topbar .av { width: 26px; height: 26px; border-radius: 50%; background: oklch(0.95 0.04 150); color: oklch(0.4 0.12 150); display: inline-flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 600; }

.tp-hero {
  background: linear-gradient(135deg, oklch(0.32 0.09 265), oklch(0.42 0.13 265));
  color: white;
  padding: 30px 36px 28px;
}
.tp-hero .kicker { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.8; }
.tp-hero h1 { font-family: var(--font-display); font-weight: 400; font-size: 34px; margin: 8px 0 6px; letter-spacing: -0.01em; }
.tp-hero .facts { display: flex; gap: 18px; font-size: 12.5px; opacity: 0.9; margin-top: 12px; flex-wrap: wrap; }
.tp-hero .facts span { display: flex; align-items: center; gap: 6px; }
.tp-progress-wrap { display: flex; align-items: center; gap: 12px; margin-top: 18px; }
.tp-progress { flex: 1; height: 6px; background: oklch(1 0 0 / 0.22); border-radius: 4px; overflow: hidden; max-width: 320px; }
.tp-progress .fill { height: 100%; background: white; border-radius: 4px; }
.tp-progress-wrap .pct { font-size: 12.5px; font-weight: 500; }

.tp-body { display: grid; grid-template-columns: 320px 1fr; gap: 0; }
.tp-outline { border-right: 1px solid var(--line); background: var(--bg-elev); }
.tp-mod { border-bottom: 1px solid var(--line); }
.tp-mod-head { padding: 14px 20px 8px; }
.tp-mod-head .mt { font-size: 12.5px; font-weight: 600; }
.tp-mod-head .ms { font-size: 11px; color: var(--ink-3); margin-top: 2px; }
.tp-lesson {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 20px;
  font-size: 12.5px;
  cursor: pointer;
  color: var(--ink-2);
  border-left: 2px solid transparent;
}
.tp-lesson:hover { background: var(--bg-sunken); }
.tp-lesson.active { background: var(--accent-soft); border-left-color: var(--accent); color: var(--accent-ink); font-weight: 500; }
.tp-lesson .tick {
  width: 18px; height: 18px; border-radius: 50%; flex-shrink: 0;
  border: 1.5px solid var(--line);
  display: inline-flex; align-items: center; justify-content: center;
  color: transparent;
}
.tp-lesson.done .tick { background: var(--ok); border-color: var(--ok); color: white; }
.tp-lesson .ttl { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tp-lesson .dur { font-size: 10.5px; color: var(--ink-4); }

.tp-player { padding: 24px 32px 40px; }
.tp-stage {
  border-radius: var(--r-lg);
  background: var(--bg-sunken);
  border: 1px solid var(--line);
  overflow: hidden;
  margin-bottom: 18px;
}
.tp-stage.video {
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, oklch(0.25 0.03 265), oklch(0.32 0.05 265));
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.tp-stage.video .play {
  width: 64px; height: 64px; border-radius: 50%;
  background: oklch(1 0 0 / 0.92); color: var(--accent);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; box-shadow: 0 8px 24px oklch(0.2 0.05 265 / 0.4);
}
.tp-stage.video .vmeta { position: absolute; bottom: 14px; left: 16px; color: white; font-size: 12px; opacity: 0.85; }
.tp-stage.doc {
  min-height: 280px; padding: 28px 32px; background: var(--bg-elev);
}
.tp-stage.doc .doc-line { height: 9px; border-radius: 3px; background: var(--bg-sunken); margin-bottom: 12px; }
.tp-stage.quiz { background: var(--bg-elev); padding: 26px 30px; }

.tp-qopt {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-md);
  margin-bottom: 8px; font-size: 13px; cursor: pointer;
}
.tp-qopt:hover { border-color: var(--accent); background: var(--accent-soft); }
.tp-qopt .radio { width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--ink-4); flex-shrink: 0; }

.tp-lesson-title { font-family: var(--font-display); font-weight: 400; font-size: 24px; margin: 0 0 4px; }
.tp-lesson-meta { font-size: 12.5px; color: var(--ink-3); margin-bottom: 18px; display: flex; gap: 12px; align-items: center; }
.tp-foot { display: flex; align-items: center; gap: 10px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }

/* ---------- Course Builder (low-code) ---------- */
.stepper {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 22px;
}
.stepper .step {
  display: flex; align-items: center; gap: 10px;
  cursor: pointer;
}
.stepper .step .num {
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  background: var(--bg-elev);
  color: var(--ink-3);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600;
  flex-shrink: 0;
}
.stepper .step .lbl { font-size: 13px; color: var(--ink-3); font-weight: 500; }
.stepper .step.active .num { background: var(--accent); border-color: var(--accent); color: white; }
.stepper .step.active .lbl { color: var(--ink); }
.stepper .step.done .num { background: var(--accent-soft); border-color: transparent; color: var(--accent-ink); }
.stepper .step.done .lbl { color: var(--ink-2); }
.stepper .conn { flex: 1; height: 1.5px; background: var(--line); margin: 0 14px; min-width: 24px; }
.stepper .conn.done { background: var(--accent); }

.builder {
  display: grid;
  grid-template-columns: 232px 1fr 288px;
  gap: 16px;
  align-items: start;
}

/* Palette */
.palette { position: sticky; top: 0; }
.palette .pal-group { margin-bottom: 16px; }
.palette .pal-label {
  font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-4); margin-bottom: 8px; padding: 0 2px;
}
.pal-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--bg-elev);
  margin-bottom: 6px;
  cursor: grab;
  font-size: 12.5px;
  font-weight: 500;
  user-select: none;
  transition: border-color 0.12s, box-shadow 0.12s, transform 0.06s;
}
.pal-item:hover { border-color: var(--ink-3); box-shadow: var(--shadow-1); }
.pal-item:active { cursor: grabbing; transform: scale(0.98); }
.pal-item.dragging { opacity: 0.4; }
.pal-item .chip {
  width: 28px; height: 28px;
  border-radius: 7px;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.pal-item .meta { color: var(--ink-4); font-size: 10.5px; font-weight: 400; margin-left: auto; }

/* block type colors */
.bt-structure { background: var(--accent-soft); color: var(--accent-ink); }
.bt-content   { background: oklch(0.95 0.04 230); color: oklch(0.4 0.12 230); }
.bt-activity  { background: oklch(0.95 0.05 60); color: oklch(0.45 0.13 60); }
.bt-outcome   { background: oklch(0.95 0.04 150); color: oklch(0.38 0.12 150); }

/* Canvas */
.bld-canvas {
  min-height: 480px;
  display: flex; flex-direction: column; gap: 14px;
}
.bld-canvas-head {
  display: flex; align-items: center; gap: 12px;
  padding: 4px 2px;
}
.bld-canvas-head .t { font-weight: 600; font-size: 13px; }
.bld-canvas-head .meta { color: var(--ink-3); font-size: 12px; }

.bld-section {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-1);
  overflow: hidden;
}
.bld-section.drop-active { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.bld-section-head {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 14px;
  background: var(--bg-sunken);
  border-bottom: 1px solid var(--line);
}
.bld-section-head .handle { color: var(--ink-4); cursor: grab; display: inline-flex; }
.bld-section-head .s-title {
  font-weight: 600; font-size: 13.5px;
  border: none; background: transparent; outline: none;
  color: var(--ink); flex: 1; padding: 2px 4px; border-radius: 4px;
}
.bld-section-head .s-title:hover, .bld-section-head .s-title:focus { background: var(--bg-elev); }
.bld-section-head .count { font-size: 11px; color: var(--ink-3); }
.bld-section-body { padding: 8px 12px 12px; }

.bld-block {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--bg-elev);
  cursor: grab;
  transition: border-color 0.12s, box-shadow 0.12s;
}
.bld-block:hover { border-color: var(--ink-3); }
.bld-block.sel { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.bld-block.dragging { opacity: 0.4; }
.bld-block .handle { color: var(--ink-4); display: inline-flex; cursor: grab; }
.bld-block .chip {
  width: 30px; height: 30px;
  border-radius: 7px;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.bld-block .info { flex: 1; min-width: 0; }
.bld-block .info .nm { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bld-block .info .sub { font-size: 11px; color: var(--ink-3); }
.bld-block .x { color: var(--ink-4); cursor: pointer; display: inline-flex; opacity: 0; }
.bld-block:hover .x { opacity: 1; }
.bld-block .x:hover { color: var(--danger); }

.drop-gap { height: 8px; border-radius: 4px; transition: height 0.1s; position: relative; }
.drop-gap.active { height: 30px; }
.drop-gap.active::after {
  content: "";
  position: absolute; left: 6px; right: 6px; top: 50%;
  height: 2px; background: var(--accent); border-radius: 2px;
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.bld-empty {
  border: 1.5px dashed var(--line);
  border-radius: var(--r-md);
  padding: 22px;
  text-align: center;
  color: var(--ink-3);
  font-size: 12.5px;
}

.bld-add-section {
  border: 1.5px dashed var(--line);
  border-radius: var(--r-lg);
  padding: 14px;
  text-align: center;
  color: var(--ink-3);
  font-size: 12.5px;
  cursor: pointer;
  background: var(--bg-elev);
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.bld-add-section:hover { border-color: var(--accent); color: var(--accent-ink); background: var(--accent-soft); }
.bld-add-section.drop-active { border-color: var(--accent); color: var(--accent-ink); background: var(--accent-soft); }

/* Inspector */
.inspector { position: sticky; top: 0; }
.inspector .ins-empty {
  text-align: center; padding: 30px 16px; color: var(--ink-3); font-size: 12.5px;
}
.inspector .ins-empty .big { font-family: var(--font-display); font-size: 20px; color: var(--ink-2); margin-bottom: 4px; }
.ins-head {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px; border-bottom: 1px solid var(--line);
}
.ins-head .chip { width: 30px; height: 30px; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; }
.ins-head .nm { font-weight: 600; font-size: 13px; }
.ins-head .ty { font-size: 11px; color: var(--ink-3); }
.ins-body { padding: 14px 16px; display: grid; gap: 12px; }

/* Approval flow (review step) */
.flow {
  display: flex; align-items: stretch; gap: 0;
  margin: 8px 0;
}
.flow .node {
  flex: 1;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 14px;
  background: var(--bg-elev);
  position: relative;
}
.flow .node .ic {
  width: 30px; height: 30px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 10px;
}
.flow .node .nt { font-size: 12.5px; font-weight: 600; }
.flow .node .ns { font-size: 11px; color: var(--ink-3); margin-top: 2px; }
.flow .node.done .ic { background: var(--ok-soft); color: var(--ok); }
.flow .node.current { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.flow .node.current .ic { background: var(--accent-soft); color: var(--accent-ink); }
.flow .node.todo { opacity: 0.7; }
.flow .node.todo .ic { background: var(--bg-sunken); color: var(--ink-3); }
.flow .arrow { display: flex; align-items: center; color: var(--ink-4); padding: 0 6px; }

/* Compliance items */
/* ---------- Parichay-style SSO screen ---------- */
.parichay-stage {
  min-height: 100vh;
  background:
    radial-gradient(ellipse at 18% 32%, oklch(0.32 0.06 240) 0%, transparent 45%),
    radial-gradient(ellipse at 82% 70%, oklch(0.3 0.08 230) 0%, transparent 50%),
    linear-gradient(180deg, oklch(0.21 0.05 240), oklch(0.18 0.04 240));
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-rows: 1fr;
  padding: 24px;
}
.parichay-stage::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 1px 1px, oklch(0.9 0.02 240 / 0.18) 1px, transparent 1px),
    linear-gradient(135deg, transparent 0 48%, oklch(0.6 0.05 240 / 0.06) 49% 51%, transparent 52% 100%);
  background-size: 24px 24px, 240px 240px;
  pointer-events: none;
}
.parichay-stage::after {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(circle 220px at 12% 18%, oklch(0.4 0.08 230 / 0.35), transparent 60%),
    radial-gradient(circle 180px at 88% 84%, oklch(0.35 0.1 230 / 0.3), transparent 60%);
  pointer-events: none;
}
.parichay-lang {
  position: absolute;
  top: 24px; right: 24px;
  z-index: 5;
  background: oklch(0.45 0.12 240);
  color: white;
  border: none;
  font: 500 13px var(--font-ui);
  padding: 8px 16px 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  display: flex; align-items: center; gap: 6px;
}
.parichay-lang:hover { background: oklch(0.4 0.13 240); }

.parichay-wrap {
  position: relative;
  z-index: 2;
  display: flex; align-items: center; justify-content: center;
}
.parichay-card {
  width: 100%;
  max-width: 880px;
  background: white;
  border-radius: 6px;
  box-shadow: 0 20px 60px -20px oklch(0.1 0.02 240 / 0.5), 0 8px 24px -8px oklch(0.1 0.02 240 / 0.3);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto 1fr;
}
.parichay-ministry-strip {
  grid-column: 1 / -1;
  display: flex;
  gap: 0;
  padding: 14px 0;
  background: white;
  border-bottom: 1px solid var(--line-2);
}
.parichay-ministry-strip .seg {
  flex: 1;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 0 14px;
  border-right: 1px solid var(--line-2);
  min-height: 44px;
}
.parichay-ministry-strip .seg:last-child { border-right: none; }
.parichay-ministry-strip .logo-ph {
  width: 32px; height: 32px;
  border-radius: 4px;
  background: var(--bg-sunken);
  display: inline-flex; align-items: center; justify-content: center;
  font: 600 9px var(--font-ui);
  color: var(--ink-2);
  border: 1px dashed var(--line);
  flex-shrink: 0;
  text-align: center;
  line-height: 1;
}
.parichay-ministry-strip .ttl {
  font-size: 10.5px;
  line-height: 1.25;
  color: oklch(0.4 0.1 240);
  font-weight: 600;
}
.parichay-ministry-strip .ttl em { font-style: normal; color: var(--ink-3); font-weight: 400; }

.parichay-brand-panel {
  background: linear-gradient(155deg, oklch(0.55 0.13 220), oklch(0.45 0.13 230));
  color: white;
  padding: 32px 36px 28px;
  position: relative;
}
.parichay-brand-panel .wordmark {
  display: flex; align-items: center; gap: 14px;
  justify-content: center;
  margin: 8px 0 6px;
}
.parichay-brand-panel .wordmark .key {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: white;
  color: oklch(0.5 0.13 230);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 28px;
  box-shadow: 0 4px 12px oklch(0.2 0.05 240 / 0.3);
}
.parichay-brand-panel .wordmark .name {
  font-family: var(--font-display);
  font-size: 38px;
  letter-spacing: 0.04em;
  font-weight: 400;
}
.parichay-brand-panel .tagline {
  text-align: center;
  font-size: 11.5px;
  font-style: italic;
  letter-spacing: 0.06em;
  opacity: 0.9;
  margin-bottom: 22px;
}
.parichay-brand-panel .form-label {
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 12px;
}
.parichay-brand-panel .pinput {
  width: 100%;
  height: 38px;
  background: oklch(1 0 0 / 0.06);
  border: none;
  border-bottom: 1px solid oklch(1 0 0 / 0.35);
  color: white;
  font: 500 13px var(--font-ui);
  padding: 0 6px 0 28px;
  margin-bottom: 14px;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
}
.parichay-brand-panel .pinput::placeholder { color: oklch(1 0 0 / 0.55); }
.parichay-brand-panel .pinput:focus { border-bottom-color: white; background: oklch(1 0 0 / 0.1); }
.parichay-brand-panel .pinput-wrap { position: relative; }
.parichay-brand-panel .pinput-wrap .ico-l {
  position: absolute; left: 4px; top: 9px; opacity: 0.8;
}
.parichay-brand-panel .pinput-wrap .ico-r {
  position: absolute; right: 6px; top: 9px; opacity: 0.7; cursor: pointer;
}
.parichay-brand-panel .checks { font-size: 12px; display: flex; flex-direction: column; gap: 8px; margin: 6px 0 14px; }
.parichay-brand-panel .checks label { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.parichay-brand-panel .checks input { accent-color: white; }
.parichay-brand-panel .checks a { color: oklch(0.9 0.08 75); text-decoration: underline; }
.parichay-brand-panel .row-bot {
  display: flex; align-items: center; gap: 12px;
}
.parichay-brand-panel .next-btn {
  background: oklch(0.55 0.12 200);
  color: white;
  border: none;
  font: 500 13px var(--font-ui);
  padding: 9px 20px;
  border-radius: 3px;
  cursor: pointer;
}
.parichay-brand-panel .next-btn:hover { background: oklch(0.5 0.13 200); }
.parichay-brand-panel .pwless-toggle {
  margin-left: auto;
  width: 36px; height: 36px;
  background: white;
  color: oklch(0.5 0.13 230);
  border-radius: 4px;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.parichay-brand-panel .forgot {
  display: block;
  margin-top: 14px;
  font-size: 12.5px;
  color: white;
  text-decoration: underline;
  cursor: pointer;
}

.parichay-info-panel {
  padding: 26px 30px;
  background: white;
  display: flex; flex-direction: column; gap: 14px;
}
.parichay-info-card {
  border-radius: 4px;
  padding: 14px 16px;
  font-size: 12.5px;
  line-height: 1.4;
}
.parichay-info-card .lbl {
  font-weight: 700;
  font-size: 13.5px;
  margin-bottom: 4px;
  color: var(--ink);
}
.parichay-info-card.tip { background: oklch(0.94 0.08 80); color: oklch(0.3 0.07 70); }
.parichay-info-card.tip .lbl { color: oklch(0.32 0.1 70); }
.parichay-info-card.quote { background: oklch(0.7 0.1 340 / 0.85); color: white; }
.parichay-info-card.quote .lbl { color: white; }
.parichay-info-card.app {
  background: white; border: 1px solid var(--line);
  display: flex; align-items: center; gap: 14px;
}
.parichay-info-card.app .app-pill {
  background: oklch(0.32 0.06 240);
  color: white;
  padding: 8px 12px;
  border-radius: 100px;
  font-size: 12.5px;
  font-weight: 600;
  display: inline-flex; align-items: center; gap: 6px;
}
.parichay-info-card.app .stores {
  display: flex; gap: 8px;
  margin-left: auto;
}
.parichay-info-card.app .store-ph {
  width: 28px; height: 28px;
  border-radius: 4px;
  background: var(--bg-sunken);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--ink-2);
  border: 1px solid var(--line);
}
.parichay-info-card.app .caption {
  font-size: 11px; color: var(--ink-3);
  flex-basis: 100%; margin-top: 6px; text-align: center;
}
.parichay-info-bottom-links {
  display: flex; justify-content: space-around;
  font-size: 11.5px;
  color: var(--ink-2);
  margin-top: auto;
  padding-top: 8px;
}
.parichay-info-bottom-links a {
  color: var(--ink-2);
  text-align: center;
  line-height: 1.3;
  display: flex; align-items: center; gap: 4px;
}
.parichay-info-bottom-links a:hover { color: var(--accent); }

.parichay-a11y {
  position: absolute;
  bottom: 24px; right: 24px;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: oklch(0.55 0.13 220);
  color: white;
  border: none;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px oklch(0.2 0.05 240 / 0.4);
  z-index: 5;
}

.parichay-mock-banner {
  position: absolute;
  top: 24px; left: 24px;
  background: oklch(0.95 0.08 75);
  color: oklch(0.35 0.13 70);
  border: 1px solid oklch(0.85 0.1 75);
  padding: 6px 12px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 500;
  z-index: 5;
  display: flex; align-items: center; gap: 6px;
}


.compliance-row {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px;
  border-top: 1px solid var(--line-2);
}
.compliance-row:first-child { border-top: none; }
.compliance-row .desc { flex: 1; }
.compliance-row .ttl { font-weight: 500; }
.compliance-row .sub { font-size: 11.5px; color: var(--ink-3); margin-top: 2px; }
