/* ── compliance.css — PCI Compliance workflow styles ─────────────── */

/* ── Reset & base ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font: 15px/1.6 "Google Sans","Roboto","Segoe UI",system-ui,sans-serif;
  background: var(--bg); color: var(--ink); min-height: 100vh;
}
h2 { font-size: 1.25rem; font-weight: 700; color: var(--accent); margin-bottom: 12px; }
h3 { font-size: 1rem; font-weight: 600; color: var(--ink); margin-bottom: 8px; }
p { color: var(--muted); margin-bottom: 10px; } p:last-child { margin-bottom: 0; }
a { color: var(--accent); }
ul, ol { padding-left: 20px; color: var(--muted); }
li { margin-bottom: 4px; }
strong { color: var(--ink); font-weight: 600; }
input, textarea, select {
  background: var(--card); color: var(--ink); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 7px 10px;
  font: 13px/1.4 "Google Sans","Roboto",sans-serif;
  width: 100%; outline: none; transition: border-color .15s;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(25,103,210,.15);
}
textarea { resize: vertical; min-height: 70px; }
code {
  font-family: "Roboto Mono",monospace; font-size: .875em;
  background: var(--bg); padding: 1px 5px; border-radius: 4px;
}

/* ── Topbar ───────────────────────────────────────────────────────── */
#topbarOuter { position: sticky; top: 0; z-index: 100; width: 100%; }
.topbar {
  background: var(--topbar-bg); border-bottom: 1px solid var(--line);
  padding: 0 20px; height: var(--topbar-h);
  display: flex; align-items: center; gap: 12px;
}
.topbar-brand {
  font-weight: 700; font-size: .9rem; white-space: nowrap;
  letter-spacing: -.01em; flex-shrink: 0; color: var(--ink);
}
.topbar-brand .subtitle { font-size: 11px; color: var(--muted); font-weight: 400; display: block; }
.topbar-spacer { flex: 1; }
.topbar-toggles { display: flex; gap: 6px; align-items: center; flex-shrink: 0; }
.topbar-btn {
  background: transparent; border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 5px 14px; height: 34px; font-size: 13px; cursor: pointer; color: var(--muted);
  display: inline-flex; align-items: center; text-decoration: none; white-space: nowrap;
  transition: background .15s, color .15s; flex-shrink: 0;
}
.topbar-btn:hover { background: var(--info-bg); color: var(--accent); }
.topbar-xlink {
  background: transparent; border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 5px 14px; height: 34px; font-size: 13px; cursor: pointer; color: var(--muted);
  display: inline-flex; align-items: center; text-decoration: none; white-space: nowrap;
  transition: background .15s, color .15s; flex-shrink: 0;
}
.topbar-xlink:hover { background: var(--info-bg); color: var(--accent); }
.theme-toggle {
  background: transparent; border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 5px 14px; height: 34px; font-size: 13px; cursor: pointer; color: var(--muted);
  display: flex; align-items: center; gap: 5px; transition: background .15s, color .15s; flex-shrink: 0;
}
.theme-toggle:hover { background: var(--info-bg); color: var(--accent); }

/* User chip in topbar */
.user-chip {
  display: flex; align-items: center; gap: 8px; padding: 4px 10px;
  background: var(--bg); border: 1px solid var(--line); border-radius: 20px;
  font-size: 13px; color: var(--ink); cursor: pointer; flex-shrink: 0;
}
.avatar {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--accent); color: #fff; font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}

/* Notification bell */
.bell-btn {
  position: relative; background: transparent; border: 1px solid var(--line);
  border-radius: var(--radius-sm); width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--muted); transition: background .15s, color .15s;
}
.bell-btn:hover { background: var(--info-bg); color: var(--accent); }
.bell-badge {
  position: absolute; top: 4px; right: 4px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--danger); color: #fff; font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  display: none;
}
.bell-badge.visible { display: flex; }
@keyframes bellShake {
  0%,100%{ transform: rotate(0); }
  20%{ transform: rotate(-15deg); } 40%{ transform: rotate(15deg); }
  60%{ transform: rotate(-10deg); } 80%{ transform: rotate(10deg); }
}
.bell-shake { animation: bellShake .5s ease; }

/* ── App shell layout ─────────────────────────────────────────────── */
#appShell {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: calc(100vh - var(--topbar-h));
}

/* ── Sidebar ──────────────────────────────────────────────────────── */
#sidebar {
  width: var(--sidebar-w);
  position: sticky; top: var(--topbar-h);
  height: calc(100vh - var(--topbar-h));
  overflow-y: auto; overflow-x: hidden;
  background: var(--sidebar-bg); border-right: 1px solid var(--line);
  padding: 12px 0; scrollbar-width: none;
}
#sidebar::-webkit-scrollbar { display: none; }
.nav-label {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--muted); padding: 12px 16px 4px;
}
.nav-link {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 16px; color: var(--ink); text-decoration: none;
  font-size: 13px; font-weight: 500;
  transition: background .15s, color .15s;
}
.nav-link:hover { background: var(--bg); }
.nav-link.active { background: var(--accent); color: #fff; border-radius: 0; }
.nav-link .nav-icon { width: 16px; flex-shrink: 0; opacity: .7; }
.nav-link.active .nav-icon { opacity: 1; }
.nav-divider { border: none; border-top: 1px solid var(--line); margin: 8px 0; }
.nav-sub {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 16px 6px 32px; color: var(--muted); text-decoration: none;
  font-size: 12px; font-weight: 400; transition: background .15s, color .15s;
}
.nav-sub:hover { background: var(--bg); color: var(--ink); }
.nav-sub.active { color: var(--accent); font-weight: 600; }

/* ── Main content ─────────────────────────────────────────────────── */
#mainContent {
  padding: 28px 32px 60px;
  max-width: 1000px;
  min-width: 0;
}

/* ── Cards ────────────────────────────────────────────────────────── */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-md);
  padding: 24px; margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
  animation: rise .3s ease both;
}
@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.card-title { font-size: 1rem; font-weight: 700; color: var(--ink); }
.card-sub { font-size: 13px; color: var(--muted); margin-top: 2px; }

/* ── KPI cards ────────────────────────────────────────────────────── */
.kpi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 24px; }
.kpi-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-md);
  padding: 20px 22px; box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--line);
  transition: box-shadow .2s, transform .2s;
}
.kpi-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.kpi-card.ok    { border-left-color: var(--ok); }
.kpi-card.warn  { border-left-color: var(--warn); }
.kpi-card.info  { border-left-color: var(--info); }
.kpi-value { font-size: 2rem; font-weight: 700; color: var(--ink); line-height: 1; margin-bottom: 4px; }
.kpi-label { font-size: 13px; color: var(--muted); font-weight: 500; }
.kpi-trend { font-size: 12px; margin-top: 6px; }
.kpi-trend.up   { color: var(--ok); }
.kpi-trend.down { color: var(--danger); }
.kpi-trend.neutral { color: var(--muted); }

/* ── Requirement rings ────────────────────────────────────────────── */
.rings-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px; margin-bottom: 24px;
}
.req-ring-wrap { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.req-ring {
  width: 72px; height: 72px; border-radius: 50%;
  background: conic-gradient(var(--ok) calc(var(--pct, 0) * 1%), var(--line) 0);
  display: grid; place-items: center;
  transition: transform .2s ease;
  cursor: default;
  position: relative;
}
.req-ring:hover { transform: scale(1.06); }
.req-ring-inner {
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--card);
  display: grid; place-items: center;
  font-size: 14px; font-weight: 700; color: var(--ink);
}
.req-ring-label { font-size: 11px; color: var(--muted); text-align: center; max-width: 72px; }

/* Skeleton loader */
@keyframes shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}
.skeleton {
  background: linear-gradient(90deg, var(--line) 25%, var(--bg) 50%, var(--line) 75%);
  background-size: 800px 100%;
  animation: shimmer 1.4s infinite linear;
  border-radius: var(--radius-sm);
}

/* ── Status badges ────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 600; padding: 2px 8px;
  border-radius: 20px; white-space: nowrap;
}
.badge-ok             { color: var(--ok);     background: var(--ok-bg);     }
.badge-stop           { color: var(--danger); background: var(--danger-bg); }
.badge-warn           { color: var(--warn);   background: var(--warn-bg);   }
.badge-info           { color: var(--info);   background: var(--info-bg);   }
.badge-muted          { color: var(--muted);  background: var(--bg);        border: 1px solid var(--line); }
.badge-compliant      { color: var(--status-compliant);     background: var(--status-compliant-bg);     }
.badge-in-progress    { color: var(--status-in-progress);   background: var(--status-in-progress-bg);   }
.badge-non-compliant  { color: var(--status-non-compliant); background: var(--status-non-compliant-bg); }
.badge-not-applicable { color: var(--status-not-applicable); background: var(--status-not-applicable-bg); border: 1px solid var(--line); }
.badge-not-started    { color: var(--status-not-started);   background: var(--status-not-started-bg);   }

@keyframes statusFlash {
  0%,100% { opacity: 1; }
  50%     { opacity: 0; }
}
.status-flash { animation: statusFlash .3s ease 2; }

/* ── Control library table ────────────────────────────────────────── */
.filter-bar {
  display: flex; align-items: center; gap: 8px;
  flex-wrap: wrap; margin-bottom: 16px;
}
.filter-search {
  position: relative; flex: 1; min-width: 200px; max-width: 320px;
}
.filter-search svg {
  position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
  width: 15px; height: 15px; color: var(--muted); pointer-events: none;
}
.filter-search input {
  padding-left: 32px; border-radius: 20px;
}
.chip {
  padding: 4px 12px; border-radius: 20px; border: 1px solid var(--line);
  background: var(--card); font-size: 12px; font-weight: 500; color: var(--muted);
  cursor: pointer; white-space: nowrap; transition: background .15s, color .15s, border-color .15s;
}
.chip:hover { background: var(--bg); color: var(--ink); }
.chip.active { background: var(--info-bg); color: var(--accent); border-color: var(--accent); }
.chip-mono {
  font-family: "Roboto Mono",monospace; font-size: 11px; font-weight: 600;
  padding: 2px 7px; border-radius: 4px; background: var(--bg);
  border: 1px solid var(--line); color: var(--ink); white-space: nowrap;
}

.control-table {
  width: 100%; border-collapse: collapse; font-size: 13px;
}
.control-table-wrap {
  border: 1px solid var(--line); border-radius: var(--radius-md);
  overflow: hidden; background: var(--card);
}
.control-table th {
  background: var(--bg); text-align: left; padding: 10px 14px;
  border-bottom: 2px solid var(--line);
  font-size: 11px; text-transform: uppercase; letter-spacing: .05em;
  color: var(--muted); font-weight: 700; white-space: nowrap;
  position: sticky; top: 0;
}
.control-table td {
  padding: 11px 14px; border-bottom: 1px solid var(--line);
  vertical-align: middle; color: var(--muted);
}
.control-table td:first-child { color: var(--ink); font-weight: 500; }
.control-table tr:last-child td { border-bottom: none; }
.control-table tr { transition: border-left-color .15s; border-left: 3px solid transparent; }
.control-table tr:hover { background: var(--bg); cursor: pointer; }
.control-table tr:hover td { background: transparent; }
.control-table tr.status-compliant:hover     { border-left-color: var(--ok); }
.control-table tr.status-in-progress:hover   { border-left-color: var(--warn); }
.control-table tr.status-non-compliant:hover { border-left-color: var(--danger); }
.control-table tr.status-not-started:hover   { border-left-color: var(--info); }

.owner-avatar {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--accent); color: #fff; font-size: 10px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}
.row-action-btn {
  opacity: 0; padding: 3px 10px; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: var(--card); font-size: 12px;
  color: var(--accent); cursor: pointer; white-space: nowrap;
  transition: opacity .15s, background .15s;
}
.control-table tr:hover .row-action-btn { opacity: 1; }
.row-action-btn:hover { background: var(--info-bg); }

/* ── Control detail drawer ────────────────────────────────────────── */
.drawer-backdrop {
  display: none; position: fixed; inset: 0; top: var(--topbar-h);
  background: rgba(0,0,0,.3); z-index: 50;
  transition: opacity .2s;
}
.drawer-backdrop.open { display: block; }
.drawer {
  position: fixed; top: var(--topbar-h); right: 0; bottom: 0;
  width: 520px; max-width: 100vw;
  background: var(--card); border-left: 1px solid var(--line);
  box-shadow: var(--shadow-lg); z-index: 51;
  transform: translateX(100%); transition: transform .3s ease;
  overflow-y: auto; display: flex; flex-direction: column;
}
.drawer.open { transform: translateX(0); }
.drawer-header {
  padding: 20px 24px 16px; border-bottom: 1px solid var(--line);
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  position: sticky; top: 0; background: var(--card); z-index: 1;
}
.drawer-close {
  background: transparent; border: 1px solid var(--line); border-radius: var(--radius-sm);
  width: 30px; height: 30px; cursor: pointer; color: var(--muted);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  transition: background .15s, color .15s;
}
.drawer-close:hover { background: var(--bg); color: var(--ink); }
.drawer-body { padding: 20px 24px; flex: 1; }

/* Status pill buttons */
.status-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.status-pill {
  padding: 6px 14px; border-radius: 20px; border: 2px solid var(--line);
  background: var(--bg); font-size: 12px; font-weight: 600; cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.status-pill[data-status="compliant"].selected      { background: var(--ok-bg); border-color: var(--ok); color: var(--ok); }
.status-pill[data-status="in_progress"].selected    { background: var(--warn-bg); border-color: var(--warn); color: var(--warn); }
.status-pill[data-status="non_compliant"].selected  { background: var(--danger-bg); border-color: var(--danger); color: var(--danger); }
.status-pill[data-status="not_applicable"].selected { background: var(--bg); border-color: var(--muted); color: var(--muted); }
.status-pill[data-status="not_started"].selected    { background: var(--info-bg); border-color: var(--info); color: var(--info); }

/* Evidence drop zone */
.drop-zone {
  border: 2px dashed var(--line); border-radius: var(--radius-md);
  padding: 24px; text-align: center; color: var(--muted); font-size: 13px;
  transition: border-color .2s, background .2s; cursor: pointer;
}
.drop-zone:hover, .drop-zone.drag-over {
  border-color: var(--accent); background: var(--info-bg);
}
.drop-zone svg { margin-bottom: 8px; color: var(--muted); }

/* History timeline */
.timeline { padding-left: 20px; border-left: 2px solid var(--line); margin-top: 16px; }
.timeline-item {
  position: relative; padding: 0 0 16px 20px;
}
.timeline-item::before {
  content: ""; position: absolute; left: -26px; top: 4px;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--line); border: 2px solid var(--card);
}
.timeline-item.event-status_changed::before { background: var(--accent); }
.timeline-item.event-evidence_uploaded::before { background: var(--ok); }
.timeline-item.event-owner_assigned::before { background: var(--warn); }
.timeline-item.event-attestation_completed::before { background: var(--info); }
.timeline-time { font-size: 11px; color: var(--muted); margin-bottom: 2px; }
.timeline-text { font-size: 13px; color: var(--ink); }

/* ── Training module cards ────────────────────────────────────────── */
.module-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.module-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius-md); overflow: hidden;
  box-shadow: var(--shadow-sm); transition: box-shadow .2s, transform .2s;
}
.module-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.module-card-header {
  height: 5px; background: var(--line);
}
.module-card-header.complete  { background: var(--ok); }
.module-card-header.due-soon  { background: var(--warn); }
.module-card-header.overdue   { background: var(--danger); }
.module-card-body { padding: 16px 18px; }
.module-card-footer {
  padding: 10px 18px; border-top: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
}

/* Attestation modal */
.modal-backdrop {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.4); z-index: 200;
  align-items: center; justify-content: center;
}
.modal-backdrop.open { display: flex; }
.modal {
  background: var(--card); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); padding: 32px;
  max-width: 500px; width: 100%; margin: 16px;
  animation: rise .25s ease;
}
.modal h3 { margin-bottom: 12px; }
.modal-footer { display: flex; gap: 10px; margin-top: 20px; justify-content: flex-end; }

/* SVG checkmark animation on attestation success */
@keyframes drawCheck {
  to { stroke-dashoffset: 0; }
}
.check-success svg .check-path {
  stroke-dasharray: 50; stroke-dashoffset: 50;
  animation: drawCheck .5s ease .1s forwards;
}

/* ── Buttons ──────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  border-radius: var(--radius-sm); padding: 8px 18px;
  font: 13px/1 "Google Sans","Roboto",sans-serif; font-weight: 600;
  cursor: pointer; transition: opacity .15s, transform .15s, background .15s;
  border: none; white-space: nowrap;
}
.btn:hover     { transform: translateY(-1px); opacity: .92; }
.btn:active    { transform: translateY(0);    opacity: 1; }
.btn-primary   { background: var(--accent); color: #fff; }
.btn-secondary { background: var(--card); color: var(--ink); border: 1px solid var(--line); }
.btn-secondary:hover { background: var(--bg); }
.btn-danger    { background: var(--danger-bg); color: var(--danger); border: 1px solid var(--danger); }
.btn-sm        { padding: 5px 12px; font-size: 12px; }

/* ── Callouts ─────────────────────────────────────────────────────── */
.callout {
  border-radius: var(--radius-sm); padding: 14px 18px; margin: 16px 0;
  border-left: 4px solid; font-size: 14px; line-height: 1.55;
}
.callout-danger { background: var(--danger-bg); border-color: var(--danger); color: var(--danger); }
.callout-warn   { background: var(--warn-bg);   border-color: var(--warn);   color: var(--warn);   }
.callout-ok     { background: var(--ok-bg);     border-color: var(--ok);     color: var(--ok);     }
.callout-info   { background: var(--info-bg);   border-color: var(--info);   color: var(--info);   }
.callout strong { color: inherit; } .callout p { color: inherit; }

/* ── Notification panel ───────────────────────────────────────────── */
.notif-panel {
  position: fixed; top: calc(var(--topbar-h) + 8px); right: 16px;
  width: 360px; max-height: 480px; overflow-y: auto;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius-md); box-shadow: var(--shadow-lg);
  z-index: 150;
  transform: translateY(-8px); opacity: 0; pointer-events: none;
  transition: transform .2s ease, opacity .2s ease;
}
.notif-panel.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
.notif-header {
  padding: 14px 16px; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
  font-weight: 600; font-size: 13px;
}
.notif-item {
  padding: 12px 16px; border-bottom: 1px solid var(--line);
  cursor: pointer; transition: background .15s;
}
.notif-item:hover { background: var(--bg); }
.notif-item.unread { border-left: 3px solid var(--accent); }
.notif-item:last-child { border-bottom: none; }
.notif-msg { font-size: 13px; color: var(--ink); margin-bottom: 3px; }
.notif-time { font-size: 11px; color: var(--muted); }

/* ── Login screen ─────────────────────────────────────────────────── */
#loginScreen {
  display: none; position: fixed; inset: 0;
  background: var(--bg); z-index: 300;
  align-items: center; justify-content: center;
}
#loginScreen.visible { display: flex; }
.login-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 40px 48px;
  max-width: 420px; width: 100%; margin: 16px;
  box-shadow: var(--shadow-md); text-align: center;
  animation: rise .3s ease;
}
.login-card h2 { margin-bottom: 8px; }
.login-card p { margin-bottom: 24px; }
.google-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: var(--card);
  font-size: 14px; font-weight: 600; color: var(--ink); cursor: pointer;
  transition: box-shadow .2s, background .15s;
}
.google-btn:hover { background: var(--bg); box-shadow: var(--shadow-sm); }
.login-error { color: var(--danger); font-size: 13px; margin-top: 12px; display: none; }

/* ── Hamburger / mobile nav ───────────────────────────────────────── */
.nav-hamburger {
  display: none; align-items: center; justify-content: center;
  background: none; border: 1px solid var(--line); border-radius: var(--radius-sm);
  width: 34px; height: 34px; padding: 0; cursor: pointer; color: var(--ink); flex-shrink: 0;
}
.nav-hamburger:hover { background: var(--info-bg); color: var(--accent); }
.nav-backdrop {
  display: none; position: fixed; inset: 0; top: var(--topbar-h);
  background: rgba(0,0,0,.35); z-index: 19;
}
.nav-backdrop.open { display: block; }

/* ── Page transitions ─────────────────────────────────────────────── */
@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}
.view { animation: fadeSlideIn .2s ease; }

/* ── Responsive ───────────────────────────────────────────────────── */
@media (max-width: 900px) {
  #appShell { grid-template-columns: 1fr; }
  #sidebar {
    position: fixed; top: var(--topbar-h); left: 0; bottom: 0;
    width: 260px; transform: translateX(-260px);
    transition: transform .22s ease; height: auto; z-index: 20;
  }
  #sidebar.open { transform: translateX(0); }
  .nav-hamburger { display: flex; }
  #mainContent { padding: 16px; }
  .kpi-grid { grid-template-columns: 1fr; }
  .rings-grid { grid-template-columns: repeat(4, 1fr); }
  .module-grid { grid-template-columns: 1fr; }
  .drawer { width: 100vw; }
}
@media (max-width: 480px) {
  .rings-grid { grid-template-columns: repeat(3, 1fr); }
  .topbar-brand { font-size: .8rem; }
  .login-card { padding: 28px 20px; }
}
@media (prefers-reduced-motion: reduce) { .card, .view { animation: none; } }

/* ── Print ────────────────────────────────────────────────────────── */
@media print {
  #sidebar, #topbarOuter, .no-print { display: none !important; }
  #appShell { display: block; }
  body { background: white; color: black; font-size: 11pt; }
  #mainContent { padding: 0; max-width: 100%; }
  .card { border: 1px solid #ccc; margin-bottom: 16pt; break-inside: avoid; box-shadow: none; animation: none; }
  .badge { border: 1px solid #ccc; }
  .control-table th, .control-table td { border: 1px solid #ccc; }
  h2 { color: black; }
}
