/* ===== ISMS Hub — register pages ===== */

/* Legacy top-nav (kept hidden for backward compatibility while pages migrate
   to the new sidebar; remove once every page is converted) */
.hub-nav { display: none; }

/* ===== Sidebar navigation ===== */
.hub-layout {
  display: flex; flex: 1; align-items: stretch; min-height: 0;
}
.hub-sidebar {
  width: 240px; flex-shrink: 0;
  background: var(--navy-deep); color: rgba(255,255,255,0.85);
  display: flex; flex-direction: column;
  padding: 0; overflow-y: auto;
}
.hub-main {
  flex: 1; min-width: 0; display: flex; flex-direction: column;
}
.sb-brand {
  padding: 18px 20px 14px; border-bottom: 1px solid rgba(255,255,255,0.08);
}
.sb-brand-name {
  font-size: 14px; font-weight: 800; color: white; letter-spacing: 1.5px;
}
.sb-brand-sub {
  font-size: 10px; color: var(--amber); letter-spacing: 2px;
  text-transform: uppercase; margin-top: 4px; font-weight: 700;
}
.sb-nav { padding: 8px 0 18px; flex: 1; }
.sb-section { margin: 14px 0; }
.sb-section-title {
  padding: 6px 20px 4px;
  font-size: 10px; color: rgba(255,255,255,0.45);
  text-transform: uppercase; letter-spacing: 2px; font-weight: 700;
}
.sb-link {
  display: block; padding: 8px 20px;
  color: rgba(255,255,255,0.72);
  text-decoration: none; font-size: 13.5px; font-weight: 500;
  border-left: 3px solid transparent;
}
.sb-link:hover { color: white; background: rgba(255,255,255,0.04); }
.sb-link.active {
  color: white; background: rgba(255,255,255,0.06);
  border-left-color: var(--amber); font-weight: 600;
}
.sb-foot { padding: 14px 20px; border-top: 1px solid rgba(255,255,255,0.08); }

/* Mobile hamburger button — hidden on desktop, visible <= 840px */
.hub-mobile-btn {
  display: none;
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.18);
  color: white; padding: 6px 10px; border-radius: 6px; cursor: pointer;
  margin-right: 12px;
}
.hub-mobile-btn:hover { background: rgba(255,255,255,0.16); }

@media (max-width: 840px) {
  .hub-layout { flex-direction: column; }
  .hub-sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; width: 260px;
    transform: translateX(-100%); transition: transform 0.18s ease;
    z-index: 1000; box-shadow: 4px 0 24px rgba(0,0,0,0.25);
  }
  .hub-sidebar.open { transform: translateX(0); }
  .hub-mobile-btn { display: inline-flex; align-items: center; }
}

.reg-toolbar {
  display: flex; justify-content: space-between; gap: 14px;
  flex-wrap: wrap; margin-bottom: 14px;
}
.reg-filters { display: flex; gap: 8px; flex-wrap: wrap; }
.reg-filters select, .reg-filters input {
  padding: 8px 11px; border: 1.5px solid var(--ice); border-radius: 7px;
  font-size: 13px; font-family: inherit;
}
.reg-filters input { min-width: 240px; }
.reg-filters select:focus, .reg-filters input:focus { outline: none; border-color: var(--amber); }
.reg-actions { display: flex; gap: 8px; align-items: center; }

.reg-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.reg-table th {
  background: var(--navy); color: white; text-align: left; padding: 9px 11px;
  font-size: 11.5px; letter-spacing: 0.4px; cursor: pointer; white-space: nowrap;
}
.reg-table th:hover { background: var(--navy-deep); }
.reg-table th[data-sort]::after { content: " ⇅"; opacity: 0.4; font-size: 10px; }
.reg-table th.sort-asc::after { content: " ↑"; opacity: 1; }
.reg-table th.sort-desc::after { content: " ↓"; opacity: 1; }
.reg-table td { padding: 9px 11px; border-bottom: 1px solid var(--ice-pale); vertical-align: top; }
.reg-table tr:hover td { background: var(--ice-pale); }
.reg-table .col-title { font-weight: 600; color: var(--navy); max-width: 320px; }
.reg-table .row-id { font-weight: 700; color: var(--muted); font-size: 12px; white-space: nowrap; }
.reg-table .row-actions { white-space: nowrap; text-align: right; }
.reg-table .row-actions button {
  background: none; border: 1px solid var(--ice); color: var(--navy);
  padding: 3px 9px; border-radius: 6px; font-size: 11px; font-weight: 600; margin-left: 4px;
}
.reg-table .row-actions button:hover { background: var(--ice-pale); }
.reg-table .row-actions button.del:hover { background: var(--red-pale); color: var(--red); border-color: var(--red); }

/* score / priority badges */
.score-badge {
  display: inline-block; min-width: 30px; text-align: center; padding: 2px 7px;
  border-radius: 6px; font-weight: 700; font-size: 12px;
}
.prio-Low      { background: #E3F2E9; color: #2E7D52; }
.prio-Medium   { background: #FFF4D6; color: #8a6d18; }
.prio-High     { background: #FDE3CF; color: #9c4a1a; }
.prio-Critical { background: #FBD9D4; color: #B0322020; color: #b03220; }
.pill-status {
  display: inline-block; padding: 2px 9px; border-radius: 10px;
  font-size: 11px; font-weight: 700;
}
.st-Open       { background: var(--amber-soft); color: #8a5418; }
.st-InProgress { background: #DCE9F7; color: #1F3A5F; }
.st-Closed     { background: var(--green-pale); color: var(--green); }
.type-Opportunity { color: #2E7D52; font-weight: 700; }
.type-Risk { color: var(--muted); }

/* ===== modal ===== */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(21,40,65,0.55);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 40px 16px; z-index: 100; overflow-y: auto;
}
.modal {
  background: var(--paper); border-radius: 12px; box-shadow: var(--shadow-lg);
  width: 100%; max-width: 720px;
}
.modal-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 24px; border-bottom: 1px solid var(--ice);
}
.modal-head h2 { color: var(--navy); font-size: 19px; }
.modal-close {
  background: none; border: none; font-size: 26px; color: var(--muted); line-height: 1;
}
.modal-close:hover { color: var(--navy); }
.modal-body { padding: 20px 24px; }
.modal-foot {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 14px 24px; border-top: 1px solid var(--ice);
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.form-field label {
  display: block; font-size: 11px; font-weight: 700; color: var(--navy);
  text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px;
}
.form-field input, .form-field select, .form-field textarea {
  width: 100%; padding: 8px 10px; border: 1.5px solid var(--ice);
  border-radius: 7px; font-size: 13px; font-family: inherit;
}
.form-field textarea { resize: vertical; min-height: 56px; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  outline: none; border-color: var(--amber);
}
.score-preview {
  background: var(--ice-pale); border-radius: 8px; padding: 10px 14px;
  font-size: 13px; display: flex; gap: 18px; align-items: center; flex-wrap: wrap;
}
.score-preview strong { color: var(--navy); }
.section-label {
  font-size: 12px; font-weight: 700; color: var(--amber); letter-spacing: 1px;
  text-transform: uppercase; margin: 6px 0 2px; grid-column: 1 / -1;
  border-bottom: 1px solid var(--ice-pale); padding-bottom: 4px;
}
.detail-row { display: flex; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--ice-pale); font-size: 13px; }
.detail-row .dk { flex: 0 0 170px; font-weight: 700; color: var(--muted); font-size: 12px; }
.detail-row .dv { flex: 1; }
.history-entry { font-size: 12px; padding: 6px 0; border-bottom: 1px dashed var(--ice); color: var(--muted); }

@media (max-width: 640px) {
  .form-grid { grid-template-columns: 1fr; }
  .reg-filters input { min-width: 0; flex: 1; }
}

/* ===== Personal dashboard ===== */
.dash-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px;
}
@media (max-width: 760px) { .dash-grid { grid-template-columns: 1fr; } }
.dash-panel { margin-bottom: 0; }
.dash-tag {
  display: inline-block; padding: 2px 9px; border-radius: 10px;
  font-size: 11px; font-weight: 700; margin-right: 6px;
}
.dash-tag.done { background: var(--green-pale); color: var(--green); }
.dash-tag.prog { background: #DCE9F7; color: var(--navy); }
.dash-tag.todo { background: var(--amber-soft); color: #8a5418; }

.myrisk-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 0; border-bottom: 1px solid var(--ice-pale); font-size: 13px;
}
.myrisk-id { font-weight: 700; color: var(--muted); font-size: 12px; flex: 0 0 64px; }
.myrisk-title { flex: 1; color: var(--navy); font-weight: 600; }
.myrisk-rev { flex: 0 0 110px; text-align: right; color: var(--muted); font-size: 11px; }

.module-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 14px; margin-top: 16px;
}
.module-card {
  display: block; text-decoration: none; background: var(--paper);
  border: 1px solid var(--ice); border-radius: 11px; padding: 16px 18px;
  border-left: 4px solid var(--ice); transition: transform 0.12s, box-shadow 0.12s;
}
a.module-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.module-card.accent-amber { border-left-color: var(--amber); }
.module-card.accent-navy  { border-left-color: var(--navy); }
.module-card.accent-green { border-left-color: var(--green); }
.module-card.planned { opacity: 0.55; cursor: default; border-left-style: dashed; }
.mc-section {
  font-size: 10.5px; font-weight: 700; letter-spacing: 1.2px;
  text-transform: uppercase; color: var(--muted);
}
.mc-title { font-size: 15px; font-weight: 700; color: var(--navy); margin: 3px 0 5px; }
.mc-desc { font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.mc-meta {
  margin-top: 10px; font-size: 11.5px; font-weight: 700; color: var(--amber);
  letter-spacing: 0.3px;
}
.module-card.planned .mc-meta { color: var(--muted); }

/* Director's inline role editor in the Team Dashboard */
.role-edit {
  font-family: inherit; font-size: 12px; padding: 4px 6px;
  border: 1.5px solid var(--ice); border-radius: 6px; max-width: 220px;
}
.role-edit:focus { outline: none; border-color: var(--amber); }
.role-edit:disabled { opacity: 0.6; }

/* ===== shared avatar / user menu ===== */
.user-menu { position: relative; }
.hub-avatar {
  width: 36px; height: 36px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.5);
  background: var(--amber); color: #4a2c0a; font-weight: 800; font-size: 13px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.hub-avatar:hover { border-color: #fff; }
.hub-dropdown {
  position: absolute; right: 0; top: 46px; min-width: 220px;
  background: var(--paper); border-radius: 10px; box-shadow: var(--shadow-lg);
  padding: 8px 0; z-index: 200; color: #1c2833;
}
.hub-dropdown .ud-name { font-weight: 700; color: var(--navy); padding: 6px 16px 0; font-size: 14px; }
.hub-dropdown .ud-email { color: var(--muted); padding: 0 16px 8px; font-size: 12px; }
.hub-dropdown .ud-sep { height: 1px; background: var(--ice-pale); margin: 4px 0; }
.hub-dropdown .ud-item {
  display: block; width: 100%; text-align: left; background: none; border: none;
  padding: 9px 16px; font-size: 13px; color: #1c2833; cursor: pointer;
  text-decoration: none; font-family: inherit;
}
.hub-dropdown .ud-item:hover { background: var(--ice-pale); }
.hub-dropdown .ud-signout { color: var(--red); font-weight: 600; }

/* ===== profile page ===== */
.profile-card { max-width: 560px; }
.profile-head {
  display: flex; align-items: center; gap: 16px; margin-bottom: 18px;
}
.profile-avatar {
  width: 60px; height: 60px; border-radius: 50%; background: var(--navy);
  color: #fff; font-weight: 800; font-size: 22px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.profile-head .ph-name { font-size: 19px; font-weight: 700; color: var(--navy); }
.profile-head .ph-email { font-size: 13px; color: var(--muted); }
.profile-saved {
  background: var(--green-pale); color: var(--green); font-size: 13px;
  padding: 9px 13px; border-radius: 7px; margin-top: 12px;
}

/* ===== Skills & Learning ===== */
.challenge-head { display: flex; justify-content: space-between; align-items: flex-start; }
.challenge-prompt {
  background: var(--ice-pale); border-radius: 8px; padding: 14px 16px;
  font-family: inherit; font-size: 13.5px; line-height: 1.55; white-space: pre-wrap;
  margin: 12px 0; color: #1c2833;
}
.code-label {
  display: block; font-size: 11px; font-weight: 700; color: var(--navy);
  text-transform: uppercase; letter-spacing: 1px; margin-bottom: 5px;
}
.code-editor {
  width: 100%; min-height: 280px; font-family: "SF Mono", Menlo, Consolas, monospace;
  font-size: 13px; line-height: 1.5; padding: 12px 14px; tab-size: 4;
  border: 1.5px solid var(--ice); border-radius: 8px; background: #1F2A38; color: #E8EEF5;
  resize: vertical;
}
.code-editor:focus { outline: none; border-color: var(--amber); }
.challenge-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 14px; border: 1px solid var(--ice-pale); border-radius: 8px; margin-bottom: 6px;
}
.challenge-row:hover { background: var(--ice-pale); }
.cr-title { font-weight: 600; color: var(--navy); font-size: 14px; }
.cr-meta { font-size: 12px; color: var(--muted); margin-top: 2px; }
.run-block {
  margin-top: 14px; border: 1px solid var(--ice); border-radius: 8px; padding: 14px;
}
.run-label { font-size: 12.5px; color: var(--muted); margin-bottom: 8px; }
.run-label code, .tr-detail code {
  background: var(--ice-pale); padding: 1px 5px; border-radius: 4px; font-size: 12px;
}
.run-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 600px) { .run-cols { grid-template-columns: 1fr; } }
.run-sub { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; margin-bottom: 3px; }
.run-block pre {
  background: #1F2A38; color: #E8EEF5; padding: 10px 12px; border-radius: 6px;
  font-size: 12.5px; white-space: pre-wrap; word-break: break-word; margin: 0;
}
.run-verdict { margin-top: 10px; font-weight: 700; font-size: 13px; }
.v-pass { color: var(--green); }
.v-fail { color: var(--red); }
.test-row {
  display: flex; gap: 12px; align-items: center; padding: 6px 10px;
  border-radius: 6px; margin-top: 5px; font-size: 12.5px;
}
.tr-pass { background: var(--green-pale); }
.tr-fail { background: var(--red-pale); }
.tr-name { font-weight: 700; flex: 0 0 150px; }
.tr-verdict { font-weight: 700; }
.tr-pass .tr-verdict { color: var(--green); }
.tr-fail .tr-verdict { color: var(--red); }
.tr-detail { color: var(--muted); }

/* ===== Audit Readiness ===== */
.stage-rings {
  display: flex; gap: 24px; flex-wrap: wrap; margin-top: 14px;
}
.rdy-ring-card {
  flex: 1; min-width: 220px; text-align: center;
  background: var(--paper); border: 1px solid var(--ice-pale);
  border-radius: 11px; padding: 18px 16px;
}
.rdy-ring { width: 150px; height: 150px; }
.rdy-ring-num { font-size: 30px; font-weight: 800; fill: var(--navy); }
.rdy-ring-pctlbl { font-size: 9px; fill: var(--muted); letter-spacing: 1.5px; text-transform: uppercase; }
.rdy-ring-title { font-size: 14px; font-weight: 700; color: var(--navy); margin-top: 6px; }
.rdy-ring-sub { font-size: 12px; color: var(--muted); }
.rdy-ring-legend {
  display: flex; gap: 12px; justify-content: center; flex-wrap: wrap;
  margin-top: 10px; font-size: 11.5px; color: var(--muted);
}
.rdy-ring-legend .lg {
  display: inline-block; width: 10px; height: 10px; border-radius: 2px;
  margin-right: 4px; vertical-align: middle;
}
.lg-ready { background: #F2A65A; }
.lg-prog  { background: #F7C99A; }
.lg-gap   { background: #E8EEF5; }

.clause-bars { margin-top: 14px; }
.clause-bar {
  display: flex; align-items: center; gap: 12px; margin-bottom: 9px;
}
.cb-label { flex: 0 0 220px; font-size: 13px; font-weight: 600; color: var(--navy); }
.cb-track {
  flex: 1; height: 14px; background: var(--ice-pale);
  border-radius: 7px; overflow: hidden;
}
.cb-fill { height: 100%; border-radius: 7px; transition: width 0.4s; }
.cb-good { background: var(--green); }
.cb-mid  { background: var(--amber); }
.cb-low  { background: var(--red); }
.cb-pct { flex: 0 0 42px; text-align: right; font-size: 13px; font-weight: 700; color: var(--navy); }
.cb-counts { flex: 0 0 64px; text-align: right; font-size: 11px; color: var(--muted); }
.cb-key { margin-top: 10px; font-size: 11.5px; }
@media (max-width: 640px) {
  .cb-label { flex-basis: 130px; font-size: 12px; }
  .cb-counts { display: none; }
}

.rdy-badge {
  display: inline-block; padding: 2px 9px; border-radius: 10px;
  font-size: 11px; font-weight: 700; white-space: nowrap;
}
.rdy-Ready      { background: var(--green-pale); color: var(--green); }
.rdy-InProgress { background: var(--amber-soft); color: #8a5418; }
.rdy-Gap        { background: #FBD9D4; color: #b03220; }
.rdy-NA         { background: var(--ice-pale); color: var(--muted); }

/* compact stage rings for the dashboard */
.dash-rings { display: flex; gap: 16px; flex-wrap: wrap; }
.dash-rings .rdy-ring-card { padding: 12px; min-width: 160px; }
.dash-rings .rdy-ring { width: 110px; height: 110px; }

/* ===== Internal Audit ===== */
.btn-ghost.tab-active {
  background: var(--navy); color: #fff; border-color: var(--navy);
}
.cls-badge {
  display: inline-block; padding: 2px 8px; border-radius: 6px;
  font-size: 11px; font-weight: 700; white-space: nowrap;
}
.cls-major { background: #FBD9D4; color: #b03220; }
.cls-minor { background: #FFF4D6; color: #8a6d18; }
.cls-obs   { background: #DCE9F7; color: #1F3A5F; }
.cls-ofi   { background: #E8F0E3; color: #4a6b2e; }
.st-Verified { background: var(--green-pale); color: var(--green); }

/* ===== Document viewer (web version of a controlled document) ===== */
.dv-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 14px; flex-wrap: wrap;
}
.doc-web {
  max-width: 880px; line-height: 1.6; font-size: 14.5px; color: #1c2833;
}
.doc-web h1, .doc-web h2, .doc-web h3 {
  color: var(--navy); margin: 22px 0 8px; line-height: 1.25;
}
.doc-web h3 { font-size: 17px; border-bottom: 1px solid var(--ice-pale); padding-bottom: 4px; }
.doc-web p { margin: 8px 0; }
.doc-web ul, .doc-web ol { margin: 8px 0 8px 22px; }
.doc-web li { margin: 4px 0; }
.doc-web table {
  width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 13px;
}
.doc-web th, .doc-web td {
  border: 1px solid var(--ice); padding: 7px 10px; text-align: left; vertical-align: top;
}
.doc-web tr:first-child td, .doc-web th {
  background: var(--ice-pale); font-weight: 700; color: var(--navy);
}
.doc-web strong { color: var(--navy); }
.doc-web em { color: var(--muted); }

/* slide cross-reference link */
.slide-docref {
  position: absolute; right: 8%; bottom: 5%;
  background: var(--amber); color: #4a2c0a; text-decoration: none;
  font-size: clamp(10px, 1.2vw, 13px); font-weight: 700;
  padding: 6px 12px; border-radius: 14px;
}
.slide-docref:hover { filter: brightness(1.05); }

/* ===== Calendar & Schedules ===== */
.cal-monthbar {
  display: flex; align-items: center; gap: 10px; margin-bottom: 12px;
}
.cal-monthlabel { font-size: 17px; font-weight: 700; color: var(--navy); min-width: 160px; }
.cal-grid {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px;
}
.cal-dayhead {
  font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase;
  letter-spacing: 0.5px; text-align: center; padding: 4px 0;
}
.cal-cell {
  min-height: 92px; background: var(--paper); border: 1px solid var(--ice-pale);
  border-radius: 7px; padding: 5px 6px;
}
.cal-cell.cal-empty { background: transparent; border: none; }
.cal-cell.cal-today { border-color: var(--amber); box-shadow: inset 0 0 0 1px var(--amber); }
.cal-daynum { font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 3px; }
.cal-cell.cal-today .cal-daynum { color: var(--amber); }
.cal-chip {
  display: block; font-size: 10.5px; font-weight: 600; padding: 2px 6px;
  border-radius: 4px; margin-bottom: 3px; cursor: pointer;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: var(--ice-pale); color: var(--navy);
}
.cal-chip:hover { filter: brightness(0.95); }
.cal-chip.chip-overdue { outline: 1.5px solid var(--red); }
.evt-ExternalAudit    { background: #FBD9D4; color: #b03220; }
.evt-InternalAudit    { background: #DCE9F7; color: #1F3A5F; }
.evt-ManagementReview { background: var(--amber-soft); color: #8a5418; }
.evt-DocumentReview   { background: #E8F0E3; color: #4a6b2e; }
.evt-RiskReview       { background: #EDE3F2; color: #6b3a8a; }
.evt-ComplianceDeadline { background: #FFF4D6; color: #8a6d18; }
.evt-TrainingDeadline { background: #D9EFEC; color: #1d6b5e; }
.evt-Other            { background: var(--ice-pale); color: var(--muted); }

.list-group-head {
  font-size: 12px; font-weight: 700; color: var(--navy); text-transform: uppercase;
  letter-spacing: 0.8px; margin: 18px 0 8px; padding-bottom: 4px;
  border-bottom: 2px solid var(--amber);
}
.lg-count { color: var(--muted); font-weight: 700; }
.list-event {
  display: flex; gap: 14px; align-items: center; padding: 10px 12px;
  border: 1px solid var(--ice-pale); border-radius: 8px; margin-bottom: 6px; cursor: pointer;
}
.list-event:hover { background: var(--ice-pale); }
.le-date { flex: 0 0 150px; font-size: 12.5px; font-weight: 700; color: var(--navy); }
.le-date.le-overdue { color: var(--red); }
.le-body { flex: 1; }
.le-title { font-weight: 600; color: var(--navy); font-size: 14px; }
.le-meta { font-size: 12px; color: var(--muted); margin-top: 2px; }
.le-status { flex: 0 0 auto; }
@media (max-width: 640px) {
  .cal-cell { min-height: 64px; }
  .le-date { flex-basis: 96px; }
}

/* slim role banner + glanceable dashboard tweaks */
.role-banner-slim { padding: 14px 22px; }
.role-banner-slim .emphasis { display: none; }
.card-head-row {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin-bottom: 4px;
}
.card-head-row h2 { margin-bottom: 0; }
#moduleGrid { margin-top: 12px; }
.module-card { padding: 18px 20px; }
.mc-title { font-size: 16px; }

/* ===== Document Register ===== */
.pathway-tag {
  display: inline-block; padding: 2px 9px; border-radius: 10px;
  font-size: 11px; font-weight: 700;
}
.pw-ISMS { background: #DCE9F7; color: var(--navy); }
.pw-QMS  { background: #E8F0E3; color: #4a6b2e; }
.pw-Both { background: var(--amber-soft); color: #8a5418; }
.st-UnderReview { background: #FFF4D6; color: #8a6d18; }
.st-Superseded  { background: var(--ice-pale); color: var(--muted); }

/* auditor presentation view */
.auditor-banner {
  background: var(--navy); color: white; border-radius: 8px;
  padding: 10px 16px; font-size: 13px; margin-bottom: 18px;
}
.auditor-pw {
  color: var(--navy); font-size: 18px; font-weight: 700;
  margin: 22px 0 6px; padding-bottom: 4px; border-bottom: 2px solid var(--amber);
}
.auditor-clause {
  font-size: 12px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.8px; margin: 14px 0 6px;
}
.auditor-doc {
  border-left: 3px solid var(--ice); padding: 8px 14px; margin-bottom: 8px;
  background: var(--paper); border-radius: 0 7px 7px 0;
}
.auditor-doc:hover { border-left-color: var(--amber); background: var(--ice-pale); }
.ad-main { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.ad-title { font-weight: 600; color: var(--navy); font-size: 14px; }
.ad-open {
  margin-left: auto; font-size: 12px; font-weight: 700; color: var(--amber);
  text-decoration: none;
}
.ad-meta { font-size: 12px; color: var(--muted); margin-top: 3px; }
.ad-loc { font-size: 11px; color: var(--ice); color: #9aa7b5; margin-top: 2px; }

/* document structural map */
.map-banner {
  background: var(--navy); color: white; border-radius: 8px;
  padding: 10px 16px; font-size: 13px; margin-bottom: 16px;
}
.map-pathway {
  display: flex; align-items: center; gap: 10px;
  margin: 22px 0 4px; padding-bottom: 5px; border-bottom: 2px solid var(--amber);
}
.map-pw-count { font-size: 12px; color: var(--muted); font-weight: 600; }
.map-clause {
  font-size: 12px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.7px;
  margin: 14px 0 4px; padding-left: 4px;
}
.map-doc {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 7px 12px; margin-bottom: 4px;
  border-left: 3px solid var(--ice); background: var(--paper); border-radius: 0 6px 6px 0;
}
.map-doc:hover { border-left-color: var(--amber); background: var(--ice-pale); }
.map-doc-id { font-size: 11.5px; font-weight: 700; color: var(--muted); flex: 0 0 66px; }
.map-doc-title { flex: 1; min-width: 180px; font-size: 13.5px; font-weight: 600; color: var(--navy); }
.map-tags { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.map-ver { font-size: 11px; color: var(--muted); font-weight: 700; }
.map-chip {
  font-size: 10.5px; font-weight: 700; padding: 2px 8px; border-radius: 10px;
  text-decoration: none;
}
.map-web { background: #DCE9F7; color: #1F3A5F; }
.map-web:hover { filter: brightness(0.95); }
.map-od  { background: #E8F0E3; color: #4a6b2e; }
.map-od:hover { filter: brightness(0.97); }
.map-ep  { background: var(--amber-soft); color: #8a5418; }

/* ===== Operating Rhythm ===== */
.rhythm-status {
  border-radius: 9px; padding: 14px 18px; font-size: 13.5px; line-height: 1.5;
  margin-bottom: 16px; border-left: 4px solid var(--ice);
}
.rhythm-status strong { display: block; font-size: 14.5px; color: var(--navy); margin-bottom: 2px; }
.rs-done { background: var(--green-pale); border-left-color: var(--green); }
.rs-due  { background: var(--amber-soft); border-left-color: var(--amber); }
.rs-none { background: var(--ice-pale); border-left-color: var(--ice); color: var(--muted); }
.rs-none strong { color: var(--muted); }

.checkin-form { display: flex; flex-direction: column; gap: 4px; }
.checkin-q {
  display: flex; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--ice-pale);
}
.cq-num {
  flex: 0 0 26px; height: 26px; border-radius: 50%; background: var(--navy);
  color: #fff; font-weight: 800; font-size: 12px;
  display: flex; align-items: center; justify-content: center;
}
.cq-main { flex: 1; }
.cq-text { font-size: 14px; color: #1c2833; line-height: 1.5; margin-bottom: 9px; }
.cq-controls { display: flex; flex-direction: column; gap: 8px; }
.cq-btns { display: flex; gap: 8px; }
.cq-btn {
  background: var(--paper); border: 1.5px solid var(--ice); color: var(--navy);
  padding: 7px 22px; border-radius: 8px; font-size: 13px; font-weight: 700;
  cursor: pointer; font-family: inherit;
}
.cq-btn:hover { border-color: var(--amber); }
.cq-btn.cq-sel { background: var(--navy); color: #fff; border-color: var(--navy); }
.cq-followup { margin-top: 2px; }
.cq-textarea {
  width: 100%; min-height: 60px; padding: 9px 11px; font-family: inherit;
  font-size: 13px; border: 1.5px solid var(--ice); border-radius: 8px; resize: vertical;
}
.cq-textarea:focus { outline: none; border-color: var(--amber); }
.q-actions { padding-top: 16px; }

.sa-finding {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 12px 14px; border-radius: 9px; margin-bottom: 8px;
  border-left: 4px solid var(--ice); background: var(--paper);
}
.sa-high   { border-left-color: var(--red); background: var(--red-pale); }
.sa-medium { border-left-color: var(--amber); background: var(--amber-soft); }
.sa-low    { border-left-color: var(--navy); background: var(--ice-pale); }
.sa-sev {
  flex: 0 0 64px; font-size: 10.5px; font-weight: 800; letter-spacing: 0.8px;
  text-transform: uppercase; padding-top: 2px;
}
.sa-high .sa-sev   { color: var(--red); }
.sa-medium .sa-sev { color: #8a6d18; }
.sa-low .sa-sev    { color: var(--navy); }
.sa-main { flex: 1; }
.sa-title { font-size: 14px; font-weight: 700; color: var(--navy); }
.sa-count {
  display: inline-block; min-width: 22px; text-align: center; margin-left: 6px;
  background: var(--navy); color: #fff; font-size: 11px; font-weight: 800;
  padding: 1px 7px; border-radius: 10px;
}
.sa-detail { font-size: 12.5px; color: var(--muted); margin-top: 3px; line-height: 1.45; }
.sa-clear {
  background: var(--green-pale); border-left: 4px solid var(--green);
  border-radius: 9px; padding: 16px 18px; font-size: 13.5px; color: #1c2833; line-height: 1.5;
}

/* dashboard "your check-in" panel */
.checkin-mini {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  border-radius: 9px; background: var(--ice-pale); font-size: 13px;
}
.checkin-mini.cm-due  { background: var(--amber-soft); }
.checkin-mini.cm-done { background: var(--green-pale); }
.cm-icon { font-size: 22px; flex: 0 0 auto; }
.cm-body { flex: 1; }
.cm-body strong { color: var(--navy); }
