/* ===== NSC Employee Portal ===== */
:root {
  --navy: #0c223d;
  --navy-light: #14304f;
  --navy-soft: #1d3a5c;
  --orange: #f04e23;
  --orange-dark: #d8431b;
  --ink: #1b2733;
  --muted: #5b6878;
  --bg: #ffffff;
  --bg-alt: #f5f7fa;
  --border: #e3e8ee;
  --radius: 10px;
  --shadow: 0 10px 30px rgba(12, 34, 61, 0.08);
  --green: #1e7e34;
  --green-bg: #d9f2e0;
  --amber: #9a7300;
  --amber-bg: #fdf3d0;
  --grey-bg: #eef1f5;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg-alt);
  line-height: 1.55;
}
img { max-width: 100%; }
h1, h2, h3 { color: var(--navy); margin: 0 0 0.4rem; line-height: 1.25; }
label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--navy); margin: 12px 0 4px; }
input, select, textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
  color: var(--ink);
  background: #fff;
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid rgba(240, 78, 35, 0.35);
  border-color: var(--orange);
}
button { font: inherit; cursor: pointer; }

.btn-primary {
  background: var(--orange);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
  font-weight: 600;
  transition: background 0.15s;
}
.btn-primary:hover { background: var(--orange-dark); }
.btn-primary:disabled { opacity: 0.6; cursor: default; }
.btn-ghost {
  background: transparent;
  color: var(--navy);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 16px;
  font-weight: 600;
}
.btn-ghost:hover { background: var(--grey-bg); }
.btn-sm { padding: 6px 12px; font-size: 0.85rem; }
.btn-link {
  background: none; border: none; color: var(--orange); font-weight: 600;
  padding: 4px 6px; font-size: 0.85rem; white-space: nowrap;
}
.btn-link:hover { text-decoration: underline; }
.btn-link.danger { color: #b02a37; }

.form-error {
  background: #fdecea; color: #b02a37;
  border-radius: 8px; padding: 8px 12px; font-size: 0.9rem; margin-top: 12px;
}
.form-ok {
  background: var(--green-bg); color: var(--green);
  border-radius: 8px; padding: 8px 12px; font-size: 0.9rem; margin-top: 12px;
}

/* ---- Login page ---- */
.login-body {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 60%, var(--navy-soft) 100%);
  display: flex; align-items: center; justify-content: center;
}
.login-wrap { width: 100%; max-width: 420px; padding: 24px; }
.login-card {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  padding: 36px 32px;
  text-align: center;
}
.login-logo { max-width: 240px; margin: 0 auto 18px; }
.login-card h1 { font-size: 1.5rem; }
.login-sub { color: var(--muted); margin: 0 0 10px; }
.login-card form { text-align: left; }
.login-card .btn-primary { width: 100%; margin-top: 18px; padding: 12px; }
.login-help { font-size: 0.82rem; color: var(--muted); margin: 16px 0 0; }
.login-footer { text-align: center; color: rgba(255, 255, 255, 0.65); font-size: 0.82rem; margin-top: 18px; }

/* ---- Portal header ---- */
.portal-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 50;
}
.portal-header-inner {
  max-width: 1180px; margin: 0 auto; padding: 10px 24px;
  display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
}
.portal-logo { height: 40px; width: auto; }
.portal-tabs { display: flex; gap: 4px; flex: 1; }
.tab-btn {
  background: none; border: none; padding: 10px 14px;
  border-radius: 8px; font-weight: 600; color: var(--muted);
}
.tab-btn:hover { background: var(--grey-bg); color: var(--navy); }
.tab-btn.active { background: var(--navy); color: #fff; }
.portal-user { display: flex; align-items: center; gap: 10px; }
.user-chip { font-size: 0.9rem; font-weight: 600; color: var(--navy); }
.role-badge {
  display: inline-block; font-size: 0.7rem; text-transform: uppercase;
  letter-spacing: 0.04em; background: var(--grey-bg); color: var(--muted);
  border-radius: 999px; padding: 2px 8px; margin-left: 4px;
}
.role-badge.superadmin { background: var(--navy); color: #fff; }
.role-badge.admin { background: var(--orange); color: #fff; }

/* password expiry countdown */
.pw-pill {
  font-size: 0.78rem; font-weight: 700; white-space: nowrap;
  background: var(--grey-bg); color: var(--muted);
  border-radius: 999px; padding: 4px 12px;
}
.pw-pill.warn { background: var(--amber-bg); color: var(--amber); }
.pw-pill.danger { background: #fdecea; color: #b02a37; }
.pw-note { font-size: 0.85rem; color: var(--muted); }
.pw-note.warn { color: var(--amber); font-weight: 600; }
.pw-note.danger { color: #b02a37; font-weight: 600; }
.force-pw { background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 60%, var(--navy-soft) 100%); }

/* ---- Main / panels ---- */
.portal-main { max-width: 1180px; margin: 0 auto; padding: 28px 24px 60px; }
.panel-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; margin-bottom: 18px; flex-wrap: wrap;
}
.panel-sub { color: var(--muted); margin: 0; font-size: 0.92rem; }

.filters {
  display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; align-items: center;
}
.filters input[type="search"] { max-width: 280px; }
.filters select { max-width: 190px; }
.chk { display: flex; align-items: center; gap: 6px; font-size: 0.9rem; font-weight: 600; color: var(--navy); margin: 0; }
.chk input { width: auto; }

/* ---- Table ---- */
.table-wrap {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); overflow-x: auto;
}
.task-table { width: 100%; border-collapse: collapse; min-width: 760px; }
.task-table th {
  text-align: left; background: var(--navy); color: #fff;
  padding: 10px 14px; font-size: 0.85rem; white-space: nowrap;
}
.task-table td {
  padding: 10px 14px; border-top: 1px solid var(--border);
  font-size: 0.92rem; vertical-align: top;
}
.task-table tbody tr:hover { background: var(--bg-alt); }
.col-num { width: 40px; }
.col-actions { width: 110px; }
.task-title { font-weight: 600; color: var(--ink); }
.task-notes { color: var(--muted); font-size: 0.88rem; }
.mine-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--orange); margin-right: 6px; vertical-align: middle;
}

.status-badge {
  display: inline-block; padding: 3px 12px; border-radius: 999px;
  font-size: 0.8rem; font-weight: 700; white-space: nowrap;
}
.status-completed { background: var(--green-bg); color: var(--green); }
.status-in_progress { background: var(--amber-bg); color: var(--amber); }
.status-pending { background: var(--grey-bg); color: var(--muted); }

.empty-msg { text-align: center; color: var(--muted); padding: 28px; margin: 0; }

/* ---- My Dashboard ---- */
.stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}
.stat-tile {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 20px;
  text-align: left;
  cursor: pointer;
  transition: transform 0.12s, border-color 0.12s;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.stat-tile:hover { transform: translateY(-2px); border-color: var(--navy); }
.stat-num { font-size: 2rem; font-weight: 700; color: var(--navy); line-height: 1.1; }
.stat-label { font-size: 0.85rem; font-weight: 600; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; }
.dot-pending { background: #9aa5b1; }
.dot-progress { background: #e0b400; }
.dot-completed { background: #2da44e; }

.dash-progress { margin-bottom: 22px; }
.bar-track {
  display: flex;
  gap: 2px;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--grey-bg);
}
.bar-seg { display: block; height: 100%; }
.seg-completed { background: #2da44e; }
.seg-progress { background: #e0b400; }
.seg-pending { background: #9aa5b1; }
.bar-caption { color: var(--muted); font-size: 0.85rem; margin: 6px 0 0; }

.dash-section { margin-bottom: 26px; }
.dash-section h3 { margin: 0 0 10px; font-size: 1.05rem; }

@media (max-width: 720px) {
  .stat-row { grid-template-columns: repeat(2, 1fr); }
}

/* ---- Account ---- */
.account-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 24px 28px; max-width: 480px;
}
.account-card .btn-primary { margin-top: 18px; }

/* ---- Modals ---- */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(12, 34, 61, 0.55);
  display: flex; align-items: center; justify-content: center; z-index: 100; padding: 20px;
}
.modal-backdrop[hidden] { display: none; }
.modal {
  background: #fff; border-radius: 14px; padding: 26px 28px;
  width: 100%; max-width: 560px; max-height: 90vh; overflow-y: auto;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.modal-task-name { color: var(--muted); font-size: 0.92rem; margin: 0 0 6px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.assignee-box {
  display: flex; flex-wrap: wrap; gap: 8px;
  border: 1px solid var(--border); border-radius: 8px; padding: 10px; background: var(--bg-alt);
}
.assignee-box label {
  display: flex; align-items: center; gap: 5px; margin: 0;
  font-weight: 500; font-size: 0.88rem; background: #fff;
  border: 1px solid var(--border); border-radius: 999px; padding: 4px 12px; cursor: pointer;
}
.assignee-box label:has(input:checked) { background: var(--navy); color: #fff; border-color: var(--navy); }
.assignee-box input { width: auto; }

@media (max-width: 720px) {
  .portal-header-inner { gap: 10px; }
  .portal-tabs { order: 3; width: 100%; }
  .two-col { grid-template-columns: 1fr; }
}

/* ---- Idle / assignment status (team overview) ---- */
.status-idle { background: #fdecea; color: #b02a37; }
.status-active { background: var(--green-bg); color: var(--green); }

/* ---- Idle Calendar ---------------------------------------------------- */
.cal-controls { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.cal-controls select { width: auto; min-width: 170px; padding: 6px 10px; font-size: 0.9rem; }

.cal-legend {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  margin-bottom: 12px; font-size: 0.85rem; color: var(--muted);
}
.cal-key { display: flex; align-items: center; gap: 7px; font-weight: 600; }
.cal-swatch {
  width: 16px; height: 12px; border-radius: 3px; display: inline-block;
  border: 1px solid var(--border);
}
.swatch-idle { background: #b02a37; border-color: #b02a37; }
.swatch-work { background: #fff; }
.swatch-future {
  background: repeating-linear-gradient(135deg, #eef1f5 0 4px, #e0e5ec 4px 8px);
}
.cal-hours { margin-left: auto; font-weight: 600; }

.cal-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 14px 16px 10px; overflow-x: auto;
}
.cal-grid { display: flex; gap: 2px; min-width: 680px; }
.cal-col { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.cal-col.is-today .cal-col-head { color: var(--orange); }

.cal-col-head {
  display: flex; flex-direction: column; line-height: 1.2;
  font-size: 0.82rem; color: var(--navy); text-align: center;
  padding-bottom: 8px; min-height: 38px;
}
.cal-col-head span { color: var(--muted); font-weight: 600; font-size: 0.75rem; }
.cal-col-foot {
  text-align: center; font-size: 0.78rem; color: var(--muted);
  padding: 7px 2px 0; min-height: 26px; font-weight: 600;
}

/* the 08:30-17:30 track: recessive hour lines, nothing louder than the data */
.cal-track {
  position: relative; height: 340px;
  border: 1px solid var(--border); border-radius: 6px; background: #fff;
  background-image: repeating-linear-gradient(
    to bottom, transparent 0, transparent calc(11.111% - 1px), var(--border) calc(11.111% - 1px), var(--border) 11.111%);
  overflow: hidden;
}

/* hour rail on the left */
.cal-rail { flex: 0 0 52px; }
.cal-rail .cal-track { border: none; background: none; overflow: visible; }
.cal-hour {
  position: absolute; right: 6px; transform: translateY(-50%);
  font-size: 0.72rem; color: var(--muted); white-space: nowrap;
}

/* idle = the only coloured mark, with a text label whenever it fits */
.cal-block {
  position: absolute; left: 3px; right: 3px;
  background: #b02a37; border-radius: 4px;
  box-shadow: 0 0 0 2px #fff;           /* 2px surface gap between blocks */
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; cursor: default;
}
.cal-block-label {
  color: #fff; font-size: 0.72rem; font-weight: 700;
  padding: 0 4px; white-space: nowrap; text-overflow: ellipsis; overflow: hidden;
}
/* time that hasn't happened yet: texture, so it reads without relying on colour */
.cal-future {
  position: absolute; left: 0; right: 0;
  background: repeating-linear-gradient(135deg, #f2f5f8 0 5px, #e6ebf1 5px 10px);
}
.cal-now { position: absolute; left: 0; right: 0; height: 2px; background: var(--orange); }

@media (max-width: 720px) {
  .cal-hours { margin-left: 0; width: 100%; }
  .cal-track { height: 260px; }
}

/* ---- Escalated status + severity ------------------------------------- */
.status-escalated { background: #b02a37; color: #fff; }
.status-pending_customer { background: #e4edf9; color: #23405f; }
tr.row-escalated td {
  background: #fbd5d9;
  color: #7a1620;
  border-top-color: #eda9b1;
  font-weight: 600;
}
tr.row-escalated td:first-child {
  box-shadow: inset 4px 0 0 #b02a37;   /* red spine down the whole row */
  font-weight: 700;
}
tr.row-escalated .task-link { color: #8c1f2a; }
tr.row-escalated .task-link:hover { color: #6f1720; }
tr.row-escalated .task-notes { color: #8c2b34; }
tr.row-escalated:hover td { background: #f8c4ca; }

/* Severity is ordinal, so it uses one hue getting darker - never the
   red/amber/green of status, which would be a different meaning. */
.sev-badge {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-size: 0.78rem; font-weight: 700; white-space: nowrap;
  border: 1px solid transparent;
}
.sev-low      { background: #f2f5f8; color: #5b6878; border-color: #e3e8ee; }
.sev-medium   { background: #dde5ef; color: #23405f; }
.sev-high     { background: #1d3a5c; color: #fff; }
.sev-critical { background: #0c223d; color: #fff; box-shadow: inset 0 0 0 2px #f04e23; }

/* ---- Task age dot ----------------------------------------------------- */
.age-cell { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.age-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.age-new { background: #1f6fd0; }   /* up to 7 days  */
.age-mid { background: #e0a300; }   /* 8 to 14 days  */
.age-old { background: #b02a37; }   /* over 14 days  */
.col-age { white-space: nowrap; }

/* ---- Sortable headers -------------------------------------------------- */
th.sortable { cursor: pointer; user-select: none; }
th.sortable:hover { background: var(--navy-light); }
th.sortable::after { content: '⇅'; opacity: 0.45; margin-left: 6px; font-size: 0.85em; }
th.sortable.sorted[data-dir="asc"]::after { content: '↑'; opacity: 1; }
th.sortable.sorted[data-dir="desc"]::after { content: '↓'; opacity: 1; }

/* ---- Clickable task name ---------------------------------------------- */
.task-link {
  color: #1f6fd0; text-decoration: underline; text-underline-offset: 2px;
  cursor: pointer; font-weight: 600;
  background: none; border: none; padding: 0; margin: 0; outline: none;
}
.task-link:hover { color: var(--orange); }
.task-link:visited { color: #1f6fd0; }
.task-link:focus { outline: none; }
.task-link:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }

/* ---- Task detail panel ------------------------------------------------- */
.modal-wide { max-width: 760px; }
.detail-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.detail-head-actions { display: flex; gap: 8px; flex: none; }
.escalated-note { color: #b02a37; font-weight: 700; font-size: 0.85rem; }

.detail-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px 18px;
  margin: 16px 0 4px; padding: 14px 16px;
  background: var(--bg-alt); border: 1px solid var(--border); border-radius: 10px;
}
.detail-grid dt { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); font-weight: 700; }
.detail-grid dd { margin: 2px 0 0; font-size: 0.92rem; color: var(--ink); }

.detail-block { margin-top: 20px; }
.detail-block h4 { margin: 0 0 8px; color: var(--navy); font-size: 1rem; }
.detail-count { color: var(--muted); font-weight: 600; font-size: 0.85rem; }
.detail-notes { margin: 0; white-space: pre-wrap; }

.comment-list { display: flex; flex-direction: column; gap: 10px; }
.comment {
  border: 1px solid var(--border); border-left: 3px solid var(--border);
  border-radius: 8px; padding: 10px 12px; background: #fff;
}
.comment-mine { border-left-color: var(--orange); background: #fffaf8; }
.comment-head { display: flex; justify-content: space-between; gap: 10px; font-size: 0.8rem; color: var(--muted); }
.comment-head strong { color: var(--navy); }
.comment-body { margin-top: 4px; white-space: pre-wrap; font-size: 0.92rem; }

.history-list { list-style: none; margin: 0; padding: 0; font-size: 0.88rem; }
.history-list li {
  padding: 7px 0 7px 14px; border-left: 2px solid var(--border);
  display: flex; gap: 12px; flex-wrap: wrap;
}
.hist-when { color: var(--muted); flex: 0 0 150px; }
.hist-what { flex: 1; min-width: 220px; }
.field-hint { font-size: 0.8rem; color: var(--amber); margin: 6px 0 0; }

@media (max-width: 720px) {
  .detail-grid { grid-template-columns: 1fr 1fr; }
  .hist-when { flex-basis: 100%; }
}

/* ---- Task detail panel: header, cards, people, history ---------------- */
.detail-banner {
  background: #b02a37; color: #fff; border-radius: 10px;
  padding: 10px 14px; margin: 0 0 14px; font-size: 0.92rem;
}
.detail-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.detail-head-main { min-width: 0; }
.detail-ref {
  display: inline-block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 2px;
}
.detail-head h3 { margin: 0 0 8px; font-size: 1.3rem; line-height: 1.3; }
.detail-badges { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0; }
.age-pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--grey-bg); color: var(--muted);
  border-radius: 999px; padding: 3px 12px; font-size: 0.78rem; font-weight: 700;
}
.age-pill-mid { background: var(--amber-bg); color: var(--amber); }
.age-pill-old { background: #fdecea; color: #b02a37; }

.detail-cards {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px;
  margin: 18px 0 4px;
}
.detail-card {
  display: flex; flex-direction: column; gap: 3px;
  background: var(--bg-alt); border: 1px solid var(--border);
  border-radius: 10px; padding: 10px 12px; min-width: 0;
}
.detail-card-wide { grid-column: span 2; }
.detail-label {
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.05em;
  text-transform: uppercase; color: var(--muted);
}
.detail-value { font-size: 0.95rem; font-weight: 600; color: var(--ink); }
.detail-sub { font-size: 0.8rem; color: var(--muted); }
.detail-sub-warn { color: #b02a37; font-weight: 700; }
.detail-empty { color: var(--muted); font-weight: 400; font-style: italic; }

.detail-people { display: flex; flex-wrap: wrap; gap: 6px; }
.person-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: #fff; border: 1px solid var(--border); border-radius: 999px;
  padding: 3px 12px 3px 3px; font-size: 0.85rem; font-weight: 600; color: var(--navy);
}
.person-chip-text { padding-left: 12px; color: var(--muted); font-style: italic; }
.person-ini {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 50%; flex: none;
  background: var(--navy); color: #fff; font-size: 0.7rem; font-weight: 700;
}

/* comments get the same avatar treatment */
.comment { display: flex; gap: 10px; align-items: flex-start; }
.comment-main { flex: 1; min-width: 0; }

/* history timeline */
.history-list li {
  position: relative; padding: 8px 0 8px 22px; border-left: 2px solid var(--border);
  display: flex; gap: 12px; flex-wrap: wrap; align-items: baseline;
}
.hist-dot {
  position: absolute; left: -6px; top: 15px;
  width: 10px; height: 10px; border-radius: 50%;
  background: #c7d0da; border: 2px solid #fff;
}
.hist-created .hist-dot { background: var(--navy); }
.hist-assign  .hist-dot { background: #1f6fd0; }
.hist-status  .hist-dot { background: var(--orange); }
.hist-comment .hist-dot { background: #2da44e; }
.hist-quote { color: var(--ink); font-style: italic; }
.hist-prev { color: var(--muted); }
.history-list .status-badge, .history-list .sev-badge { font-size: 0.72rem; padding: 1px 8px; }

@media (max-width: 860px) {
  .detail-cards { grid-template-columns: repeat(2, 1fr); }
  .detail-card-wide { grid-column: span 2; }
}

/* ---- Detail panel polish ---------------------------------------------- */
#detail-modal .modal { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.detail-scroll { overflow-y: auto; padding: 0 26px 26px; }

/* title block stays put while the history scrolls */
.detail-top {
  position: sticky; top: 0; z-index: 2; background: #fff;
  padding: 22px 26px 14px; border-bottom: 1px solid var(--border);
}
.detail-banner { margin: 0 0 12px; display: flex; align-items: center; gap: 8px; }
/* an author display rule beats the browser's [hidden] rule - restore it */
.detail-banner[hidden] { display: none; }

.detail-block { margin-top: 22px; }
.detail-block h4 {
  display: flex; align-items: center; gap: 8px;
  margin: 0 0 10px; padding-bottom: 6px;
  border-bottom: 2px solid var(--border);
  font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted);
}
.detail-notes {
  background: var(--bg-alt); border: 1px solid var(--border); border-left: 3px solid var(--navy);
  border-radius: 8px; padding: 12px 14px; margin: 0; white-space: pre-wrap;
}
#d-comment-form { margin-top: 14px; }
#d-comment-form label { margin-top: 0; }
.comment-list:empty { display: none; }
#d-comments .empty-msg { padding: 16px; background: var(--bg-alt); border-radius: 8px; margin: 0; }
.detail-cards { margin-top: 16px; }
