/* DPDPA Privacy Dashboard — design system */
:root {
  --ink: #14171F;
  --ink-2: #2A2F3A;
  --muted: #6B7280;
  --muted-2: #9CA3AF;
  --bg: #F5F4EE;
  --bg-2: #EEEDE6;
  --surface: #FFFFFF;
  --border: #E2DFD3;
  --border-2: #ECEAE0;
  --accent: #1F4F8B;
  --accent-tint: #E8EEF6;
  --ok: #15803D;
  --ok-tint: #E6F2EA;
  --warn: #B45309;
  --warn-tint: #FBF1E0;
  --danger: #B42318;
  --danger-tint: #FBEAE7;
  --violet: #5B4FCF;
  --violet-tint: #ECEAF8;

  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --shadow-sm: 0 1px 0 rgba(20,23,31,.04);
  --shadow-md: 0 1px 2px rgba(20,23,31,.05), 0 4px 12px rgba(20,23,31,.04);
  --font-sans: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --font-serif: "IBM Plex Serif", Georgia, serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  font-size: 13px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "cv11", "ss01";
}

/* ── Layout ─────────────────────────────────────────────────────────── */
.app { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100vh; }

.sidebar {
  background: var(--bg);
  border-right: 1px solid var(--border);
  padding: 18px 12px 18px;
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
  overflow: hidden;
}
.nav-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  margin: 0 -6px;
  padding: 0 6px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.nav-scroll::-webkit-scrollbar { width: 8px; }
.nav-scroll::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.nav-scroll::-webkit-scrollbar-track { background: transparent; }
.brand {
  display: flex; align-items: center; gap: 10px;
  padding: 4px 8px 18px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}
.brand-mark {
  width: 28px; height: 28px; border-radius: 7px;
  background: var(--ink); color: var(--bg);
  display: grid; place-items: center;
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  letter-spacing: -0.02em;
}
.brand-name { font-weight: 600; font-size: 13.5px; letter-spacing: -0.01em; }
.brand-sub { font-size: 10.5px; color: var(--muted); margin-top: -2px; font-family: var(--font-mono); }

.nav-group { display: flex; flex-direction: column; gap: 1px; }
.nav-label {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--muted-2); font-weight: 600;
  padding: 14px 8px 6px;
}
.nav-item {
  display: flex; align-items: center; gap: 9px;
  padding: 6px 8px; border-radius: var(--r-sm);
  color: var(--ink-2); cursor: pointer;
  font-size: 12.5px; font-weight: 450;
  border: none; background: none; text-align: left; width: 100%;
  position: relative;
}
.nav-item:hover { background: var(--bg-2); }
.nav-item.active {
  background: var(--surface);
  color: var(--ink);
  font-weight: 550;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-2);
}
.nav-item .ico { width: 14px; height: 14px; color: var(--muted); flex-shrink: 0; }
.nav-item.active .ico { color: var(--accent); }
.nav-item .badge {
  margin-left: auto;
  background: var(--ink); color: var(--bg);
  font-family: var(--font-mono); font-size: 9.5px;
  padding: 1px 5px; border-radius: 4px; font-weight: 500;
}
.nav-item .badge.warn { background: var(--warn); color: #fff; }
.nav-item .badge.danger { background: var(--danger); color: #fff; }

.sidebar-foot {
  margin-top: auto;
  border-top: 1px solid var(--border);
  padding-top: 12px;
  display: flex; align-items: center; gap: 10px;
  font-size: 11.5px;
}
.avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: linear-gradient(135deg, #2A4570, #1F4F8B);
  color: #fff; display: grid; place-items: center;
  font-weight: 600; font-size: 11px;
}
.avatar.sm { width: 22px; height: 22px; font-size: 9.5px; }

/* ── Topbar ─────────────────────────────────────────────────────────── */
.main { display: flex; flex-direction: column; min-width: 0; }
.data-mode-bar {
  display: flex; align-items: center; gap: 10px;
  margin-left: auto; flex-shrink: 0;
}
.data-mode-bar .tag { font-size: 10.5px; }

.topbar {
  display: flex; align-items: center; gap: 16px;
  padding: 12px 28px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky; top: 0; z-index: 5;
  flex-wrap: wrap;
}
.breadcrumb { font-size: 12px; color: var(--muted); }
.breadcrumb b { color: var(--ink); font-weight: 550; }
.search {
  margin-left: auto;
  display: flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--border);
  padding: 5px 10px; border-radius: var(--r-sm);
  width: 280px; font-size: 12px;
}
.search input { border: 0; outline: 0; background: transparent; flex: 1; font-family: inherit; font-size: 12px; color: var(--ink); }
.search .kbd {
  font-family: var(--font-mono); font-size: 10px;
  background: var(--bg-2); padding: 1px 5px; border-radius: 4px;
  color: var(--muted);
}
.iconbtn {
  width: 30px; height: 30px; border-radius: var(--r-sm);
  background: transparent; border: 1px solid transparent;
  display: grid; place-items: center; color: var(--ink-2);
  cursor: pointer; position: relative;
}
.iconbtn:hover { background: var(--bg-2); }
.iconbtn .dot {
  position: absolute; top: 6px; right: 6px;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--danger); border: 1.5px solid var(--bg);
}

/* ── Page chrome ────────────────────────────────────────────────────── */
.page { padding: 24px 28px 60px; max-width: min(1480px, 100%); min-width: 0; }
.page-head { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 16px; margin-bottom: 22px; }

.module-guide {
  margin: 16px 28px 0;
  max-width: 1480px;
  background: var(--accent-tint, rgba(31, 79, 139, 0.08));
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--r-md);
  padding: 14px 16px 16px;
}
.module-guide-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 8px;
}
.module-guide-head > div { flex: 1; min-width: 0; }
.module-guide-kicker {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 2px;
}
.module-guide h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.module-guide p,
.module-guide li {
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--ink-2);
  margin: 0;
}
.module-guide-how-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 12px 0 6px;
}
.module-guide ol {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.module-guide-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 14px 28px 0;
  padding: 6px 10px;
  border-radius: var(--r-sm);
  border: 1px dashed var(--border);
  background: var(--surface);
  color: var(--accent);
  font-size: 12px;
  font-weight: 550;
  font-family: inherit;
  cursor: pointer;
}
.module-guide-toggle:hover { background: var(--bg-2); }
.page-head h1 { font-size: 22px; font-weight: 600; letter-spacing: -0.015em; margin: 0; line-height: 1.1; }
.page-head .sub { color: var(--muted); font-size: 12.5px; margin-top: 4px; }
.page-head .actions { margin-left: auto; display: flex; gap: 8px; }

/* ── Buttons ────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 11px; border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--surface); color: var(--ink);
  font-size: 12px; font-weight: 500; cursor: pointer;
  font-family: inherit;
}
.btn:hover { background: var(--bg-2); }
.btn.primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn.primary:hover { background: #000; }
.btn.accent { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn.ghost:hover { background: var(--bg-2); }
.btn.sm { padding: 3px 8px; font-size: 11.5px; }
.btn.danger { color: var(--danger); border-color: var(--danger-tint); background: var(--surface); }
.btn .ico { width: 13px; height: 13px; }

/* ── Cards ──────────────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  min-width: 0;
  max-width: 100%;
}
.card-head {
  padding: 14px 16px; border-bottom: 1px solid var(--border-2);
  display: flex; align-items: center; gap: 10px;
}
.card-head h3 { margin: 0; font-size: 13px; font-weight: 600; letter-spacing: -0.005em; }
.card-head .sub { color: var(--muted); font-size: 11.5px; margin-left: auto; }
.systems-search {
  margin-left: auto;
  display: flex; align-items: center; gap: 8px;
  background: var(--bg); border: 1px solid var(--border);
  padding: 5px 10px; border-radius: var(--r-sm);
  width: min(240px, 100%);
}
.systems-search input {
  border: 0; outline: 0; background: transparent; flex: 1; min-width: 0;
  font-family: inherit; font-size: 12px; color: var(--ink);
}
.systems-search input::placeholder { color: var(--muted); }
.card-body { padding: 16px; }
.card-body.flush { padding: 0; }

/* ── Stat tiles ─────────────────────────────────────────────────────── */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
  gap: 12px 14px;
  margin-bottom: 22px;
}
.stat {
  background: var(--surface); border: 1px solid var(--border-2);
  border-radius: var(--r-md); padding: 14px 16px;
  display: flex; flex-direction: column; gap: 4px;
  position: relative; overflow: hidden;
}
.stat .lbl { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; font-weight: 550; }
.stat .val { font-size: 26px; font-weight: 600; letter-spacing: -0.02em; font-family: var(--font-sans); }
.stat .val .unit { font-size: 13px; color: var(--muted); font-weight: 500; margin-left: 4px; }
.stat .delta { font-size: 11px; font-family: var(--font-mono); display: inline-flex; align-items: center; gap: 4px; }
.stat .delta.up { color: var(--ok); }
.stat .delta.down { color: var(--danger); }
.stat .delta.neutral { color: var(--muted); }
.stat .spark { position: absolute; right: 12px; top: 14px; opacity: 0.6; }

/* ── Tags / chips ───────────────────────────────────────────────────── */
.tag {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 500;
  padding: 2px 7px; border-radius: 999px;
  background: var(--bg-2); color: var(--ink-2);
  white-space: nowrap;
}
.tag.ok { background: var(--ok-tint); color: var(--ok); }
.tag.warn { background: var(--warn-tint); color: var(--warn); }
.tag.danger { background: var(--danger-tint); color: var(--danger); }
.tag.accent { background: var(--accent-tint); color: var(--accent); }
.tag.violet { background: var(--violet-tint); color: var(--violet); }
.tag .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ── Table ──────────────────────────────────────────────────────────── */
.table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 12.5px;
}
.table thead th {
  text-align: left; font-weight: 550; font-size: 10.5px;
  text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--muted); padding: 9px 12px;
  border-bottom: 1px solid var(--border-2);
  background: var(--bg-2);
  white-space: nowrap;
  vertical-align: bottom;
  overflow: hidden;
  text-overflow: ellipsis;
}
.table tbody td {
  padding: 10px 12px; border-bottom: 1px solid var(--border-2);
  vertical-align: top;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: #FAF9F4; cursor: pointer; }
.table tbody tr.selected { background: var(--accent-tint); }
.table .mono {
  font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-2);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.table .name {
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.table td:has(.name),
.table td:has(.meta) {
  white-space: normal;
}
.table td .name,
.table td .meta {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.35;
}
.table .meta { color: var(--muted); font-size: 11.5px; margin-top: 2px; }
.table .row-grip { color: var(--muted-2); width: 16px; }
.table td:has(.tag),
.table td:has(.bar) { white-space: normal; }
.table td:has(.btn) {
  white-space: nowrap;
  text-align: right;
  overflow: visible;
}
.table th:last-child:empty,
.table .col-actions {
  width: 84px;
  text-align: right;
}
.table td:has(.bar) { overflow: hidden; }
.table .col-id { width: 88px; }
.table .col-code { width: 128px; }
.table .col-name { width: 18%; }
.table .col-purpose { width: 26%; }
.table .col-owner { width: 12%; }
.table .col-tag { width: 120px; }
.table .col-status { width: 112px; }
.table .col-date { width: 108px; }
.table .col-num { width: 76px; }
.table .col-progress { width: 14%; }
.table .col-wide { width: 22%; }
.table .col-actions-wide { width: 168px; text-align: right; white-space: nowrap; }
.table-wide .table { min-width: 1280px; }
.table-compact .table { min-width: 640px; }

.table-scroll,
.table-card {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.table-card .table td > div {
  min-width: 0;
  max-width: 100%;
}
.discovery-table-card {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}
.page .card:has(> table.table),
.page .card:has(> .filterbar),
.page .card:has(> .card-head + table.table) {
  overflow-x: auto;
  max-width: 100%;
}
.page table.table {
  min-width: 1040px;
}
.page table.table-compact,
.table-compact .table {
  min-width: 560px;
}
.table-wide .table,
.page .table-wide table.table {
  min-width: 1280px;
}
.discovery-findings {
  min-width: 1240px;
  width: max-content;
}
.discovery-findings th,
.discovery-findings td {
  overflow: hidden;
  text-overflow: ellipsis;
}
.discovery-findings .col-finding { width: 200px; max-width: 200px; }
.discovery-findings .col-file { width: 120px; max-width: 120px; }
.discovery-findings .col-type { width: 96px; max-width: 96px; }
.discovery-findings .col-class { width: 110px; max-width: 110px; }
.discovery-findings .col-system { width: 150px; max-width: 150px; }
.discovery-findings .col-num { width: 78px; max-width: 78px; white-space: nowrap; }
.discovery-findings .col-status { width: 110px; max-width: 110px; }
.discovery-findings .col-actions { width: 210px; max-width: 210px; white-space: nowrap; }
.discovery-findings .col-samples {
  width: 200px;
  max-width: 220px;
  overflow: visible;
  white-space: normal;
}
.finding-samples {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.finding-sample {
  display: inline-block;
  max-width: 100%;
  font-size: 11px;
  line-height: 1.3;
  word-break: break-all;
  background: var(--bg);
  border: 1px solid var(--border-2);
  border-radius: 4px;
  padding: 2px 6px;
}
.discovery-findings .col-file,
.discovery-findings .col-type,
.discovery-findings .col-system {
  white-space: nowrap;
}
.discovery-findings .col-finding .meta {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Progress / bars ────────────────────────────────────────────────── */
.bar { height: 6px; background: var(--bg-2); border-radius: 999px; overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.bar.ok > span { background: var(--ok); }
.bar.warn > span { background: var(--warn); }
.bar.danger > span { background: var(--danger); }

/* ── Grids ──────────────────────────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }

/* ── Drawer ─────────────────────────────────────────────────────────── */
.drawer-mask {
  position: fixed; inset: 0; background: rgba(20,23,31,.32);
  z-index: 50; backdrop-filter: blur(2px);
}
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(640px, 100%);
  background: var(--surface); z-index: 51;
  display: flex; flex-direction: column;
  border-left: 1px solid var(--border);
  box-shadow: -16px 0 40px rgba(20,23,31,.08);
  animation: slideIn .22s ease;
}
@keyframes slideIn { from { transform: translateX(20px); opacity: 0; } to { transform: none; opacity: 1; } }
.drawer-head {
  padding: 16px 22px; border-bottom: 1px solid var(--border-2);
  display: flex; align-items: flex-start; gap: 10px;
}
.drawer-head h2 { margin: 0; font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
.drawer-head .sub { color: var(--muted); font-size: 12px; margin-top: 3px; }
.drawer-body { padding: 18px 22px; overflow-y: auto; flex: 1; }
.drawer-foot {
  padding: 12px 22px; border-top: 1px solid var(--border-2);
  display: flex; gap: 8px; align-items: center;
}
.drawer-foot .spacer { flex: 1; }
.purpose-drawer-lead {
  margin: 0 0 16px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-2);
}
.purpose-drawer-h {
  margin: 18px 0 8px;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}
.purpose-related { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.purpose-related-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  text-align: left;
  border: 1px solid var(--border-2);
  background: var(--bg);
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  color: inherit;
}
.purpose-related-row:hover { border-color: var(--accent); background: var(--accent-tint); }
.purpose-related-row strong { display: block; font-size: 12.5px; }
.purpose-related-row .meta { display: block; margin-top: 2px; }
.purpose-person-row { cursor: default; }
.purpose-person-row:hover { border-color: var(--border-2); background: var(--bg); }
.table tbody tr[tabindex] { outline: none; }
.table tbody tr[tabindex]:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

/* ── Field rows ─────────────────────────────────────────────────────── */
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 6px 12px; font-size: 12.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; color: var(--ink); }

/* ── Timeline ───────────────────────────────────────────────────────── */
.timeline { display: flex; flex-direction: column; gap: 4px; padding-left: 8px; position: relative; }
.timeline::before {
  content: ""; position: absolute; left: 4px; top: 6px; bottom: 6px;
  width: 1px; background: var(--border);
}
.tl-item { display: flex; gap: 12px; padding: 6px 0 6px 14px; position: relative; }
.tl-item::before {
  content: ""; position: absolute; left: 0; top: 10px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--muted-2);
}
.tl-item.ok::before { border-color: var(--ok); }
.tl-item.warn::before { border-color: var(--warn); }
.tl-item.danger::before { border-color: var(--danger); }
.tl-item.accent::before { border-color: var(--accent); }
.tl-meta { font-size: 11px; color: var(--muted); font-family: var(--font-mono); min-width: 86px; }
.tl-body .t, .tl-title { font-weight: 600; font-size: 13px; }
.tl-body .d, .tl-desc { color: var(--ink-2); font-size: 12px; margin-top: 3px; white-space: pre-wrap; line-height: 1.4; }
.tl-ts { font-size: 11px; color: var(--muted); font-family: var(--font-mono); margin-top: 4px; }

.ticket-list { display: flex; flex-direction: column; }
.ticket-row {
  display: flex; align-items: flex-start; gap: 14px;
  width: 100%; text-align: left;
  padding: 14px 16px;
  border: 0; border-bottom: 1px solid var(--border-2);
  background: transparent; color: inherit;
  font-family: inherit; cursor: pointer;
}
.ticket-row:hover { background: var(--bg); }
.ticket-row-main { flex: 1; min-width: 0; }
.ticket-row-title {
  font-size: 13.5px; font-weight: 600; letter-spacing: -0.01em;
  line-height: 1.35; margin-bottom: 6px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ticket-row-meta {
  display: flex; flex-wrap: wrap; gap: 6px 10px;
  align-items: center; font-size: 12px; color: var(--muted);
}
.ticket-row-side {
  display: flex; flex-direction: column; align-items: flex-end; gap: 6px;
  flex-shrink: 0;
}
.ticket-sla-chip {
  font-size: 11px; font-family: var(--font-mono); font-weight: 500;
}
.ticket-sla-chip.danger { color: var(--danger); }
.ticket-sla-chip.warn { color: var(--warn); }
.ticket-sla-chip.ok { color: var(--ok); }
.ticket-sla-chip.muted { color: var(--muted); }
.ticket-head-tags { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.ticket-sla {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 12px;
  padding: 12px 14px; border-radius: 10px; margin-bottom: 12px;
  background: var(--bg); border: 1px solid var(--border-2);
}
.ticket-sla.danger { background: var(--danger-tint); border-color: transparent; }
.ticket-sla.warn { background: var(--warn-tint, #fff6e8); border-color: transparent; }
.ticket-sla.ok { background: var(--ok-tint, #eef8f1); border-color: transparent; }
.ticket-sla-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.ticket-sla-value { font-size: 20px; font-weight: 650; font-family: var(--font-mono); letter-spacing: -0.03em; margin-top: 2px; }
.ticket-sla-hint { font-size: 12px; color: var(--ink-2); max-width: 240px; text-align: right; line-height: 1.35; }
.ticket-next {
  font-size: 12.5px; line-height: 1.4; margin-bottom: 16px;
  padding: 10px 12px; border-radius: 8px;
  background: var(--accent-tint, rgba(31, 79, 139, .08));
  color: var(--ink);
}
.ticket-block { margin-bottom: 18px; }
.ticket-label {
  font-size: 11px; text-transform: uppercase; letter-spacing: .06em;
  font-weight: 600; color: var(--muted); margin-bottom: 6px;
}
.ticket-ask {
  font-size: 14px; line-height: 1.45;
  padding: 12px 14px; border-radius: 10px; background: var(--bg);
}
.ticket-ask-quiet { font-size: 13px; }
.ticket-ask-ok { background: var(--ok-tint, #eef8f1); }
.ticket-purpose { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13px; }
.ticket-foot { flex-wrap: wrap; }
.ticket-outcome { padding: 0 22px 16px; display: grid; gap: 8px; }

/* ── Misc ───────────────────────────────────────────────────────────── */
.empty {
  padding: 28px; text-align: center; color: var(--muted); font-size: 12.5px;
}
.divider { height: 1px; background: var(--border-2); margin: 14px 0; }
.text-mono { font-family: var(--font-mono); }
.text-muted { color: var(--muted); }
.text-danger { color: var(--danger); }
.text-ok { color: var(--ok); }
.text-warn { color: var(--warn); }

/* Tab strip */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.tab {
  padding: 8px 12px; font-size: 12px; font-weight: 500;
  color: var(--muted); cursor: pointer; border: none; background: none;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  font-family: inherit;
}
.tab:hover { color: var(--ink); }
.tab.active { color: var(--ink); border-bottom-color: var(--ink); }

/* Donut */
.donut { position: relative; width: 140px; height: 140px; }
.donut svg { transform: rotate(-90deg); }
.donut-center {
  position: absolute; inset: 0; display: grid; place-items: center; text-align: center;
}
.donut-center .v { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; }
.donut-center .l { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }

/* Compliance score ring */
.ring {
  width: 92px; height: 92px; position: relative; display: grid; place-items: center;
}

/* Filter bar */
.filterbar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 10px 16px; border-bottom: 1px solid var(--border-2);
  background: var(--bg);
}
.filterbar .chip {
  padding: 4px 9px; border-radius: 999px; font-size: 11.5px;
  background: var(--surface); border: 1px solid var(--border);
  cursor: pointer; color: var(--ink-2); font-weight: 500;
}
.filterbar .chip.active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.filterbar .spacer { flex: 1; }

/* ── Login (DataKavach) ─────────────────────────────────────────────── */
.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
}
@media (max-width: 860px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-brand { display: none; }
}

.login-logo { display: flex; align-items: center; gap: 11px; }
.login-logo-mark {
  width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0;
  display: grid; place-items: center;
  font-family: var(--font-mono); font-weight: 600; font-size: 14px; letter-spacing: -0.02em;
  background: linear-gradient(135deg, #1F4F8B, #2A4570);
  color: #fff; box-shadow: var(--shadow-sm);
}
.login-logo-name { font-size: 17px; font-weight: 650; letter-spacing: -0.02em; }
.login-logo-sub { font-size: 11px; color: var(--muted); font-family: var(--font-mono); margin-top: 1px; }
.login-logo-sm { margin-bottom: 18px; }
.login-logo-sm .login-logo-mark { width: 32px; height: 32px; font-size: 12px; }

/* Left brand panel */
.login-brand {
  position: relative;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 44px 48px;
  color: #eef2f8;
  background:
    radial-gradient(900px 500px at 12% -10%, rgba(63,116,179,0.45), transparent 60%),
    linear-gradient(160deg, #0e1c33 0%, #122a4d 55%, #0c1830 100%);
  overflow: hidden;
}
.login-brand .login-logo-name { color: #fff; }
.login-brand .login-logo-sub { color: #9fb4d4; }
.login-brand-mid h1 {
  font-size: 34px; line-height: 1.12; letter-spacing: -0.02em; font-weight: 650;
  margin: 0 0 14px; color: #fff;
}
.login-brand-mid p { color: #b9c8e0; font-size: 13.5px; line-height: 1.6; max-width: 440px; margin: 0 0 26px; }
.login-highlights { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.login-highlights li { display: flex; gap: 11px; align-items: flex-start; }
.login-hi-dot {
  width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; flex-shrink: 0;
  background: #4f9cff; box-shadow: 0 0 0 4px rgba(79,156,255,0.18);
}
.login-highlights b { display: block; font-size: 13px; color: #fff; font-weight: 550; }
.login-highlights span { display: block; font-size: 12px; color: #9fb4d4; margin-top: 1px; }
.login-brand-foot { font-size: 11px; color: #7e93b5; font-family: var(--font-mono); }

/* Right form panel */
.login-main {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 24px; background: var(--bg); position: relative;
}
.login-topbar { position: absolute; top: 18px; right: 22px; }
.login-card {
  width: min(380px, 100%);
  display: flex; flex-direction: column;
}
.portal-card { width: min(440px, 100%); }
.login-card h2 { font-size: 21px; font-weight: 620; letter-spacing: -0.015em; margin: 0 0 4px; }
.login-card-sub { font-size: 12.5px; color: var(--muted); margin: 0 0 22px; }
.login-card .form-field { margin-bottom: 14px; }
.login-card input,
.login-card select,
.login-card textarea {
  width: 100%; padding: 10px 12px; border-radius: var(--r-sm);
  border: 1px solid var(--border); background: var(--surface);
  font-family: inherit; font-size: 13px; color: var(--ink);
}
.login-card input:focus,
.login-card select:focus,
.login-card textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-tint); }
.portal-tabs {
  display: flex; gap: 4px; padding: 4px; margin: 0 0 18px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
}
.portal-tabs button {
  flex: 1; border: none; background: transparent; cursor: pointer;
  padding: 8px 10px; border-radius: 8px; font: inherit; font-size: 13px; font-weight: 550; color: var(--ink-2);
}
.portal-tabs button.on { background: var(--ink); color: var(--bg); }
.portal-ok { font-size: 12.5px; color: var(--ok); margin: 0 0 12px; line-height: 1.45; }
.login-pw { position: relative; display: flex; align-items: center; }
.login-pw input { padding-right: 58px; }
.login-pw-toggle {
  position: absolute; right: 6px; border: none; background: none; cursor: pointer;
  font-size: 11px; font-weight: 600; color: var(--accent); padding: 4px 6px; border-radius: 6px;
}
.login-pw-toggle:hover { background: var(--accent-tint); }
.login-error {
  font-size: 12px; color: var(--danger);
  background: var(--danger-tint); border-radius: var(--r-sm);
  padding: 8px 10px; margin-bottom: 12px;
}
.login-submit { width: 100%; justify-content: center; margin-top: 4px; padding: 10px; font-size: 13px; }
.login-hint {
  margin-top: 18px; padding: 11px 12px; border-radius: var(--r-sm);
  background: var(--bg-2); border: 1px dashed var(--border-2);
  display: flex; flex-direction: column; gap: 3px;
}
.login-hint span { font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted-2); font-weight: 600; }
.login-hint code { font-family: var(--font-mono); font-size: 12px; color: var(--ink-2); }
.login-footer { position: absolute; bottom: 16px; font-size: 11px; color: var(--muted-2); }

/* Splash while checking session */
.login-splash {
  min-height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 18px; background: var(--bg);
}
.login-splash-bar { width: 180px; height: 3px; border-radius: 999px; background: var(--bg-2); overflow: hidden; }
.login-splash-bar span {
  display: block; height: 100%; width: 40%; border-radius: 999px; background: var(--accent);
  animation: splashSlide 1.1s ease-in-out infinite;
}
@keyframes splashSlide {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(330%); }
}

/* ── Toasts ──────────────────────────────────────────────────────────── */
.toast-stack {
  position: fixed; right: 18px; bottom: 18px; z-index: 80;
  display: flex; flex-direction: column; gap: 8px; max-width: 360px;
}
.toast {
  display: flex; align-items: center; gap: 10px;
  background: var(--ink); color: var(--bg);
  padding: 10px 12px; border-radius: var(--r-sm);
  box-shadow: var(--shadow-md); font-size: 12.5px; cursor: pointer;
  animation: toastIn .18s ease;
}
.toast .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted-2); flex-shrink: 0; }
.toast.ok .dot { background: var(--ok); }
.toast.warn .dot { background: var(--warn); }
.toast.danger .dot { background: var(--danger); }
.toast.info .dot { background: var(--accent); }
.toast-msg { flex: 1; line-height: 1.4; }
.toast-x { background: none; border: none; color: var(--muted-2); cursor: pointer; font-size: 12px; }
@keyframes toastIn { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ── Modal ───────────────────────────────────────────────────────────── */
.modal-mask {
  position: fixed; inset: 0; background: rgba(20,23,31,.40);
  z-index: 60; backdrop-filter: blur(2px);
}
.modal {
  position: fixed; z-index: 61; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: min(480px, calc(100vw - 32px)); max-height: calc(100vh - 48px);
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); box-shadow: var(--shadow-md);
  animation: toastIn .16s ease;
}
.modal-head {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 16px 20px; border-bottom: 1px solid var(--border-2);
}
.modal-head h2 { margin: 0; font-size: 15px; font-weight: 600; }
.modal-head .sub { color: var(--muted); font-size: 12px; margin-top: 3px; }
.modal-head .iconbtn { margin-left: auto; }
.modal-body { padding: 16px 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }

/* ── Forms ───────────────────────────────────────────────────────────── */
.modal.modal-wide { width: min(840px, calc(100vw - 32px)); }
.modal.modal-ropa { width: min(880px, calc(100vw - 24px)); }
.form-section { border: none; margin: 0; padding: 0; min-width: 0; }
.form-section + .form-section { margin-top: 6px; padding-top: 16px; border-top: 1px solid var(--border-2); }
.form-section-card {
  background: var(--bg);
  border: 1px solid var(--border-2) !important;
  border-radius: 12px;
  padding: 14px 16px 16px !important;
}
.form-section-card + .form-section-card {
  margin-top: 10px;
  padding-top: 14px !important;
  border-top: 1px solid var(--border-2) !important;
}
.modal-ropa .form-section + .form-section {
  margin-top: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--border-2);
}
.form-section-title {
  font-size: 13px; font-weight: 700; letter-spacing: 0;
  text-transform: none;
  color: var(--ink); padding: 0; margin-bottom: 6px;
  display: flex; align-items: center; gap: 8px;
}
.form-step {
  display: inline-grid; place-items: center;
  width: 22px; height: 22px; border-radius: 999px; flex: 0 0 22px;
  background: var(--accent); color: #fff; font-size: 11px; font-weight: 700;
}
.form-section-help { font-size: 12px; color: var(--muted); margin: 0 0 12px; line-height: 1.45; max-width: 62ch; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .span-2 { grid-column: 1 / -1; }
.form-popup {
  display: flex; flex-direction: column; gap: 12px;
  padding: 14px; border-radius: 10px;
  border: 1px solid var(--accent);
  background: var(--accent-tint, rgba(37, 99, 235, 0.08));
  animation: form-popup-in 0.18s ease-out;
}
.form-popup-title {
  font-size: 12px; font-weight: 700; color: var(--accent);
}
@keyframes form-popup-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: none; }
}
@media (max-width: 560px) { .form-grid { grid-template-columns: 1fr; } }
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-label { font-size: 12px; font-weight: 600; color: var(--ink); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.form-help { font-size: 11px; color: var(--muted); line-height: 1.45; }
.form-checks { display: flex; flex-direction: column; gap: 6px; }
.form-check { display: flex; align-items: flex-start; gap: 8px; font-size: 12.5px; line-height: 1.35; }
.form-check input { margin-top: 2px; }
.field-tag {
  font-size: 9.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  padding: 1px 6px; border-radius: 999px; line-height: 1.5;
}
.field-tag.required { background: var(--danger-tint, #fde8e8); color: var(--danger); }
.field-tag.optional { background: var(--bg-2, #eee); color: var(--muted); }
.field-tag.review { background: #fbf0d4; color: #8a5a00; }
.form-field.needs-review input,
.form-field.needs-review select,
.form-field.needs-review textarea {
  border-color: #e3b341; background: #fffbeb;
}
.form-field.is-invalid input,
.form-field.is-invalid select,
.form-field.is-invalid textarea {
  border-color: var(--danger); box-shadow: 0 0 0 3px var(--danger-tint, #fde8e8);
}
.ropa-context {
  display: grid; gap: 12px;
  padding: 12px 14px; border-radius: 12px;
  border: 1px solid var(--border-2); background: var(--accent-tint, rgba(37, 99, 235, 0.08));
}
.ropa-context.discovery { border-color: #e3b341; background: #fffbeb; }
.ropa-context.edit { background: var(--bg); }
.ropa-context-title { font-size: 13px; font-weight: 700; color: var(--ink); }
.ropa-context-copy p { margin: 4px 0 0; font-size: 12px; color: var(--muted); line-height: 1.45; }
.ropa-facts {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px 12px; margin: 0;
}
.ropa-facts > div { min-width: 0; }
.ropa-facts dt { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.ropa-facts dd { margin: 2px 0 0; font-size: 12px; color: var(--ink); word-break: break-word; }
.ropa-progress { display: flex; flex-direction: column; gap: 6px; }
.ropa-progress-label { font-size: 11px; font-weight: 600; color: var(--ink-2); }
.modal.modal-ropa .modal-foot {
  align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 10px;
  position: sticky; bottom: 0; background: var(--surface); padding-top: 10px;
}
.ropa-table-hint {
  font-size: 12px; color: var(--muted); line-height: 1.45;
  padding: 0 16px 12px;
}
.pending-fill {
  border: none; cursor: pointer; font: inherit;
}
.pending-fill:hover { filter: brightness(0.97); }
.ms-field { position: relative; }
.ms-field-box {
  width: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  min-height: 40px; padding: 6px 10px; border-radius: var(--r-sm);
  border: 1px solid var(--border); background: var(--bg); cursor: text;
}
.ms-field-box.open,
.ms-field-box:focus-within {
  border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-tint, rgba(37, 99, 235, 0.12));
}
.ms-chip {
  display: inline-flex; align-items: center; gap: 4px;
  max-width: 100%; padding: 3px 6px 3px 8px; border-radius: 999px;
  background: var(--accent-tint, rgba(37, 99, 235, 0.12));
  color: var(--ink); font-size: 12px; line-height: 1.3;
}
.ms-chip-x {
  border: none; background: transparent; cursor: pointer;
  font-size: 14px; line-height: 1; color: var(--muted); padding: 0 2px;
}
.ms-chip-x:hover { color: var(--ink); }
.ms-field-search {
  flex: 1 1 140px; min-width: 120px; width: auto !important;
  border: none !important; box-shadow: none !important;
  background: transparent !important; padding: 4px 0 !important;
  font: inherit; font-size: 13px; color: var(--ink);
}
.ms-field-search:focus { outline: none; }
.ms-field-panel {
  position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 4px);
  max-height: 240px; overflow: auto;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-sm); box-shadow: var(--shadow-md); padding: 6px;
}
.ms-field-add {
  display: block; width: 100%; text-align: left;
  border: none; background: var(--accent-tint, rgba(37, 99, 235, 0.1));
  color: var(--accent); font: inherit; font-size: 12.5px; font-weight: 600;
  padding: 8px 10px; border-radius: 6px; cursor: pointer; margin-bottom: 4px;
}
.ms-field-add:hover { filter: brightness(0.97); }
.ms-field-option {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 7px 8px; border-radius: 6px; font-size: 13px; cursor: pointer;
  color: var(--ink);
}
.ms-field-option span { flex: 1; min-width: 0; }
.ms-field-option:hover { background: var(--bg-2); }
.ms-field-option.on { background: var(--accent-tint, rgba(37, 99, 235, 0.1)); }
.ms-field-option input[type="checkbox"] {
  width: 15px !important; height: 15px; flex: 0 0 15px;
  margin: 0; accent-color: var(--accent);
}
.ms-field-empty { padding: 10px 8px; font-size: 12px; color: var(--muted); }
.form-field input,
.form-field select,
.form-field textarea,
.note-input {
  width: 100%; padding: 9px 11px; border-radius: var(--r-sm);
  border: 1px solid var(--border); background: var(--bg);
  font-family: inherit; font-size: 13px; color: var(--ink); resize: vertical;
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus,
.note-input:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-tint);
}

/* ── Topbar search dropdown ──────────────────────────────────────────── */
.search-results {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 40;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md); box-shadow: var(--shadow-md);
  padding: 6px; max-height: 320px; overflow-y: auto;
}
.search-item {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 7px 8px; border: none; background: none; cursor: pointer;
  border-radius: var(--r-sm); font-family: inherit; font-size: 12.5px;
  color: var(--ink); text-align: left;
}
.search-item:hover { background: var(--bg-2); }
.search-item-label { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-empty { padding: 12px 8px; color: var(--muted); font-size: 12px; }

/* ── Notifications popover ───────────────────────────────────────────── */
.notif-pop {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 40;
  width: 320px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md); box-shadow: var(--shadow-md); padding: 6px;
  max-height: 380px; overflow-y: auto;
}
.notif-head {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em;
  font-weight: 600; color: var(--muted); padding: 8px 10px 4px;
}
.notif-live {
  display: flex; align-items: center; gap: 6px; font-size: 11px;
  color: var(--ok); padding: 0 10px 6px;
}
.notif-live .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.notif-item { padding: 8px 10px; border-top: 1px solid var(--border-2); }
.notif-action { font-size: 11.5px; font-weight: 600; }
.notif-target { font-size: 11.5px; color: var(--ink-2); margin-top: 1px; }
.notif-ts { font-size: 10.5px; color: var(--muted); margin-top: 2px; }

/* ── Language switcher ───────────────────────────────────────────────── */
.lang-switch {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 8px; border-radius: var(--r-sm);
  border: 1px solid var(--border); background: var(--surface);
  color: var(--muted); cursor: pointer;
}
.lang-switch select {
  border: none; background: none; font-family: inherit; font-size: 12px;
  font-weight: 600; color: var(--ink); cursor: pointer; outline: none;
}

/* ── Inline select (toolbars) ────────────────────────────────────────── */
.select-inline {
  padding: 7px 10px; border-radius: var(--r-sm);
  border: 1px solid var(--border); background: var(--surface);
  font-family: inherit; font-size: 12.5px; color: var(--ink); cursor: pointer;
}
.select-inline:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-tint); }

/* ── Permission grid (RBAC) ──────────────────────────────────────────── */
.perm-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
  max-height: 280px; overflow-y: auto;
}
.perm-item {
  display: flex; align-items: center; gap: 7px;
  padding: 7px 9px; border-radius: var(--r-sm);
  border: 1px solid var(--border-2); background: var(--bg);
  font-size: 11px; cursor: pointer;
}
.perm-item.on { border-color: var(--accent); background: var(--accent-tint); }
.perm-item input { accent-color: var(--accent); }

/* ── Discovery agent scanning ────────────────────────────────────────── */
.agent-spinner {
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
  border: 3px solid var(--accent-tint); border-top-color: var(--accent);
  animation: agentSpin .7s linear infinite;
}
@keyframes agentSpin { to { transform: rotate(360deg); } }
.agent-bar {
  display: block; height: 100%; width: 40%; border-radius: inherit;
  background: var(--accent); animation: agentSlide 1.1s ease-in-out infinite;
}
@keyframes agentSlide {
  0% { margin-left: 0; width: 20%; }
  50% { margin-left: 55%; width: 45%; }
  100% { margin-left: 0; width: 20%; }
}
/* Outcome-first MVP work queue */
.focus-card{margin:0 0 14px;background:linear-gradient(135deg,#10243e 0%,#17385f 100%);border:1px solid rgba(255,255,255,.1);border-radius:var(--r-lg);box-shadow:var(--shadow-sm);color:#fff;overflow:hidden}
.focus-head{display:flex;justify-content:space-between;gap:24px;align-items:flex-start;padding:18px 20px 14px;border-bottom:1px solid rgba(255,255,255,.1)}
.focus-head .eyebrow{font:500 10px/1 var(--font-mono);letter-spacing:.11em;color:#93c5fd;margin-bottom:7px}
.focus-head h2{font-size:18px;line-height:1.25;margin:0 0 4px;color:#fff}
.focus-head p{margin:0;color:#cbd5e1;font-size:12px}
.focus-head .tag{background:rgba(147,197,253,.12);border-color:rgba(147,197,253,.35);color:#dbeafe;white-space:nowrap}
.focus-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}
.focus-item{appearance:none;border:0;border-right:1px solid rgba(255,255,255,.1);background:transparent;color:inherit;display:grid;grid-template-columns:34px 1fr;gap:10px;padding:16px 18px;text-align:left;cursor:pointer;transition:background .15s ease}
.focus-item:last-child{border-right:0}.focus-item:hover,.focus-item:focus-visible{background:rgba(255,255,255,.07);outline:none}
.focus-icon{width:32px;height:32px;border-radius:9px;display:grid;place-items:center;background:rgba(147,197,253,.12);color:#bfdbfe}
.focus-item.warn .focus-icon{background:rgba(251,191,36,.14);color:#fde68a}.focus-item.danger .focus-icon{background:rgba(248,113,113,.14);color:#fecaca}.focus-item.ok .focus-icon{background:rgba(74,222,128,.12);color:#bbf7d0}
.focus-copy{display:flex;min-width:0;flex-direction:column;gap:4px}.focus-copy strong{font-size:12.5px;line-height:1.35}.focus-copy>span{font-size:11px;line-height:1.4;color:#b8c6d8}
.focus-action{grid-column:2;display:inline-flex;align-items:center;gap:4px;color:#bfdbfe;font-size:11px;font-weight:600;margin-top:2px}
@media (max-width:1000px){.focus-list{grid-template-columns:1fr}.focus-item{border-right:0;border-bottom:1px solid rgba(255,255,255,.1)}.focus-item:last-child{border-bottom:0}}
@media (max-width:640px){.focus-head{padding:16px;gap:12px}.focus-head p{display:none}.focus-item{padding:14px 16px}}

/* Windows discovery agent enrollment */
.agent-device-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.agent-device{display:flex;align-items:center;gap:12px;padding:12px;border:1px solid var(--border-2);border-radius:10px;background:var(--bg)}
.agent-device-icon{width:36px;height:36px;display:grid;place-items:center;flex:0 0 auto;border-radius:9px;color:#2563eb;background:#dbeafe}.agent-device-main{flex:1;min-width:160px}.agent-device-main .name,.agent-device-main .meta{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.agent-device>.btn{white-space:nowrap}
.agent-empty{display:flex;align-items:center;justify-content:center;gap:12px;padding:22px;color:var(--muted);text-align:left}.agent-empty>div{display:flex;flex-direction:column;gap:3px}.agent-empty strong{color:var(--ink);font-size:13px}.agent-empty span{font-size:11.5px}
.agent-step{display:flex;gap:10px;align-items:flex-start;padding:10px 0}.agent-step>span{width:24px;height:24px;display:grid;place-items:center;border-radius:50%;background:var(--accent);color:#fff;font:600 11px/1 var(--font-mono)}.agent-step strong{font-size:12.5px}.agent-step p{margin:3px 0 0;color:var(--muted);font-size:11.5px}
@media (max-width:900px){.agent-device-grid{grid-template-columns:1fr}}

/* Principal consent cards (same workspace chrome as staff) */
.purpose-filters .purpose-filter {
  appearance: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
  background: var(--surface);
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.purpose-filters .purpose-filter:hover {
  border-color: var(--accent);
}
.purpose-filters .purpose-filter.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-tint, rgba(37, 99, 235, .12));
  background: color-mix(in srgb, var(--accent) 6%, var(--surface));
}
.purpose-board {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  width: 100%;
}
.purpose-card {
  background: var(--surface, #fff);
  border: 1px solid var(--border-2);
  border-radius: var(--r-lg, 12px);
  padding: 20px 22px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  width: 100%;
}
.purpose-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.purpose-card-head h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.25;
}
.purpose-card-legal {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}
.purpose-card-desc {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
}
.purpose-card-hint {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
}
.purpose-kv {
  margin: 4px 0 0;
  grid-template-columns: 200px minmax(0, 1fr);
}
.purpose-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.purpose-card-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
  max-width: 480px;
}
.purpose-card-actions .btn { flex: 1; }
.purpose-card-note {
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.4;
}
@media (max-width: 1100px) {
  .purpose-kv { grid-template-columns: 150px minmax(0, 1fr); }
  .purpose-card-actions { max-width: none; }
}

/* ── Command Center · Consent connection map ───────────────────────── */
.page-command { max-width: 1680px; }
.page-command .stats { margin-top: 14px; }
.cc-map {
  margin: 0;
  background: linear-gradient(180deg, #0e1b2e 0%, #101826 72%, #0d1522 100%);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--r-lg);
  color: #e5e7eb;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.cc-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  padding: 16px 18px 12px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.cc-kicker {
  font: 500 10px/1 var(--font-mono);
  letter-spacing: .11em;
  text-transform: uppercase;
  color: #93c5fd;
  margin-bottom: 6px;
}
.cc-toolbar h2 { margin: 0 0 4px; font-size: 17px; color: #fff; letter-spacing: -.015em; }
.cc-toolbar p { margin: 0; font-size: 12px; color: #94a3b8; }
.cc-toolbar-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}
.cc-presets {
  display: flex;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  padding: 2px;
}
.cc-presets button {
  border: 0;
  background: transparent;
  color: #cbd5e1;
  font: 600 12px/1 var(--font-sans);
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
}
.cc-presets button.on { background: rgba(147,197,253,.16); color: #fff; }
.cc-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  padding: 0 10px;
  min-width: 220px;
  color: #94a3b8;
}
.cc-search input {
  flex: 1;
  border: 0;
  background: transparent;
  color: #f8fafc;
  font: inherit;
  font-size: 12.5px;
  padding: 8px 0;
  outline: none;
}
.cc-live {
  font: 500 10.5px/1 var(--font-mono);
  color: #86efac;
  border: 1px solid rgba(134,239,172,.28);
  background: rgba(22,163,74,.12);
  padding: 7px 9px;
  border-radius: 7px;
}
.cc-sort, .cc-col-head select {
  appearance: none;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  color: #e2e8f0;
  font: 550 12px/1.2 var(--font-sans);
  padding: 7px 26px 7px 10px;
  border-radius: 8px;
  background-image: linear-gradient(45deg, transparent 50%, #94a3b8 50%), linear-gradient(135deg, #94a3b8 50%, transparent 50%);
  background-position: calc(100% - 14px) 50%, calc(100% - 9px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
.cc-mode {
  display: flex;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  padding: 2px;
}
.cc-mode button {
  border: 0;
  background: transparent;
  color: #cbd5e1;
  font: 600 12px/1 var(--font-sans);
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
}
.cc-mode button.on { background: rgba(147,197,253,.16); color: #fff; }
.cc-mode button.on.danger { background: rgba(244,63,94,.22); color: #fecdd3; }
.cc-chips { display: flex; gap: 8px; padding: 8px 18px 0; flex-wrap: wrap; }
.cc-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(251,113,133,.35);
  background: rgba(244,63,94,.12);
  color: #fecdd3;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11.5px;
  cursor: pointer;
}
.cc-chip.static { cursor: default; border-color: rgba(255,255,255,.12); background: rgba(255,255,255,.04); color: #cbd5e1; }
.cc-body { display: grid; grid-template-columns: minmax(0, 1fr) 320px; min-height: 560px; }
.cc-graph-wrap { position: relative; min-height: 540px; min-width: 0; }
.cc-svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.cc-axis { stroke: rgba(255,255,255,.07); stroke-width: 1; }
.cc-ribbon { transition: opacity .18s ease; mix-blend-mode: screen; pointer-events: auto; cursor: pointer; }
.cc-ribbon.dim { opacity: .07; mix-blend-mode: normal; }
.cc-col { position: absolute; inset: 0; width: auto; pointer-events: none; }
.cc-col-head { position: absolute; top: 10px; z-index: 12; pointer-events: auto; transform: translateX(-50%); }
.cc-col-head select { max-width: 168px; position: relative; z-index: 12; }
.cc-node {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: auto;
  border: 0;
  background: transparent;
  color: #e5e7eb;
  cursor: pointer;
  z-index: 2;
  max-width: 210px;
  text-align: left;
  padding: 0;
}
.cc-node.left { transform: translate(calc(-100% + 11px), -50%); justify-content: flex-end; text-align: right; }
.cc-node.mid, .cc-node.right { transform: translate(-11px, -50%); }
.cc-node.dim { opacity: .22; }
.cc-node.on .cc-dot { box-shadow: 0 0 0 3px rgba(56,189,248,.35); }
.cc-node-label {
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 186px;
  text-shadow: 0 1px 8px rgba(0,0,0,.7);
}
.cc-node.left .cc-node-label { max-width: 168px; }
.cc-node.right .cc-node-label { max-width: 156px; }
.cc-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: 0 0 22px;
  background: #0f172a;
  border: 1.5px solid #67e8f9;
  color: #a5f3fc;
}
.cc-dot.sm { width: 22px; height: 22px; }
.cc-node.gap .cc-dot, .cc-mode .danger + .cc-dot { border-color: #fb7185; color: #fda4af; }
.cc-col.right .cc-dot, .cc-col.mid .cc-dot { border-color: #c4b5fd; color: #ddd6fe; }
.cc-next {
  position: absolute;
  bottom: 10px;
  transform: translateX(-50%);
  pointer-events: auto;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(15,23,42,.7);
  color: #cbd5e1;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11px;
  cursor: pointer;
  z-index: 3;
  white-space: nowrap;
}
.cc-empty {
  position: absolute;
  inset: 40px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: #94a3b8;
  text-align: left;
}
.cc-empty strong { display: block; color: #fff; font-size: 14px; margin-bottom: 4px; }
.cc-empty span { display: block; font-size: 12px; max-width: 420px; line-height: 1.45; }
.cc-empty-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.cc-mini {
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  color: #e2e8f0;
  border-radius: 7px;
  padding: 6px 10px;
  font-size: 11.5px;
  cursor: pointer;
}
.cc-mini.primary { background: #1f4f8b; border-color: transparent; color: #fff; }
.cc-hover-wrap {
  position: absolute;
  z-index: 20;
  left: 36%;
  width: 300px;
  transform: translateY(-20%);
  pointer-events: auto;
}
.cc-hover-wrap.from-left { left: 22%; }
.cc-hover-wrap.from-right { left: auto; right: 28%; }
.cc-hover {
  background: #0b1220;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: 0 18px 40px rgba(0,0,0,.4);
}
.cc-hover-kicker {
  display: flex;
  justify-content: space-between;
  font: 500 10px/1 var(--font-mono);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #93c5fd;
  margin-bottom: 6px;
}
.cc-hover h4 { margin: 0 0 6px; font-size: 14px; color: #fff; }
.cc-hover-email { font: 500 11px/1.35 var(--font-mono); color: #7dd3fc; margin: -2px 0 8px; word-break: break-all; }
.cc-hover-meta { font-size: 11.5px; color: #94a3b8; }
.cc-hover-gaps { margin-top: 10px; font-size: 12.5px; font-weight: 650; color: #fda4af; }
.cc-hover-ok { margin-top: 10px; font-size: 12px; color: #86efac; }
.cc-hover ul { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.cc-hover li { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; color: #e2e8f0; }
.cc-hover li b { color: #fda4af; font-family: var(--font-mono); font-weight: 500; }
.cc-hover-actions { display: flex; gap: 8px; margin-top: 12px; }
.cc-rail {
  border-left: 1px solid rgba(255,255,255,.08);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: rgba(0,0,0,.12);
}
.cc-panel {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  padding: 12px;
}
.cc-panel-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; }
.cc-panel-head h3 { margin: 0; font-size: 13px; color: #fff; }
.cc-panel-nums { display: flex; gap: 10px; font: 500 11px/1 var(--font-mono); color: #94a3b8; }
.cc-panel-nums b { color: #fda4af; }
.cc-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 10px; }
.cc-kpis b { display: block; font-size: 16px; color: #fff; letter-spacing: -.02em; }
.cc-kpis span { font-size: 10px; color: #94a3b8; }
.cc-kpis .danger b { color: #fda4af; }
.cc-counts { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 8px; font-size: 10.5px; color: #94a3b8; margin-bottom: 10px; }
.cc-counts em { font-style: normal; color: #e2e8f0; font-weight: 650; margin-right: 4px; }
.cc-rank { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cc-rank button {
  width: 100%;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 6px 8px;
  align-items: center;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  padding: 4px 0;
}
.cc-rank .name, .cc-collectors .name { font-size: 11.5px; color: #e2e8f0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-rank .meta, .cc-collectors .meta {
  grid-column: 2;
  font: 500 10px/1 var(--font-mono);
  color: #64748b;
}
.cc-rank i, .cc-issues i { color: #fda4af; font-style: normal; margin-left: 6px; }
.cc-issues { list-style: none; margin: 0; padding: 0; }
.cc-issues li + li { border-top: 1px solid rgba(255,255,255,.06); }
.cc-issues button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  padding: 7px 0;
}
.cc-issues button > span:first-child {
  min-width: 0;
  flex: 1;
  font-size: 12px;
  color: #e2e8f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cc-issues .meta {
  flex: 0 0 auto;
  font: 500 10px/1 var(--font-mono);
  color: #64748b;
}
.cc-collectors { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.cc-collectors li { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.cc-rail-empty { font-size: 12px; color: #64748b; }
.cc-spark { display: block; }
@media (max-width: 1180px) {
  .cc-body { grid-template-columns: 1fr; }
  .cc-rail { border-left: 0; border-top: 1px solid rgba(255,255,255,.08); }
  .cc-graph-wrap { min-height: 480px; }
  .cc-node-label { max-width: 110px; }
}
@media (max-width: 820px) {
  .cc-toolbar { flex-direction: column; }
  .cc-toolbar-controls { justify-content: flex-start; }
  .cc-search { min-width: 0; width: 100%; }
}
