/* ==========================================================================
   HOTSPOT ITSM — design system
   Brand palette ported from the Next.js app's globals.css: red / dark gray /
   white / black. Written with logical properties so RTL works without a
   second stylesheet.
   ========================================================================== */

:root {
  --background: #ffffff;
  --foreground: #0a0a0a;
  --card: #ffffff;
  --card-foreground: #0a0a0a;
  --primary: #e10600;
  --primary-foreground: #ffffff;
  --secondary: #f4f4f5;
  --secondary-foreground: #0a0a0a;
  --muted: #f4f4f5;
  --muted-foreground: #6b7280;
  --accent: #f4f4f5;
  --destructive: #dc2626;
  --success: #059669;
  --warning: #d97706;
  --border: #e4e4e7;
  --input: #e4e4e7;
  --ring: #e10600;
  --surface: #f4f4f5;

  --p1: #e10600;
  --p2: #f97316;
  --p3: #f59e0b;
  --p4: #6b7280;

  --sidebar: #2b2b2b;
  --sidebar-foreground: #ffffff;
  --sidebar-accent: #3d3d3d;
  --sidebar-border: #444444;

  --radius: 0.5rem;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .06);
  --shadow: 0 1px 3px rgba(0, 0, 0, .1), 0 1px 2px rgba(0, 0, 0, .06);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, .08);

  --font-sans: "Segoe UI", system-ui, -apple-system, "Noto Sans Arabic", "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "Cascadia Mono", "Consolas", monospace;
}

/* ── Reset ─────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html { font-family: var(--font-sans); -webkit-text-size-adjust: 100%; }

body {
  background: var(--surface);
  color: var(--foreground);
  line-height: 1.55;
  font-size: 14px;
  min-height: 100vh;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
table { border-collapse: collapse; width: 100%; }

h1 { font-size: 1.5rem; font-weight: 700; letter-spacing: -.01em; }
h2 { font-size: 1.125rem; font-weight: 600; }
h3 { font-size: 1rem; font-weight: 600; }

/* ── App shell ─────────────────────────────────────────────────────────── */
.app { display: flex; min-height: 100vh; }

.sidebar {
  width: 15rem;
  flex-shrink: 0;
  background: var(--sidebar);
  color: var(--sidebar-foreground);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: .625rem;
  padding: 1rem;
  border-bottom: 1px solid var(--sidebar-border);
}

.sidebar-logo {
  width: 2rem; height: 2rem;
  border-radius: var(--radius);
  background: var(--primary);
  color: #fff;
  display: grid; place-items: center;
  font-weight: 700;
  flex-shrink: 0;
}

.sidebar-brand-text { font-weight: 600; font-size: .875rem; line-height: 1.2; }
.sidebar-brand-text small { display: block; font-size: .6875rem; color: #a1a1aa; font-weight: 400; }

.sidebar-nav { padding: .5rem; display: flex; flex-direction: column; gap: .125rem; flex: 1; }

.sidebar-section {
  font-size: .6875rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #8b8b8b;
  padding: .875rem .75rem .375rem;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: .625rem;
  padding: .5rem .75rem;
  border-radius: var(--radius);
  font-size: .875rem;
  color: #e4e4e7;
  transition: background .12s, color .12s;
}
.nav-link:hover { background: var(--sidebar-accent); color: #fff; }
.nav-link.active { background: var(--primary); color: #fff; font-weight: 500; }
.nav-link .icon { width: 1rem; height: 1rem; flex-shrink: 0; }
.nav-link .count {
  margin-inline-start: auto;
  background: rgba(255,255,255,.16);
  border-radius: 999px;
  padding: 0 .375rem;
  font-size: .6875rem;
  min-width: 1.25rem;
  text-align: center;
}
.nav-link.active .count { background: rgba(0,0,0,.2); }

.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }

.topbar {
  height: 3.5rem;
  background: var(--primary);
  color: var(--primary-foreground);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-inline: 1rem;
  position: sticky;
  top: 0;
  z-index: 20;
  box-shadow: var(--shadow-sm);
}

.topbar-title { font-weight: 600; letter-spacing: -.01em; }
.topbar-actions { display: flex; align-items: center; gap: .375rem; }

.topbar-btn {
  position: relative;
  display: grid; place-items: center;
  width: 2.25rem; height: 2.25rem;
  border-radius: var(--radius);
  background: transparent;
  border: 0;
  color: inherit;
  cursor: pointer;
  transition: background .12s;
}
.topbar-btn:hover { background: rgba(255,255,255,.15); }

.badge-dot {
  position: absolute;
  top: .3rem; inset-inline-end: .3rem;
  min-width: 1.05rem; height: 1.05rem;
  padding-inline: .2rem;
  border-radius: 999px;
  background: #fff;
  color: var(--primary);
  font-size: .625rem;
  font-weight: 700;
  display: grid; place-items: center;
  line-height: 1;
}

.content { flex: 1; padding: 1.5rem; }
.content > * + * { margin-top: 1.25rem; }

.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}
.page-head .subtitle { color: var(--muted-foreground); font-size: .8125rem; margin-top: .125rem; }

/* ── Cards ─────────────────────────────────────────────────────────────── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) * 1.5);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.card-header {
  padding: .875rem 1.125rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
}
.card-title { font-size: .9375rem; font-weight: 600; }
.card-body { padding: 1.125rem; }
.card-body.flush { padding: 0; }
.card-footer { padding: .875rem 1.125rem; border-top: 1px solid var(--border); background: var(--muted); }

/* ── Grid ──────────────────────────────────────────────────────────────── */
.grid { display: grid; gap: 1rem; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-main { grid-template-columns: 2fr 1fr; align-items: start; }

@media (max-width: 1024px) {
  .grid-3, .grid-4, .grid-main { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-main { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .content { padding: 1rem; }
}

/* ── Buttons ───────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .375rem;
  padding: .5rem .875rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  background: var(--primary);
  color: var(--primary-foreground);
  font-size: .875rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: filter .12s, background .12s, border-color .12s;
}
.btn:hover { filter: brightness(.92); }
.btn:disabled { opacity: .55; cursor: not-allowed; filter: none; }
.btn .icon { width: 1rem; height: 1rem; }

.btn-outline { background: var(--card); color: var(--foreground); border-color: var(--border); }
.btn-outline:hover { background: var(--muted); filter: none; }
.btn-ghost { background: transparent; color: var(--foreground); }
.btn-ghost:hover { background: var(--muted); filter: none; }
.btn-danger { background: var(--destructive); }
.btn-success { background: var(--success); }
.btn-sm { padding: .3125rem .625rem; font-size: .8125rem; }
.btn-block { width: 100%; }

.btn-group { display: flex; flex-wrap: wrap; gap: .5rem; }

/* ── Forms ─────────────────────────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: .375rem; }
.field + .field { margin-top: 1rem; }

.label { font-size: .8125rem; font-weight: 500; }
.label .req { color: var(--destructive); }
.hint { font-size: .75rem; color: var(--muted-foreground); }

.input, .select, .textarea {
  width: 100%;
  padding: .5rem .625rem;
  border: 1px solid var(--input);
  border-radius: var(--radius);
  background: var(--card);
  font-size: .875rem;
  transition: border-color .12s, box-shadow .12s;
}
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--ring);
  box-shadow: 0 0 0 3px rgba(225, 6, 0, .12);
}
.textarea { min-height: 6rem; resize: vertical; }
.select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted-foreground) 50%), linear-gradient(135deg, var(--muted-foreground) 50%, transparent 50%); background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-inline-end: 2rem; }
html[dir="rtl"] .select { background-position: 11px 50%, 16px 50%; background-image: linear-gradient(135deg, transparent 50%, var(--muted-foreground) 50%), linear-gradient(45deg, var(--muted-foreground) 50%, transparent 50%); padding-inline-end: .625rem; padding-inline-start: 2rem; }

.checkbox-row { display: flex; align-items: center; gap: .5rem; font-size: .875rem; }
.checkbox-row input[type="checkbox"] { width: 1rem; height: 1rem; accent-color: var(--primary); }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }

.error-text { color: var(--destructive); font-size: .75rem; }

/* ── Filter bar ────────────────────────────────────────────────────────── */
.filters { display: flex; flex-wrap: wrap; gap: .625rem; align-items: end; }
.filters .field { min-width: 10rem; }
.filters .field + .field { margin-top: 0; }
.filters .search { flex: 1; min-width: 14rem; }

/* ── Tables ────────────────────────────────────────────────────────────── */
.table { font-size: .875rem; }
.table thead th {
  background: var(--muted);
  text-align: start;
  font-size: .6875rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted-foreground);
  padding: .625rem .875rem;
  font-weight: 600;
  white-space: nowrap;
}
.table tbody td { padding: .625rem .875rem; border-top: 1px solid var(--border); vertical-align: middle; }
.table tbody tr:hover { background: rgba(0,0,0,.02); }
.table .num { font-family: var(--font-mono); font-size: .75rem; color: var(--muted-foreground); }
.table-wrap { overflow-x: auto; }

.link { color: var(--primary); font-weight: 500; }
.link:hover { text-decoration: underline; }

/* ── Badges ────────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  border-radius: var(--radius);
  padding: .125rem .5rem;
  font-size: .75rem;
  font-weight: 500;
  white-space: nowrap;
}
.badge-slate   { background: #e2e8f0; color: #0f172a; }
.badge-blue    { background: #dbeafe; color: #1e3a8a; }
.badge-amber   { background: #fde68a; color: #78350f; }
.badge-yellow  { background: #fef08a; color: #713f12; }
.badge-emerald { background: #a7f3d0; color: #064e3b; }
.badge-red     { background: #fecaca; color: #7f1d1d; }
.badge-zinc    { background: #e4e4e7; color: #27272a; }

.priority-badge {
  display: inline-flex;
  align-items: center;
  gap: .3125rem;
  font-size: .75rem;
  font-weight: 600;
  padding: .125rem .5rem;
  border-radius: var(--radius);
  color: #fff;
}
.priority-P1 { background: var(--p1); }
.priority-P2 { background: var(--p2); }
.priority-P3 { background: var(--p3); color: #422006; }
.priority-P4 { background: var(--p4); }

.chip-major {
  background: var(--destructive);
  color: #fff;
  font-size: .6875rem;
  font-weight: 700;
  padding: .125rem .4375rem;
  border-radius: var(--radius);
  letter-spacing: .03em;
}

/* ── Stats ─────────────────────────────────────────────────────────────── */
.stat { text-align: center; }
.stat-value { font-size: 2rem; font-weight: 700; line-height: 1.1; }
.stat-label { font-size: .75rem; color: var(--muted-foreground); margin-top: .25rem; }
.stat-big { font-size: 3rem; font-weight: 700; text-align: center; line-height: 1.05; }

.kpi-row { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 1rem; }
@media (max-width: 900px) { .kpi-row { grid-template-columns: repeat(2, minmax(0,1fr)); } }

.kpi {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) * 1.5);
  padding: 1rem 1.125rem;
  box-shadow: var(--shadow-sm);
}
.kpi-label { font-size: .75rem; color: var(--muted-foreground); text-transform: uppercase; letter-spacing: .04em; }
.kpi-value { font-size: 1.875rem; font-weight: 700; margin-top: .25rem; line-height: 1.1; }
.kpi-value.danger { color: var(--destructive); }
.kpi-value.success { color: var(--success); }
.kpi-sub { font-size: .75rem; color: var(--muted-foreground); }

/* ── Bar chart (pure CSS) ──────────────────────────────────────────────── */
.bars { display: flex; align-items: flex-end; gap: .375rem; height: 5rem; }
.bars .bar { flex: 1; background: var(--primary); border-radius: 3px 3px 0 0; min-height: 2px; opacity: .85; }
.bars .bar:hover { opacity: 1; }

.meter { height: .5rem; background: var(--muted); border-radius: 999px; overflow: hidden; }
.meter > span { display: block; height: 100%; background: var(--primary); border-radius: 999px; }

/* ── Lists ─────────────────────────────────────────────────────────────── */
.list { display: flex; flex-direction: column; }
.list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .625rem 0;
  border-bottom: 1px solid var(--border);
}
.list-item:last-child { border-bottom: 0; }
.list-item .meta { font-size: .75rem; color: var(--muted-foreground); }

.empty { padding: 2rem 1rem; text-align: center; color: var(--muted-foreground); font-size: .875rem; }

/* ── Timeline / comments ───────────────────────────────────────────────── */
.timeline { display: flex; flex-direction: column; gap: .875rem; }
.timeline-item { display: flex; gap: .75rem; }
.avatar {
  width: 2rem; height: 2rem;
  border-radius: 999px;
  background: var(--secondary);
  color: var(--secondary-foreground);
  display: grid; place-items: center;
  font-size: .6875rem;
  font-weight: 700;
  flex-shrink: 0;
}
.avatar-primary { background: var(--primary); color: #fff; }
.comment-body { flex: 1; min-width: 0; }
.comment-head { display: flex; align-items: baseline; gap: .5rem; flex-wrap: wrap; }
.comment-author { font-weight: 600; font-size: .8125rem; }
.comment-time { font-size: .6875rem; color: var(--muted-foreground); }
.comment-text { font-size: .875rem; margin-top: .1875rem; white-space: pre-wrap; word-break: break-word; }
.comment-internal { background: #fffbeb; border: 1px solid #fde68a; border-radius: var(--radius); padding: .5rem .625rem; }

/* ── Definition list ───────────────────────────────────────────────────── */
.dl { display: grid; grid-template-columns: max-content 1fr; gap: .375rem .875rem; font-size: .875rem; }
.dl dt { color: var(--muted-foreground); }
.dl dd { word-break: break-word; }

/* ── SLA clock ─────────────────────────────────────────────────────────── */
.sla-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.sla-label { font-size: .6875rem; color: var(--muted-foreground); text-transform: uppercase; letter-spacing: .04em; }
.sla-value { font-size: 1.125rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.sla-value.breached { color: var(--destructive); }
.sla-value.warn { color: var(--warning); }

/* ── Alerts ────────────────────────────────────────────────────────────── */
.alert {
  border-radius: var(--radius);
  padding: .625rem .875rem;
  font-size: .875rem;
  border: 1px solid;
}
.alert-success { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
.alert-error { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.alert-warning { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.alert-info { background: #eff6ff; border-color: #bfdbfe; color: #1e40af; }
.alert ul { margin: 0; padding-inline-start: 1.125rem; }

/* ── Details/summary as a dropdown ─────────────────────────────────────── */
.dropdown { position: relative; }
.dropdown > summary { list-style: none; cursor: pointer; }
.dropdown > summary::-webkit-details-marker { display: none; }
.dropdown-menu {
  position: absolute;
  inset-inline-end: 0;
  top: calc(100% + .375rem);
  min-width: 12rem;
  background: var(--card);
  color: var(--foreground);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: .3125rem;
  z-index: 40;
}
.dropdown-menu a, .dropdown-menu button {
  display: flex;
  align-items: center;
  gap: .5rem;
  width: 100%;
  text-align: start;
  padding: .4375rem .625rem;
  border-radius: calc(var(--radius) * .8);
  font-size: .8125rem;
  background: none;
  border: 0;
  cursor: pointer;
}
.dropdown-menu a:hover, .dropdown-menu button:hover { background: var(--muted); }
.dropdown-divider { height: 1px; background: var(--border); margin: .3125rem 0; }
.dropdown-head { padding: .5rem .625rem; border-bottom: 1px solid var(--border); margin-bottom: .3125rem; }

/* Inline expandable panel (pause / resolve / assign forms) */
.disclosure > summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: .375rem;
  padding: .5rem .875rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--card);
  font-size: .875rem;
  font-weight: 500;
}
.disclosure > summary::-webkit-details-marker { display: none; }
.disclosure > summary:hover { background: var(--muted); }
.disclosure[open] > summary { border-color: var(--ring); }
.disclosure-body {
  margin-top: .625rem;
  padding: .875rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--muted);
}

/* ── Catalog ───────────────────────────────────────────────────────────── */
.catalog-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 1rem; }
@media (max-width: 1024px) { .catalog-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 640px) { .catalog-grid { grid-template-columns: 1fr; } }

.catalog-card {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  padding: 1.125rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) * 1.5);
  box-shadow: var(--shadow-sm);
  transition: box-shadow .15s, border-color .15s, transform .15s;
  height: 100%;
}
.catalog-card:hover { box-shadow: var(--shadow-md); border-color: var(--primary); transform: translateY(-1px); }
.catalog-icon {
  width: 2.5rem; height: 2.5rem;
  border-radius: var(--radius);
  background: rgba(225,6,0,.1);
  color: var(--primary);
  display: grid; place-items: center;
}
.catalog-name { font-weight: 600; }
.catalog-desc { font-size: .8125rem; color: var(--muted-foreground); flex: 1; }
.catalog-meta { font-size: .6875rem; color: var(--muted-foreground); display: flex; gap: .625rem; }

/* ── Matrix preview ────────────────────────────────────────────────────── */
.matrix { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; font-size: .75rem; }
.matrix th, .matrix td { padding: .375rem .5rem; text-align: center; border: 1px solid var(--border); }
.matrix th { background: var(--muted); font-weight: 600; }
.matrix td.on { outline: 2px solid var(--primary); outline-offset: -2px; }

/* ── Pagination ────────────────────────────────────────────────────────── */
.pagination { display: flex; gap: .25rem; flex-wrap: wrap; align-items: center; justify-content: center; padding: .875rem; }
.pagination a, .pagination span {
  min-width: 2rem;
  padding: .3125rem .5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--card);
  font-size: .8125rem;
  text-align: center;
}
.pagination .active span, .pagination [aria-current] { background: var(--primary); color: #fff; border-color: var(--primary); }
.pagination .disabled span { opacity: .45; }
.pagination svg { width: .875rem; height: .875rem; display: inline; }
html[dir="rtl"] .pagination svg { transform: scaleX(-1); }

/* ── Auth ──────────────────────────────────────────────────────────────── */
.auth-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: linear-gradient(160deg, #2b2b2b 0%, #1a1a1a 100%);
}
.auth-card { width: 100%; max-width: 24rem; }
.auth-logo {
  width: 3.5rem; height: 3.5rem;
  margin: 0 auto;
  border-radius: calc(var(--radius) * 1.5);
  background: var(--primary);
  color: #fff;
  display: grid; place-items: center;
  font-size: 1.5rem; font-weight: 700;
}

/* ── Utilities ─────────────────────────────────────────────────────────── */
.row { display: flex; align-items: center; gap: .5rem; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; }
.wrap { flex-wrap: wrap; }
.stack > * + * { margin-top: .75rem; }
.stack-lg > * + * { margin-top: 1.25rem; }
.muted { color: var(--muted-foreground); }
.mono { font-family: var(--font-mono); }
.small { font-size: .8125rem; }
.xs { font-size: .75rem; }
.bold { font-weight: 600; }
.danger { color: var(--destructive); }
.success-text { color: var(--success); }
.center { text-align: center; }
.end { text-align: end; }
.ms-auto { margin-inline-start: auto; }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nowrap { white-space: nowrap; }
.hidden { display: none; }

/* RTL icon flips for directional glyphs */
html[dir="rtl"] .flip { transform: scaleX(-1); }

/* Print */
@media print {
  .sidebar, .topbar, .btn, .filters, .disclosure { display: none !important; }
  body { background: #fff; }
  .card { box-shadow: none; border-color: #ccc; }
}

/* ── Microsoft SSO sign-in ─────────────────────────────────────────────── */
.btn-microsoft {
  background: var(--card);
  color: var(--foreground);
  border: 1px solid var(--border);
  font-weight: 600;
  gap: .625rem;
}
.btn-microsoft:hover { background: var(--muted); filter: none; }
.btn-microsoft .ms-logo { width: 1.125rem; height: 1.125rem; flex: none; }

/* "or" rule between the SSO button and the password form */
.auth-divider {
  display: flex;
  align-items: center;
  gap: .625rem;
  color: var(--muted-foreground);
  font-size: .75rem;
}
.auth-divider::before, .auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* Checkbox rows whose label carries a hint line underneath */
.checkbox-row.start { align-items: flex-start; }
.checkbox-row.start input[type="checkbox"] { margin-top: .1875rem; }
.checkbox-row.start + .checkbox-row.start { margin-top: .75rem; }

.mb-1 { margin-bottom: .5rem; }
.mb-2 { margin-bottom: 1rem; }

/* ── Evidence packs: printable compliance records (Phase 8) ─────────
   Any detail page can be printed to PDF by the browser. Chrome, nav and
   interactive controls drop away; the record itself stays on the page. */
@media print {
  .sidebar,
  .topbar,
  .no-print,
  .pagination,
  .filters,
  .btn,
  .btn-group,
  form button,
  .alert { display: none !important; }

  body { background: #fff; color: #000; }
  .layout, .content { display: block; margin: 0; padding: 0; max-width: none; }
  .card {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ccc;
    margin-bottom: .75rem;
  }
  .card-header { background: #f5f5f5; }
  .table { font-size: 11pt; }
  .table th, .table td { border-color: #ccc; }
  a[href]::after { content: ""; }
  .badge { border: 1px solid #999; background: none !important; color: #000 !important; }
}
