/* ─────────────────────────────────────────────────────────
   IT Support Portal — style.css
   Aesthetic: Technical Precision
   Fonts: IBM Plex Sans (body) + IBM Plex Mono (code/refs)
───────────────────────────────────────────────────────── */

/* ── Design tokens ───────────────────────────────────────── */
:root {
  --white:      #ffffff;
  --gray-50:    #f8fafc;
  --gray-100:   #f1f5f9;
  --gray-200:   #e2e8f0;
  --gray-300:   #cbd5e1;
  --gray-400:   #5b6878;  /* muted text — darkened from #94a3b8 for WCAG AA (≥4.5:1 on white, cards, and the dot-grid body) */
  --gray-500:   #64748b;
  --gray-700:   #334155;
  --gray-900:   #0f172a;

  --blue-50:    #eff6ff;
  --blue-100:   #dbeafe;
  --blue-450:   #1e6ec4;
  --blue-500:   #1e7de8;
  --blue-600:   #185FA5;
  --blue-600-rgb: 24,95,165;
  --blue-700:   #135490;
  --blue-800:   #0c3d75;
  --blue-900a:  #0a2848;
  --blue-900b:  #0f3d6e;
  --blue-900c:  #143f72;
  --blue-ring:  #bcd8ff;
  --blue-wash-1: #f4f8ff;
  --blue-wash-2: #edf5ff;
  --blue-wash-3: #e6f1fb;
  --blue-wash-4: #d4e9f9;
  --blue-wash-5: #bdd5f0;

  --radius-sm:  6px;
  --radius-md:  12px;
  --radius-lg:  18px;

  --shadow-sm:  0 1px 2px rgba(15,23,42,.04), 0 1px 4px rgba(15,23,42,.04);
  --shadow-md:  0 2px 8px rgba(15,23,42,.06), 0 4px 16px rgba(15,23,42,.06);
  --shadow-lg:  0 8px 24px rgba(15,23,42,.1),  0 2px 8px rgba(15,23,42,.06);
  --shadow-blue: 0 4px 14px rgba(var(--blue-600-rgb),.28);

  --t-base:    .18s cubic-bezier(.4,0,.2,1);
  --t-slow:    .3s  cubic-bezier(.4,0,.2,1);
  --t-spring:  .25s cubic-bezier(.34,1.56,.64,1);

  --font-body: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', 'SFMono-Regular', Consolas, monospace;

  --sidebar-w: 224px;
  --topbar-h:  52px;
}

/* ── Keyframes ───────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(.97); }
  to   { opacity: 1; transform: scale(1); }
}

/* ── Reduced motion (accessibility) ──────────────────────────
   Honour the OS "reduce motion" setting: near-instant animations
   and transitions, and stop the pulsing SLA-breach dot.          */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ── Reset & base ────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }
body {
  font-family: var(--font-body);
  color: #1a2332;
  background-color: #edf0f7;
  background-image: radial-gradient(circle, #c8d0de 1px, transparent 1px);
  background-size: 22px 22px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: var(--blue-600); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Keyboard focus ring (accessibility) ─────────────────────
   Consistent, visible focus for keyboard users on every
   interactive element. :focus-visible keeps it keyboard-only so
   mouse clicks don't show a ring. Form inputs keep their own
   blue glow (defined with their components below).               */
:where(a, button, .btn, .sidebar-link, .user-chip-link,
       .pagination a, [tabindex]):focus-visible {
  outline: 2px solid var(--blue-600);
  outline-offset: 2px;
  border-radius: 4px;
}
/* Dark topbar: use a light ring so it stays visible on navy */
.topbar :focus-visible,
.topbar-brand:focus-visible {
  outline: 2px solid var(--blue-ring);
  outline-offset: 2px;
}

/* ── Topbar ──────────────────────────────────────────────── */
.topbar {
  background: linear-gradient(135deg, var(--blue-900a) 0%, var(--blue-900b) 60%, var(--blue-900c) 100%);
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 0 rgba(255,255,255,.06), 0 2px 12px rgba(0,0,0,.25);
}
.topbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
}
.topbar-icon {
  width: 30px;
  height: 30px;
  background: linear-gradient(135deg, var(--blue-500) 0%, var(--blue-600) 100%);
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
}
.topbar-icon-logo {
  background: #fff;
  padding: 3px;
}
.topbar-icon-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.topbar-school  { font-weight: 600; font-size: 14px; color: #fff; letter-spacing: .01em; }
.topbar-divider { color: rgba(255,255,255,0.2); }
.topbar-sub     { font-size: 13px; color: rgba(255,255,255,.5); font-weight: 300; letter-spacing: .02em; }

.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  font-size: 13px;
  color: rgba(255,255,255,.85);
}
.user-avatar {
  width: 28px;
  height: 28px;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  flex-shrink: 0;
  font-family: var(--font-mono);
}
.user-name { font-size: 13px; color: rgba(255,255,255,.9); font-weight: 500; }
.user-chip-link {
  display: flex; align-items: center; gap: 8px;
  padding: 3px 8px 3px 3px; border-radius: 20px;
  text-decoration: none; transition: background var(--t-base);
}
.user-chip-link:hover { background: rgba(255,255,255,.08); text-decoration: none; }
.role-chip {
  font-size: 10px;
  font-weight: 600;
  background: rgba(125,196,249,.2);
  color: #93c4ef;
  border: 1px solid rgba(125,196,249,.3);
  border-radius: 20px;
  padding: 2px 8px;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.logout-link {
  color: rgba(255,255,255,.45);
  font-size: 12px;
  padding: 4px 9px;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 5px;
  transition: all var(--t-base);
}
.logout-form { margin: 0; display: inline-flex; }
button.logout-link { background: transparent; font: inherit; font-size: 12px; line-height: inherit; cursor: pointer; }
.logout-link:hover { color: #fff; background: rgba(255,255,255,.08); text-decoration: none; border-color: rgba(255,255,255,.3); }

/* ── Layout ──────────────────────────────────────────────── */
.app-shell {
  display: flex;
  flex: 1;
  min-height: 0;
}
.main-content {
  flex: 1;
  padding: 2rem 1.75rem;
  min-width: 0;
  overflow-x: hidden;
  animation: fadeIn .3s ease both;
}
.page-wrap { max-width: 960px;  margin: 0 auto; }
.page-wide  { max-width: 1200px; margin: 0 auto; }
.footer {
  background: rgba(255,255,255,.7);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--gray-200);
  padding: 1rem 1.5rem;
  font-size: 12px;
  color: var(--gray-400);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px;
}

/* ── Sidebar ─────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: #fff;
  border-right: 1px solid #dde3ef;
  display: flex;
  flex-direction: column;
  align-self: stretch;
  box-shadow: 2px 0 8px rgba(15,23,42,.03);
}
.sidebar::before {
  content: '';
  display: block;
  height: 3px;
  background: linear-gradient(90deg, var(--blue-600) 0%, #7B5EA7 100%);
  flex-shrink: 0;
}
.sidebar-nav {
  display: flex;
  flex-direction: column;
  padding: .875rem 0;
}
.sidebar-section {
  padding: 0 0 .6rem 0;
  margin-bottom: .2rem;
}
.sidebar-section + .sidebar-section {
  border-top: 1px solid #f0f3f9;
  padding-top: .75rem;
}
.sidebar-section-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: #b0bccf;
  padding: 0 1.1rem .4rem;
  font-family: var(--font-mono);
}
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 1.1rem;
  font-size: 13px;
  font-weight: 400;
  color: #4a5568;
  text-decoration: none;
  border-radius: 0;
  transition: background var(--t-base), color var(--t-base);
  border-left: 3px solid transparent;
}
.sidebar-link svg { flex-shrink: 0; opacity: .5; transition: opacity var(--t-base); }
.sidebar-link:hover {
  background: linear-gradient(90deg, var(--blue-wash-1), var(--blue-wash-1));
  color: var(--blue-600);
  text-decoration: none;
}
.sidebar-link:hover svg { opacity: .9; }
.sidebar-link.active {
  background: linear-gradient(90deg, var(--blue-wash-2), var(--blue-wash-2));
  color: var(--blue-600);
  font-weight: 600;
  border-left-color: var(--blue-600);
}
.sidebar-link.active svg { opacity: 1; }
.sidebar-link-sub {
  padding-left: 2.6rem;
  font-size: 12px;
  color: var(--gray-500);
}
.sidebar-link-sub:hover { color: var(--blue-600); }

/* Hamburger toggle (mobile only) */
.sidebar-toggle {
  display: none;
  background: none;
  border: none;
  color: rgba(255,255,255,.75);
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 5px;
  flex-shrink: 0;
  margin-right: 4px;
}
.sidebar-toggle:hover { background: rgba(255,255,255,.1); color: #fff; }

@media (max-width: 768px) {
  .sidebar-toggle { display: flex; align-items: center; }
  .sidebar {
    position: fixed;
    top: var(--topbar-h);
    left: 0;
    height: calc(100vh - var(--topbar-h));
    overflow-y: auto;
    z-index: 90;
    transform: translateX(-100%);
    transition: transform .25s ease;
    box-shadow: 4px 0 24px rgba(0,0,0,.14);
  }
  .sidebar.sidebar-open { transform: translateX(0); }
  .main-content { padding: 1.25rem 1rem; }
}

/* ── Page header ─────────────────────────────────────────── */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  animation: fadeUp .3s ease both;
}
.page-header h1 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -.02em;
  color: #0d1b2e;
}
.back-link { font-size: 13px; color: var(--gray-400); display: block; margin-bottom: 5px; }
.back-link:hover { color: var(--blue-600); text-decoration: none; }
.role-badge { background: var(--blue-50); color: var(--blue-800); font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 20px; align-self: center; letter-spacing: .03em; }

/* ── Cards ───────────────────────────────────────────────── */
.card {
  background: #fff;
  border: 1px solid #dde3ef;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  animation: fadeUp .35s ease both;
}
.card:nth-child(2) { animation-delay: .05s; }
.card:nth-child(3) { animation-delay: .1s; }
.card:nth-child(4) { animation-delay: .15s; }
.form-card  { padding: 1.75rem; max-width: 640px; }
.table-card { overflow: hidden; }
.detail-card { padding: 1.5rem; }
.detail-card h2 { font-size: 15px; font-weight: 600; margin-bottom: 1rem; letter-spacing: -.01em; }
.detail-card h3 { font-size: 13px; font-weight: 600; color: #556; margin-bottom: 6px; }
.manage-card { position: sticky; top: calc(var(--topbar-h) + 1.25rem); }

/* ── Detail layout ───────────────────────────────────────── */
.detail-layout { display: grid; grid-template-columns: 1fr 340px; gap: 1rem; align-items: start; }
@media (max-width: 768px) { .detail-layout { grid-template-columns: 1fr; } .manage-card { position: static; } }

/* ── Detail list ─────────────────────────────────────────── */
.detail-list { display: grid; grid-template-columns: 130px 1fr; gap: 6px 12px; font-size: 14px; }
.detail-list dt { color: var(--gray-400); font-weight: 500; }
.detail-list dd { color: #1a2332; }
.description-box {
  background: linear-gradient(135deg, #f8fafc, #f4f7fc);
  border-left: 3px solid var(--blue-600);
  padding: 12px 16px;
  font-size: 14px;
  border-radius: 0 8px 8px 0;
  white-space: pre-wrap;
  line-height: 1.65;
  color: #2d3748;
}

/* ── Knowledge base ──────────────────────────────────────── */
.kb-suggest-box {
  background: linear-gradient(135deg, #fffbeb, #fef9e7);
  border: 1px solid #fbe9b0;
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin: -8px 0 1.25rem;
}
.kb-suggest-title { font-size: 13px; font-weight: 600; color: #7a4506; margin-bottom: 6px; }
.kb-suggest-list { list-style: none; display: flex; flex-direction: column; gap: 4px; }
.kb-suggest-list a { font-size: 13px; font-weight: 500; }
[data-theme="dark"] .kb-suggest-box  { background: #241f0f; border-color: #4a3c10; }
[data-theme="dark"] .kb-suggest-title { color: #fbd49c; }

.kb-article-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.kb-article-card {
  display: block; padding: 1.1rem 1.25rem; text-decoration: none; color: inherit;
  transition: transform .15s ease, box-shadow .15s ease;
}
.kb-article-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); text-decoration: none; }
.kb-article-card h3 { font-size: 14px; font-weight: 600; margin-bottom: 4px; color: var(--blue-700, var(--blue-600)); }
.kb-article-card p { font-size: 13px; color: var(--gray-500); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── History list ────────────────────────────────────────── */
.history-list { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.history-list li { display: flex; gap: 12px; font-size: 13px; }
.history-dot {
  width: 8px; height: 8px;
  background: var(--blue-600);
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 5px;
  box-shadow: 0 0 0 3px rgba(var(--blue-600-rgb),.15);
}
.history-date { color: var(--gray-400); font-size: 12px; margin-top: 2px; font-family: var(--font-mono); }
.history-note { margin-top: 4px; color: var(--gray-500); background: var(--gray-50); padding: 6px 10px; border-radius: 5px; border: 1px solid var(--gray-100); }

/* ── Stats row ───────────────────────────────────────────── */
.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 1.5rem; }
@media (max-width: 600px) { .stats-row { grid-template-columns: 1fr 1fr; } }
.stat-card {
  background: #fff;
  border: 1px solid #dde3ef;
  border-radius: var(--radius-md);
  padding: 1.1rem 1.25rem;
  box-shadow: var(--shadow-sm);
  animation: fadeUp .35s ease both;
  transition: box-shadow var(--t-base), transform var(--t-base);
}
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.stat-card:nth-child(2) { animation-delay: .05s; }
.stat-card:nth-child(3) { animation-delay: .1s; }
.stat-card:nth-child(4) { animation-delay: .15s; }
.stat-card-alert { border-color: #f7c1c1; background: linear-gradient(135deg, #fff8f8, #fff); }
.stat-label { font-size: 10px; font-weight: 600; color: var(--gray-400); text-transform: uppercase; letter-spacing: .1em; margin-bottom: 8px; font-family: var(--font-mono); }
.stat-value { font-size: 28px; font-weight: 600; color: #0d1b2e; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1; }
.stat-value-alert { color: #a32d2d; }

/* ── Filters form ────────────────────────────────────────── */
.filters-form { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 1rem; align-items: center; }
.filters-form input, .filters-form select {
  height: 34px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 0 10px;
  font-size: 13px;
  font-family: var(--font-body);
  background: #fff;
  color: #1a2332;
  outline: none;
  transition: border-color var(--t-base), box-shadow var(--t-base);
}
.filters-form input:focus, .filters-form select:focus {
  border-color: var(--blue-600);
  box-shadow: 0 0 0 3px rgba(var(--blue-600-rgb),.12);
}

/* ── Table ───────────────────────────────────────────────── */
.table, .data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.table th, .data-table th {
  text-align: left;
  padding: 10px 14px;
  font-size: 10px;
  font-weight: 600;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: .09em;
  border-bottom: 1px solid var(--gray-200);
  background: #f8fafc;
  font-family: var(--font-mono);
}
.table td, .data-table td {
  padding: 11px 14px;
  border-bottom: 1px solid #f0f3f9;
  vertical-align: middle;
  color: #2a3448;
}
.table tr:last-child td, .data-table tr:last-child td { border-bottom: none; }
.table tr:hover td, .data-table tr:hover td { background: #f6f9fe; }
.row-urgent td { background: #fff8f8; }
.row-urgent:hover td { background: #fff0f0; }
.ref-col  { width: 90px; }
.date-col { color: var(--gray-400); white-space: nowrap; font-family: var(--font-mono); font-size: 12px; }
.link-action { font-size: 13px; color: var(--blue-600); white-space: nowrap; font-weight: 500; }

/* ── Forms ───────────────────────────────────────────────── */
.field { margin-bottom: 1.1rem; }
.field label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--gray-500);
  margin-bottom: 5px;
  letter-spacing: .06em;
  text-transform: uppercase;
  font-family: var(--font-mono);
}
.field small { font-weight: 400; color: var(--gray-400); font-size: 11px; text-transform: none; letter-spacing: 0; font-family: var(--font-body); }
.field input, .field select, .field textarea {
  width: 100%;
  height: 40px;
  border: 1.5px solid var(--gray-200);
  border-radius: 8px;
  padding: 0 13px;
  font-size: 14px;
  font-family: var(--font-body);
  color: #1a2332;
  background: #fff;
  outline: none;
  transition: border-color var(--t-base), box-shadow var(--t-base);
}
.field textarea { height: auto; padding: 10px 13px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--blue-600);
  box-shadow: 0 0 0 3px rgba(var(--blue-600-rgb),.12), 0 1px 3px rgba(0,0,0,.05);
}
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 500px) { .form-row-2 { grid-template-columns: 1fr; } }
.req { color: #e24b4a; }

/* Priority selector */
.priority-group { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.priority-opt {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1.5px solid var(--gray-200);
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  transition: all var(--t-base);
}
.priority-opt:hover { border-color: var(--gray-300); background: var(--gray-50); }
.priority-opt:has(input:checked).priority-low    { border-color: #639922; background: #eaf3de; color: #27500a; box-shadow: 0 0 0 2px rgba(99,153,34,.15); }
.priority-opt:has(input:checked).priority-medium { border-color: #ef9f27; background: #faeeda; color: #633806; box-shadow: 0 0 0 2px rgba(239,159,39,.15); }
.priority-opt:has(input:checked).priority-high   { border-color: #e24b4a; background: #fcebeb; color: #791f1f; box-shadow: 0 0 0 2px rgba(226,75,74,.15); }
.priority-opt input[type=radio] { width: 13px; height: 13px; accent-color: var(--blue-600); flex-shrink: 0; margin: 0; }

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  padding: 0 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: all var(--t-base);
  text-decoration: none;
  white-space: nowrap;
  font-family: var(--font-body);
}
.btn-primary {
  background: linear-gradient(135deg, var(--blue-450) 0%, var(--blue-600) 100%);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(var(--blue-600-rgb),.25), 0 1px 3px rgba(0,0,0,.1);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #1a62b0 0%, #134d8b 100%);
  box-shadow: var(--shadow-blue);
  transform: translateY(-1px);
  text-decoration: none;
  color: #fff;
}
.btn-primary:active { transform: translateY(0); box-shadow: 0 1px 4px rgba(var(--blue-600-rgb),.2); }
.btn-secondary { background: #fff; color: var(--blue-600); border-color: var(--blue-wash-5); }
.btn-secondary:hover { background: var(--blue-50); text-decoration: none; border-color: var(--blue-600); }
.btn-ghost { background: transparent; color: var(--gray-500); border-color: var(--gray-200); }
.btn-ghost:hover { background: var(--gray-50); color: #1a2332; text-decoration: none; border-color: var(--gray-300); }
.btn-sm { height: 32px; padding: 0 13px; font-size: 12px; border-radius: 6px; }

/* Colored buttons */
.btn-teacher { background: linear-gradient(135deg, #8f6ec0, #7B5EA7); color: #fff; border-color: transparent; box-shadow: 0 2px 8px rgba(123,94,167,.25); }
.btn-teacher:hover { background: linear-gradient(135deg, #7d5faf, #6a4e94); box-shadow: 0 4px 12px rgba(123,94,167,.35); transform: translateY(-1px); text-decoration: none; color: #fff; }
.btn-student { background: linear-gradient(135deg, #22a06b, #1A8A5A); color: #fff; border-color: transparent; box-shadow: 0 2px 8px rgba(26,138,90,.25); }
.btn-student:hover { background: linear-gradient(135deg, #1a9060, #147a4e); box-shadow: 0 4px 12px rgba(26,138,90,.35); transform: translateY(-1px); text-decoration: none; color: #fff; }

/* ── Badges ──────────────────────────────────────────────── */
.badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; white-space: nowrap; letter-spacing: .03em; }
.badge-open     { background: #fef0dd; color: #7a4506; border: 1px solid #fbd49c; }
.badge-progress { background: #e0eefc; color: #0d4480; border: 1px solid #aad1f7; }
.badge-resolved { background: #e4f4e0; color: #1e5c14; border: 1px solid #9fcf92; }
.badge-closed   { background: #f0efea; color: #4a4840; border: 1px solid #d5d2c8; }
.badge-high     { background: #fdeaea; color: #7a1f1f; border: 1px solid #f5a5a5; }
.badge-medium   { background: #fef0dd; color: #7a4506; border: 1px solid #fbd49c; }
.badge-low      { background: #e4f4e0; color: #1e5c14; border: 1px solid #9fcf92; }
.badge-cat      { background: #eeeeff; color: #3c3489; border: 1px solid #c4c0f2; }
.badge-admin    { background: var(--blue-600); color: var(--blue-100); }
.badge-merged   { background: #f0efea; color: #6b6656; border: 1px solid #d5d2c8; }

.ref-badge {
  font-family: var(--font-mono);
  font-size: 12px;
  background: #eef1f8;
  color: #3a4a63;
  padding: 2px 8px;
  border-radius: 5px;
  font-weight: 600;
  border: 1px solid #dde3ef;
  letter-spacing: .02em;
}

/* Status badges (used in admin tables) */
.status-badge { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 20px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.status-open     { background: #fef0dd; color: #7a4506; border: 1px solid #fbd49c; }
.status-in-progress { background: #e0eefc; color: #0d4480; border: 1px solid #aad1f7; }
.status-closed   { background: #f0efea; color: #4a4840; border: 1px solid #d5d2c8; }

/* ── Alerts ──────────────────────────────────────────────── */
.alert { padding: 12px 16px; border-radius: 8px; font-size: 14px; margin-bottom: 1.25rem; line-height: 1.5; }
.alert-success { background: linear-gradient(135deg, #e8f5e0, #eef7e6); border: 1px solid #90cc74; color: #215010; }
.alert-error   { background: linear-gradient(135deg, #fceaea, #fdf2f2); border: 1px solid #f09595; color: #7a1f1f; }

/* ── Draft auto-save ─────────────────────────────────────── */
.draft-restore {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
  padding: 12px 16px; margin-bottom: 1.25rem;
  background: var(--blue-50); border: 1px solid var(--blue-100);
  border-radius: 8px;
}
.draft-restore-txt { display: flex; flex-direction: column; gap: 2px; }
.draft-restore-txt strong { color: var(--blue-800); font-size: 14px; }
.draft-restore-txt span   { color: var(--gray-500); font-size: 13px; }
.draft-restore-actions { display: flex; gap: .5rem; flex-shrink: 0; }

.draft-saved-tag {
  position: fixed; right: 18px; bottom: 18px; z-index: 60;
  background: var(--gray-900); color: #fff;
  font-size: 12px; font-weight: 500;
  padding: 7px 13px; border-radius: 999px;
  box-shadow: var(--shadow-md);
  opacity: 0; transform: translateY(6px); pointer-events: none;
  transition: opacity var(--t-base), transform var(--t-base);
}
.draft-saved-tag.show { opacity: .92; transform: translateY(0); }

/* ── Photo upload ────────────────────────────────────────── */
.upload-area {
  border: 2px dashed var(--gray-200);
  border-radius: 10px;
  background: var(--gray-50);
  transition: border-color var(--t-base), background var(--t-base);
  cursor: pointer;
  overflow: hidden;
}
.upload-area:hover { border-color: var(--blue-600); background: var(--blue-wash-1); }
#upload-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 2rem 1rem;
  text-align: center;
  color: var(--gray-300);
  font-size: 14px;
  cursor: pointer;
}
#upload-placeholder p { margin: 0; color: var(--gray-400); }
.upload-hint { font-size: 12px !important; color: var(--gray-300) !important; }
#upload-preview {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
}
#upload-preview img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--gray-200);
  flex-shrink: 0;
}
.preview-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--gray-500);
  word-break: break-all;
}
.remove-photo-btn {
  background: none;
  border: 1px solid #f09595;
  color: #a32d2d;
  border-radius: 5px;
  padding: 3px 10px;
  font-size: 12px;
  cursor: pointer;
  align-self: flex-start;
  transition: background var(--t-base);
  font-family: var(--font-body);
}
.remove-photo-btn:hover { background: #fceaea; }

/* ── Incident photo (admin view) ─────────────────────────── */
.photo-container { margin-top: 6px; }
.incident-photo {
  max-width: 100%;
  max-height: 360px;
  border-radius: 10px;
  border: 1px solid var(--gray-200);
  display: block;
  cursor: zoom-in;
  transition: opacity var(--t-base);
}
.incident-photo:hover { opacity: .88; }
.muted { color: var(--gray-400); font-size: 13px; }
.empty-state { text-align: center; padding: 3rem 1rem; color: var(--gray-300); }
.empty-state .btn { margin-top: 1rem; }

/* ── Report type chooser ─────────────────────────────────── */
.report-type-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
@media (max-width: 780px) { .report-type-grid { grid-template-columns: 1fr; } }

.report-type-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: #fff;
  border: 1.5px solid #dde3ef;
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-decoration: none;
  color: inherit;
  transition: box-shadow var(--t-slow), border-color var(--t-base), transform var(--t-spring);
  position: relative;
  box-shadow: var(--shadow-sm);
  animation: fadeUp .35s ease both;
}
.report-type-card:nth-child(2) { animation-delay: .07s; }
.report-type-card:nth-child(3) { animation-delay: .14s; }
.report-type-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
  text-decoration: none;
}
.report-type-general:hover { border-color: #93c0ea; }
.report-type-teacher:hover { border-color: #c5aae8; }
.report-type-student:hover { border-color: #85cba8; }

.rtc-icon {
  width: 52px; height: 52px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
}
.report-type-general .rtc-icon { background: linear-gradient(135deg, var(--blue-wash-3), var(--blue-wash-4)); color: var(--blue-600); }
.report-type-teacher .rtc-icon { background: linear-gradient(135deg, #f0ebf8, #e6ddf5); color: #7B5EA7; }
.report-type-student .rtc-icon { background: linear-gradient(135deg, #e8f5ee, #d8efea); color: #1A8A5A; }

.rtc-badge {
  position: absolute;
  top: 1rem; right: 1rem;
  font-size: 10px; font-weight: 700;
  padding: 3px 9px; border-radius: 20px;
  background: #f0ebf8; color: #7B5EA7;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.rtc-badge-student { background: #e8f5ee; color: #1A8A5A; }

.rtc-body h2 { font-size: 17px; font-weight: 600; margin-bottom: 6px; color: #0d1b2e; letter-spacing: -.02em; }
.rtc-body p  { font-size: 13px; color: var(--gray-500); line-height: 1.6; margin-bottom: .75rem; }
.rtc-examples {
  list-style: none;
  display: flex; flex-direction: column; gap: 4px;
}
.rtc-examples li {
  font-size: 12px; color: var(--gray-400);
  padding-left: 14px; position: relative;
}
.rtc-examples li::before { content: '›'; position: absolute; left: 0; color: var(--gray-300); }
.rtc-action { margin-top: auto; }

/* ── Type pills ──────────────────────────────────────────── */
.type-pill {
  display: inline-flex; align-items: center;
  padding: 3px 9px; border-radius: 20px;
  font-size: 10px; font-weight: 700;
  white-space: nowrap; margin-right: 4px;
  vertical-align: middle;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.type-pill-general  { background: var(--blue-50);  color: var(--blue-800);  border: 1px solid var(--blue-100); }
.type-pill-teacher  { background: #f0ebf8; color: #5e4180; border: 1px solid #d9c8f0; }
.type-pill-student  { background: #e8f5ee; color: #136040; border: 1px solid #b3dfc8; }

/* ── Asset tag ───────────────────────────────────────────── */
.asset-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  background: #eef1f8;
  color: #4a5a78;
  padding: 2px 7px;
  border-radius: 4px;
  margin-left: 6px;
  vertical-align: middle;
  border: 1px solid #dde3ef;
  letter-spacing: .03em;
}

/* ── Form section label ──────────────────────────────────── */
.form-section-label {
  font-size: 10px; font-weight: 600;
  color: var(--gray-300); text-transform: uppercase;
  letter-spacing: .1em;
  padding-bottom: 8px;
  border-bottom: 1px solid #edf0f7;
  margin-bottom: 1rem; margin-top: .25rem;
  font-family: var(--font-mono);
}
.form-card .form-section-label + * { margin-top: 0; }
.form-section-label:not(:first-child) { margin-top: 1.5rem; }

/* ── Laptop category grid ────────────────────────────────── */
.category-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 560px) { .category-grid { grid-template-columns: 1fr; } }

.cat-group { display: flex; flex-direction: column; gap: 6px; }
.cat-group-label {
  display: flex; align-items: center; gap: 6px;
  font-size: 10px; font-weight: 600;
  color: var(--gray-400); text-transform: uppercase;
  letter-spacing: .08em; margin-bottom: 3px;
  font-family: var(--font-mono);
}
.cat-opt {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px;
  border: 1.5px solid var(--gray-200); border-radius: 8px;
  font-size: 13px; cursor: pointer;
  transition: border-color var(--t-base), background var(--t-base), box-shadow var(--t-base);
}
.cat-opt:hover { border-color: var(--gray-300); background: var(--gray-50); }
.cat-opt:has(input:checked).cat-opt-hw { border-color: #E24B4A; background: linear-gradient(135deg, #fff5f5, #fdf0f0); color: #791f1f; box-shadow: 0 0 0 2px rgba(226,75,74,.1); }
.cat-opt:has(input:checked).cat-opt-sw { border-color: var(--blue-600); background: linear-gradient(135deg, var(--blue-wash-2), var(--blue-wash-3)); color: var(--blue-800); box-shadow: 0 0 0 2px rgba(var(--blue-600-rgb),.1); }
.cat-opt input[type=radio] { width: 13px; height: 13px; accent-color: var(--blue-600); flex-shrink: 0; margin: 0; }
.cat-icon { font-size: 16px; line-height: 1; flex-shrink: 0; }

/* ── Back link ───────────────────────────────────────────── */
.back-link {
  display: inline-block;
  font-size: 13px; color: var(--gray-400);
  margin-bottom: 6px;
  text-decoration: none;
}
.back-link:hover { color: var(--blue-600); }

/* ── Stats row 6-col ─────────────────────────────────────── */
.stats-row-6 { grid-template-columns: repeat(6, 1fr); }
@media (max-width: 900px) { .stats-row-6 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 500px) { .stats-row-6 { grid-template-columns: repeat(2, 1fr); } }
.stat-card-teacher { border-color: #d9c8f0; background: linear-gradient(135deg, #faf7fe, #fff); }
.stat-card-student { border-color: #b3dfc8; background: linear-gradient(135deg, #f4faf7, #fff); }

/* ── Search page ─────────────────────────────────────────── */
.search-form { margin-bottom: 1.5rem; }
.search-input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 6px 6px 6px 16px;
  transition: border-color var(--t-base), box-shadow var(--t-base);
  box-shadow: var(--shadow-sm);
}
.search-input-wrap:focus-within {
  border-color: var(--blue-600);
  box-shadow: 0 0 0 3px rgba(var(--blue-600-rgb),.12), var(--shadow-sm);
}
.search-icon { color: var(--gray-300); flex-shrink: 0; }
.search-input-wrap input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 15px;
  color: #1a2332;
  background: transparent;
  font-family: var(--font-body);
}
.search-tips {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-size: 12px;
  color: var(--gray-400);
  flex-wrap: wrap;
}
.search-tip-pill {
  background: rgba(255,255,255,.8);
  border: 1px solid var(--gray-200);
  border-radius: 20px;
  padding: 3px 10px;
  color: var(--gray-500);
  font-size: 12px;
}
.search-empty-state {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--gray-300);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .75rem;
}
.search-empty-state p { font-size: 15px; color: var(--gray-400); }
.search-results-header { font-size: 13px; color: var(--gray-400); margin-bottom: .75rem; }
.request-preview { max-width: 220px; }
.request-text { font-size: 12px; color: var(--gray-500); }

/* ── Admin my-queue ──────────────────────────────────────── */
.queue-section-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--blue-600);
  margin-bottom: .6rem;
  padding-left: 2px;
}
.queue-section-done { color: #27500a; margin-top: 1.5rem; }

/* ── My queue banner (admin dashboard) ───────────────────── */
.my-queue-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, var(--blue-wash-3), var(--blue-wash-2));
  border: 1px solid #aad1f7;
  border-radius: var(--radius-md);
  padding: 13px 18px;
  font-size: 14px;
  color: var(--blue-800);
  margin-bottom: 1.25rem;
  text-decoration: none;
  transition: background var(--t-base), box-shadow var(--t-base);
  box-shadow: var(--shadow-sm);
}
.my-queue-banner:hover {
  background: linear-gradient(135deg, #d6e9f7, #e4f2ff);
  box-shadow: var(--shadow-md);
  text-decoration: none;
}
.my-queue-banner-link {
  margin-left: auto;
  font-size: 13px;
  font-weight: 600;
  color: var(--blue-600);
}

/* ── Pagination ──────────────────────────────────────────── */
.pagination-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--gray-100);
  flex-wrap: wrap;
  gap: .75rem;
}
.pagination-info { font-size: 13px; color: var(--gray-400); font-family: var(--font-mono); }
.pagination-controls { display: flex; align-items: center; gap: 4px; }
.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 6px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-700);
  background: var(--white);
  border: 1px solid var(--gray-200);
  cursor: pointer;
  text-decoration: none;
  transition: all var(--t-base);
  font-family: var(--font-body);
}
.page-btn:hover {
  background: var(--blue-50);
  border-color: var(--blue-100);
  color: var(--blue-600);
  text-decoration: none;
}
.page-btn-active {
  background: var(--blue-600);
  border-color: var(--blue-600);
  color: var(--white);
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(var(--blue-600-rgb),.25);
}
.page-btn-active:hover { background: var(--blue-700); border-color: var(--blue-700); color: var(--white); }
.page-btn-disabled { color: var(--gray-300); cursor: not-allowed; border-color: var(--gray-100); }
.page-btn-disabled:hover { background: var(--white); border-color: var(--gray-100); color: var(--gray-300); }
.page-ellipsis { font-size: 13px; color: var(--gray-300); padding: 0 4px; }

/* ── Notice banners ──────────────────────────────────────── */
.notice-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 1.5rem;
  font-size: 13px;
  border-bottom: 1px solid transparent;
}
.notice-info     { background: #dbeafe; color: #1e3a8a; border-color: #bfdbfe; }
.notice-warning  { background: #fef9c3; color: #713f12; border-color: #fde68a; }
.notice-critical { background: #fee2e2; color: #7f1d1d; border-color: #fca5a5; }
.notice-icon     { font-size: 15px; flex-shrink: 0; }
.notice-body     { flex: 1; display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; }
.notice-desc     { opacity: .85; }
.notice-until    { flex-shrink: 0; font-size: 12px; opacity: .65; white-space: nowrap; font-family: var(--font-mono); }

/* ── Atom modal ──────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(10,20,40,.55);
  backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center;
  z-index: 500;
  animation: fadeIn .2s ease both;
}
.modal-box {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(15,23,42,.06);
  width: 100%; max-width: 480px;
  margin: 1rem;
  display: flex; flex-direction: column;
  max-height: calc(100vh - 2rem);
  overflow: hidden;
  animation: scaleIn .2s cubic-bezier(.34,1.2,.64,1) both;
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--gray-100);
  background: linear-gradient(135deg, #f8fafc, #fff);
}
.modal-header h2 { margin: 0; font-size: 16px; font-weight: 600; letter-spacing: -.015em; color: #0d1b2e; }
.modal-close {
  background: none; border: none; cursor: pointer;
  font-size: 20px; line-height: 1; padding: 4px;
  color: var(--gray-300);
  border-radius: 5px;
  transition: color var(--t-base), background var(--t-base);
}
.modal-close:hover { color: var(--gray-700); background: var(--gray-100); }
.modal-body  { padding: 1.25rem; overflow-y: auto; flex: 1; }
.modal-footer {
  padding: .875rem 1.25rem;
  border-top: 1px solid var(--gray-100);
  display: flex; gap: .75rem;
  background: #fafbfd;
}
.atom-summary {
  background: linear-gradient(135deg, #f6f9ff, #f8fafc);
  border: 1px solid #dde3ef;
  border-radius: var(--radius-sm);
  padding: .875rem 1rem;
  margin-bottom: 1rem;
  font-size: 13px;
  display: flex; flex-direction: column; gap: .4rem;
}
.atom-label { color: var(--gray-400); display: inline-block; min-width: 80px; font-family: var(--font-mono); font-size: 11px; }

/* ── Bulk action bar ─────────────────────────────────────── */
.bulk-bar {
  position: fixed;
  bottom: 1.75rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  background: #0d1b2e;
  color: #e2e8f0;
  border-radius: var(--radius-md);
  padding: .5rem .5rem .5rem 1.1rem;
  display: flex;
  align-items: center;
  gap: .75rem;
  box-shadow: 0 8px 32px rgba(0,0,0,.35), 0 2px 8px rgba(0,0,0,.2), 0 0 0 1px rgba(255,255,255,.06);
  animation: fadeUp .2s cubic-bezier(.34,1.3,.64,1) both;
  white-space: nowrap;
}
.bulk-count-label { font-size: 13px; font-weight: 500; }
.bulk-count-label strong { color: #fff; }
.bulk-sep {
  width: 1px;
  height: 20px;
  background: rgba(255,255,255,.12);
  flex-shrink: 0;
}
.bulk-select {
  height: 32px;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 6px;
  padding: 0 10px;
  font-size: 13px;
  font-family: var(--font-body);
  background: rgba(255,255,255,.08);
  color: #e2e8f0;
  outline: none;
  cursor: pointer;
  transition: border-color var(--t-base);
}
.bulk-select:focus { border-color: rgba(255,255,255,.4); }
.bulk-select option { background: #1e2d42; color: #e2e8f0; }
.bulk-cancel-btn {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: rgba(255,255,255,.4);
  font-size: 14px;
  cursor: pointer;
  border-radius: 6px;
  transition: background var(--t-base), color var(--t-base);
  flex-shrink: 0;
}
.bulk-cancel-btn:hover { background: rgba(255,255,255,.1); color: #fff; }

/* ── Bulk checkbox column ────────────────────────────────── */
.check-col { width: 40px; padding-left: 1rem !important; }
.bulk-checkbox { width: 15px; height: 15px; cursor: pointer; accent-color: var(--blue-600); }
.table tr:has(.row-check:checked) td { background: var(--blue-wash-1); }
.table tr:has(.row-check:checked):hover td { background: #e8f0fc; }

/* ── Alert info variant ──────────────────────────────────── */
.alert-info { background: var(--blue-50); border: 1px solid var(--blue-100); color: var(--blue-800); }

/* ── Image lightbox ──────────────────────────────────────── */
.lightbox-overlay {
  position: fixed; inset: 0;
  background: rgba(8, 18, 36, .85);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  z-index: 900;
  animation: fadeIn .15s ease both;
  cursor: zoom-out;
  padding: 2rem;
}
.lightbox-overlay img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
  animation: scaleIn .2s cubic-bezier(.34,1.2,.64,1) both;
  cursor: default;
}
.lightbox-close {
  position: absolute; top: 1rem; right: 1rem;
  width: 36px; height: 36px;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18);
  color: #fff; font-size: 18px; line-height: 1;
  border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s ease;
}
.lightbox-close:hover { background: rgba(255,255,255,.25); }

/* ── SLA dots ────────────────────────────────────────────── */
.sla-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
  cursor: help;
}
.sla-ok     { background: #cbd5e1; }
.sla-warn   { background: #ef9f27; box-shadow: 0 0 0 2px rgba(239,159,39,.18); }
.sla-breach { background: #e24b4a; box-shadow: 0 0 0 2px rgba(226,75,74,.22); animation: slaPulse 2s ease-in-out infinite; }
@keyframes slaPulse {
  0%, 100% { box-shadow: 0 0 0 2px rgba(226,75,74,.22); }
  50%      { box-shadow: 0 0 0 5px rgba(226,75,74,.08); }
}

/* ── Dashboard style toggle ──────────────────────────────── */
.dash-toggle {
  display: inline-flex;
  align-items: center;
  background: #edf0f7;
  border: 1px solid #dde3ef;
  border-radius: 20px;
  padding: 3px;
  gap: 2px;
  flex-shrink: 0;
}
.dash-toggle-btn {
  padding: 4px 14px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  background: none;
  color: var(--gray-400);
  font-family: var(--font-body);
  transition: all .2s ease;
  white-space: nowrap;
}
.dash-toggle-btn.active {
  background: #fff;
  color: #0d1b2e;
  box-shadow: 0 1px 4px rgba(15,23,42,.1);
  font-weight: 600;
}

/* ── Avançat: stat cards with sparklines ─────────────────── */
.stat-card-pro {
  background: #fff;
  border: 1px solid #dde3ef;
  border-radius: var(--radius-md);
  padding: 1.1rem 1.25rem;
  box-shadow: var(--shadow-sm);
  animation: fadeUp .35s ease both;
  transition: box-shadow var(--t-base), transform var(--t-base);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.stat-card-pro:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.stat-card-pro:nth-child(2) { animation-delay: .05s; }
.stat-card-pro:nth-child(3) { animation-delay: .10s; }
.stat-card-pro:nth-child(4) { animation-delay: .15s; }
.stat-card-pro:nth-child(5) { animation-delay: .20s; }
.stat-card-pro:nth-child(6) { animation-delay: .25s; }
.stat-card-pro-alert   { border-color: #f7c1c1; background: linear-gradient(135deg, #fff8f8, #fff); }
.stat-card-pro-teacher { border-color: #d9c8f0; background: linear-gradient(135deg, #faf7fe, #fff); }
.stat-card-pro-student { border-color: #b3dfc8; background: linear-gradient(135deg, #f4faf7, #fff); }
.stat-pro-top    { display: flex; justify-content: space-between; align-items: flex-start; }
.stat-pro-bottom { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; }
.stat-pro-value  { font-size: 28px; font-weight: 600; color: #0d1b2e; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1; }
.stat-pro-value-alert { color: #a32d2d; }
.sparkline { flex-shrink: 0; }

/* ── Avançat: charts row ─────────────────────────────────── */
.charts-row {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 1rem;
  margin-bottom: 1.25rem;
  animation: fadeUp .35s .1s ease both;
}
@media (max-width: 860px) { .charts-row { grid-template-columns: 1fr; } }
.chart-card {
  background: #fff;
  border: 1px solid #dde3ef;
  border-radius: var(--radius-md);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
}
.chart-title {
  font-size: 10px;
  font-weight: 600;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: .09em;
  margin-bottom: 1rem;
  font-family: var(--font-mono);
}
.bar-chart-wrap { display: flex; align-items: flex-end; gap: 6px; height: 90px; }
.bar-col  { display: flex; flex-direction: column; align-items: center; flex: 1; }
.bar-group { display: flex; gap: 2px; align-items: flex-end; }
.bar { border-radius: 3px 3px 0 0; transition: opacity .15s; cursor: default; }
.bar:hover { opacity: .75; }
.bar-label { font-size: 10px; color: var(--gray-400); text-align: center; margin-top: 5px; font-family: var(--font-mono); }
.chart-legend { display: flex; gap: 12px; margin-top: 10px; }
.legend-dot  { width: 8px; height: 8px; border-radius: 2px; flex-shrink: 0; }
.legend-item { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--gray-500); }
.donut-wrap  { display: flex; align-items: center; gap: 1.25rem; }
.donut-legend { display: flex; flex-direction: column; gap: 8px; flex: 1; }
.donut-legend-item { display: flex; align-items: center; justify-content: space-between; font-size: 12px; }
.donut-legend-left { display: flex; align-items: center; gap: 7px; color: var(--gray-500); }
.donut-legend-val  { font-weight: 600; color: #0d1b2e; font-family: var(--font-mono); }

/* ── Tags / labels ───────────────────────────────────────── */
.tag-row { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; }
.tag-chip {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 500; line-height: 1;
  padding: 3px 8px; border-radius: 20px;
  background: var(--blue-50); color: var(--blue-800);
  border: 1px solid var(--blue-100); text-decoration: none;
  font-family: var(--font-mono);
}
a.tag-chip:hover { background: var(--blue-100); text-decoration: none; }
.tag-chip-removable { padding-right: 4px; }
.tag-remove {
  background: none; border: none; cursor: pointer;
  color: var(--blue-800); opacity: .55; font-size: 14px; line-height: 1;
  padding: 0 2px; border-radius: 50%;
}
.tag-remove:hover { opacity: 1; color: #c0392b; }
.tag-add-form { display: flex; gap: 6px; }
.tag-add-form input {
  flex: 1; height: 32px; border: 1.5px solid var(--gray-200); border-radius: 6px;
  padding: 0 10px; font-size: 13px; font-family: var(--font-body);
  background: #fff; color: #1a2332;
}
.tag-add-form input:focus { outline: none; border-color: var(--blue-600); box-shadow: 0 0 0 3px rgba(var(--blue-600-rgb),.12); }

/* ── Weekday picker (recurring notices) ──────────────────── */
.weekday-row { display: flex; flex-wrap: wrap; gap: 6px; }
.weekday-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 10px; border: 1.5px solid var(--gray-200); border-radius: 8px;
  font-size: 13px; cursor: pointer; user-select: none;
}
.weekday-chip input { width: 13px; height: 13px; accent-color: var(--blue-600); margin: 0; }
.weekday-chip:has(input:checked) { border-color: var(--blue-600); background: var(--blue-50); color: var(--blue-800); }

/* Recurrence badge in the notices list */
.recur-badge {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 10px; font-weight: 600; font-family: var(--font-mono);
  padding: 2px 7px; border-radius: 20px;
  background: var(--blue-50); color: var(--blue-800); border: 1px solid var(--blue-100);
  letter-spacing: .03em;
}

/* ── Theme toggle (topbar) ───────────────────────────────── */
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 7px; flex-shrink: 0;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18);
  color: #fff; cursor: pointer; transition: background var(--t-base);
}
.theme-toggle:hover { background: rgba(255,255,255,.2); }
.theme-toggle .theme-icon-sun  { display: none; }
.theme-toggle .theme-icon-moon { display: block; }
[data-theme="dark"] .theme-toggle .theme-icon-sun  { display: block; }
[data-theme="dark"] .theme-toggle .theme-icon-moon { display: none; }

/* ════════════════════════════════════════════════════════════
   DARK MODE — toggled via <html data-theme="dark">
   Tokens are remapped where safe; literal light surfaces are
   overridden explicitly for the main screens.
   ════════════════════════════════════════════════════════════ */
[data-theme="dark"] {
  --white:    #18222f;
  --gray-50:  #1c2735;
  --gray-100: #1f2b3b;
  --gray-200: #2c3a4e;
  --gray-300: #3b4b61;
  --gray-400: #93a1b3;
  --gray-500: #aab7c8;
  --gray-700: #d4dce8;
  --blue-50:  #15273c;
  --blue-100: #21405f;
  --blue-600: #4a9eeb;
  --blue-700: #67b0f1;
  --blue-800: #cfe3ff;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.3), 0 1px 4px rgba(0,0,0,.25);
  --shadow-md: 0 2px 8px rgba(0,0,0,.35), 0 4px 16px rgba(0,0,0,.3);
  color-scheme: dark;
}
[data-theme="dark"] body {
  color: #dde5f0;
  background-color: #0e1622;
  background-image: radial-gradient(circle, #1b2840 1px, transparent 1px);
}
/* Surfaces */
[data-theme="dark"] .card,
[data-theme="dark"] .sidebar,
[data-theme="dark"] .stat-card,
[data-theme="dark"] .stat-card-pro,
[data-theme="dark"] .chart-card,
[data-theme="dark"] .modal-box,
[data-theme="dark"] .upload-area,
[data-theme="dark"] .table { background: #18222f; border-color: #2c3a4e; color: #dde5f0; }
/* Form fields */
[data-theme="dark"] .field input,
[data-theme="dark"] .field select,
[data-theme="dark"] .field textarea,
[data-theme="dark"] .filters-form input,
[data-theme="dark"] .filters-form select,
[data-theme="dark"] .tag-add-form input,
[data-theme="dark"] .search-input { background: #131c28; border-color: #2c3a4e; color: #dde5f0; }
[data-theme="dark"] .field input::placeholder,
[data-theme="dark"] .field textarea::placeholder,
[data-theme="dark"] .filters-form input::placeholder { color: #67768a; }
/* Headings / near-black text */
[data-theme="dark"] .page-header h1,
[data-theme="dark"] .stat-value,
[data-theme="dark"] .stat-pro-value,
[data-theme="dark"] .donut-legend-val,
[data-theme="dark"] .detail-card h2,
[data-theme="dark"] .detail-card h3,
[data-theme="dark"] .modal-header h2,
[data-theme="dark"] .detail-list dd { color: #eef2f8; }
/* Tables */
[data-theme="dark"] .table th { background: #131c28; color: #aab7c8; border-color: #2c3a4e; }
[data-theme="dark"] .table td { border-color: #243143; color: #cdd6e3; }
[data-theme="dark"] .table tr:hover td { background: #1d2a3b; }
[data-theme="dark"] .ref-badge  { background:#1f2b3b; color:#cfe3ff; border-color:#2c3a4e; }
[data-theme="dark"] .asset-tag  { background:#131c28; color:#aab7c8; border-color:#2c3a4e; }
[data-theme="dark"] .badge-cat  { background:#241f3b; color:#c5bdf0; border-color:#3a3470; }
[data-theme="dark"] .row-urgent td { background: #2a1c20; }
[data-theme="dark"] .row-urgent:hover td { background: #341f24; }
[data-theme="dark"] .table tr:has(.row-check:checked) td { background: #16314e; }
/* Sidebar */
[data-theme="dark"] .sidebar { border-right-color: #243143; }
[data-theme="dark"] .sidebar-link { color: #b9c4d2; }
[data-theme="dark"] .sidebar-link:hover { background: linear-gradient(90deg,#172838,#141f2d); color: #6cb0f0; }
[data-theme="dark"] .sidebar-link.active { background: linear-gradient(90deg,#152a42,#13233a); color: #6cb0f0; border-left-color: #4a9eeb; }
[data-theme="dark"] .sidebar-section + .sidebar-section { border-top-color: #233040; }
/* Footer */
[data-theme="dark"] .footer { background: rgba(16,24,36,.75); border-top-color: #243143; }
/* Focus rings */
[data-theme="dark"] .field input:focus,
[data-theme="dark"] .field select:focus,
[data-theme="dark"] .field textarea:focus { border-color:#4a9eeb; box-shadow: 0 0 0 3px rgba(74,158,235,.22); }
/* Buttons */
[data-theme="dark"] .btn-ghost { color:#aab7c8; border-color:#2c3a4e; }
[data-theme="dark"] .btn-ghost:hover { background:#1f2b3b; color:#eef2f8; border-color:#3b4b61; }
[data-theme="dark"] .btn-secondary { background:#18222f; color:#6cb0f0; border-color:#2f4a6b; }
[data-theme="dark"] .btn-secondary:hover { background:#15273c; }
/* Boxes / comments */
[data-theme="dark"] .description-box { background:#131c28; border-color:#243143; color:#cdd6e3; }
[data-theme="dark"] .comment-reporter { background:#131c28; }
[data-theme="dark"] .comment-admin    { background:#152233; }
[data-theme="dark"] .priority-opt,
[data-theme="dark"] .cat-opt { background:#131c28; border-color:#2c3a4e; color:#cdd6e3; }
/* Tag chips (dark) */
[data-theme="dark"] .tag-chip { background:#15273c; color:#cfe3ff; border-color:#21405f; }
[data-theme="dark"] a.tag-chip:hover { background:#1d3550; }
[data-theme="dark"] .tag-remove { color:#cfe3ff; }
/* Draft restore banner (dark) */
[data-theme="dark"] .draft-restore { background:#15273c; border-color:#21405f; }
[data-theme="dark"] .draft-restore-txt strong { color:#cfe3ff; }

/* ── Print — clean incident / ticket printout ────────────────
   Strips the app chrome (topbar, sidebar, footer, forms, buttons)
   and prints black-on-white. Add class="no-print" to hide anything
   else. Use browser Print (Ctrl/Cmd+P) or "Save as PDF".
   ──────────────────────────────────────────────────────────── */
@media print {
  .topbar, .sidebar, .sidebar-toggle, .footer, .notice-banner,
  .filters-form, .bulk-bar, .btn, .back-link, .theme-toggle,
  .comment-form-wrap, .manage-card, .tag-add-form, .tag-remove,
  .my-queue-banner, .no-print { display: none !important; }

  html, body {
    background: #fff !important; background-image: none !important; color: #000 !important;
  }
  .app-shell { display: block !important; }
  .main-content { padding: 0 !important; animation: none !important; }
  .page-wrap, .page-wide { max-width: 100% !important; margin: 0 !important; }
  .detail-layout { display: block !important; }
  .card, .detail-card {
    box-shadow: none !important; border: 1px solid #bbb !important;
    break-inside: avoid; margin-bottom: 12px !important; animation: none !important;
  }
  a { color: #000 !important; text-decoration: none !important; }
  .description-box { background: #fff !important; border: 1px solid #ddd !important; }
  /* Outline coloured pills so they read on a B/W printer */
  .ref-badge, .asset-tag, .tag-chip, .status-badge, .type-pill, .priority-badge {
    background: #fff !important; color: #000 !important; border: 1px solid #999 !important;
  }
  .incident-photo { max-width: 260px !important; height: auto !important; }
}

/* ════════════════════════════════════════════════════════════
   Admin UI refresh (October 2026)
   Icons, the compact incident table (cards on phones), comment
   thread, switches, row menus and the phone topbar.
   ════════════════════════════════════════════════════════════ */

/* ── Icons (config/icons.js) ─────────────────────────────── */
.icon { flex-shrink: 0; vertical-align: -.15em; }
.btn { gap: 6px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.empty-state { color: var(--gray-500); }
.empty-state .icon { color: var(--gray-300); }
.chart-card h3 .icon { color: var(--blue-600); }
.notice-icon { display: inline-flex; }
.nt-warn .icon { flex-shrink: 0; margin-top: 1px; }
.kb-votes { display: inline-flex; align-items: center; gap: 10px; font-size: 12px; color: var(--gray-500); }
.kb-votes span { display: inline-flex; align-items: center; gap: 3px; }
.notice-chip { display: inline-flex; align-items: center; gap: 4px; }
.notice-chip-warning  { background: #fef9c3; color: #854d0e; }
.notice-chip-critical { background: #fee2e2; color: #991b1b; }
.recur-badge { display: inline-flex; align-items: center; gap: 4px; }

/* ── Incident table (partials/incident-table.ejs) ────────── */
/* Horizontal scroll is the last resort, never clipping. */
.table-card { overflow: hidden; overflow-x: auto; }
.inc-table .td-check  { width: 40px; }
.inc-table .td-ref,
.inc-table .td-pri,
.inc-table .td-status,
.inc-table .td-date   { width: 1%; white-space: nowrap; }
.inc-table .td-main   { min-width: 260px; }
.inc-row { cursor: pointer; }
.ref-badge { white-space: nowrap; }
.inc-title {
  font-weight: 600; font-size: 14px; line-height: 1.35;
  color: var(--gray-900); text-decoration: none;
}
.inc-title:hover { color: var(--blue-600); text-decoration: underline; }
.inc-title:focus-visible { outline: 2px solid var(--blue-600); outline-offset: 2px; border-radius: 3px; }
.inc-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px;
  margin-top: 5px; font-size: 12px; color: var(--gray-500);
}
.inc-meta .type-pill { font-size: 10px; padding: 1px 7px; }
.inc-meta-who { display: inline-flex; align-items: center; gap: 4px; }
.inc-table .tag-row { margin-top: 6px; }

@media (max-width: 768px) {
  .inc-table thead { display: none; }
  .inc-table, .inc-table tbody { display: block; }
  .inc-table tr.inc-row {
    display: grid;
    grid-template-columns: auto auto 1fr;
    grid-template-areas: "chk ref date" "chk main main" "chk pri status";
    gap: 8px 10px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--gray-200);
  }
  .inc-table tr.inc-row:not(:has(.td-check)) {
    grid-template-areas: "ref date date" "main main main" "pri status status";
  }
  .inc-table tr.inc-row:last-child { border-bottom: none; }
  .inc-table td, .inc-table tr:hover td, .inc-table .row-urgent td { padding: 0; border: 0; background: none; width: auto; min-width: 0; }
  .inc-table .row-urgent { background: #fff8f8; }
  .inc-table .td-check  { grid-area: chk; align-self: start; padding-top: 2px; }
  .inc-table .td-ref    { grid-area: ref; }
  .inc-table .td-date   { grid-area: date; justify-self: end; }
  .inc-table .td-main   { grid-area: main; }
  .inc-table .td-pri    { grid-area: pri; }
  .inc-table .td-status { grid-area: status; }
  .inc-table .bulk-checkbox { width: 20px; height: 20px; }
}

/* ── Filters: folded behind a button on phones ───────────── */
.filters-toggle { display: none; }
.filters-count {
  display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 99px; background: var(--blue-600); color: #fff; font-size: 11px; font-weight: 700;
}
@media (max-width: 768px) {
  .filters-toggle { display: inline-flex; margin-bottom: .75rem; }
  .filters-form { display: none; }
  .filters-form.open { display: flex; }
  .filters-form input, .filters-form select { flex: 1 1 100%; height: 42px; font-size: 16px; }
}

/* ── Topbar on phones ────────────────────────────────────── */
@media (max-width: 768px) {
  .topbar-divider, .topbar-sub, .user-name, .role-chip { display: none; }
  .topbar-brand { min-width: 0; }
  .topbar-school { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .user-chip { gap: 6px; }
  .logout-link { white-space: nowrap; }
}

/* ── Comment thread (partials/comment-thread.ejs) ────────── */
.comments-title { display: flex; align-items: center; gap: 8px; }
.comments-title .icon { color: var(--blue-600); }
.count-chip {
  font-size: 12px; font-weight: 600; line-height: 1.6; padding: 0 8px;
  border-radius: 99px; background: var(--gray-100); color: var(--gray-500);
}
.comment-thread { list-style: none; margin: 0 0 1.5rem; padding: 0; display: grid; gap: 16px; }
.comment { display: grid; grid-template-columns: 32px 1fr; gap: 10px; align-items: start; }
.comment-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center;
  font: 600 11px/1 var(--font-mono); letter-spacing: .02em;
}
.comment-avatar-admin    { background: var(--blue-600); color: #fff; }
.comment-avatar-reporter { background: var(--gray-200); color: var(--gray-700); }
.comment-main { min-width: 0; }
.comment-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-bottom: 5px; font-size: 13px; }
.comment-author { color: var(--gray-900); font-weight: 600; }
.comment-date { margin-left: auto; font-size: 12px; color: var(--gray-400); font-family: var(--font-mono); }
.comment-body {
  padding: 10px 14px; border-radius: 4px 12px 12px 12px;
  background: var(--gray-50); border: 1px solid var(--gray-200);
  font-size: 14px; line-height: 1.55; color: #243044;
  white-space: pre-wrap; overflow-wrap: anywhere;
}
.comment-admin .comment-body    { background: var(--blue-wash-1); border-color: var(--blue-wash-4); }
.comment-internal .comment-body { background: #fff8e1; border: 1px dashed #e8c35a; }
.chip {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 10.5px; font-weight: 600; line-height: 1.7; padding: 0 7px; border-radius: 99px;
}
.chip-staff    { background: var(--blue-50); color: var(--blue-700); }
.chip-internal { background: #fff0c2; color: #6b4e00; }

.comment-form-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
#comment-form textarea { transition: background var(--t-base), border-color var(--t-base); }
#comment-form.is-internal textarea { background: #fffbeb; border-color: #e8c35a; }

/* ── Switch (checkbox) ───────────────────────────────────── */
.switch-toggle { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 13px; color: var(--gray-700); }
.switch-toggle small { display: block; font-size: 12px; color: var(--gray-400); }
.switch-toggle input {
  appearance: none; -webkit-appearance: none; margin: 0; flex-shrink: 0;
  width: 38px; height: 22px; border-radius: 99px; background: var(--gray-300);
  position: relative; cursor: pointer; transition: background var(--t-base);
}
.switch-toggle input::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px;
  border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3);
  transition: transform var(--t-base);
}
.switch-toggle input:checked { background: var(--blue-600); }
.switch-toggle input:checked::after { transform: translateX(16px); }
.switch-internal input:checked { background: #c99a06; }
.switch-toggle input:focus-visible { outline: 2px solid var(--blue-600); outline-offset: 2px; }
.switch-toggle > span { display: inline-flex; flex-direction: column; }
.switch-toggle > span:has(> .icon) { flex-direction: row; align-items: center; gap: 6px; }

/* ── Row action menu (users) ─────────────────────────────── */
.table-card.menu-host { overflow: visible; }
.menu-host .table thead th:first-child { border-top-left-radius: var(--radius-md); }
.menu-host .table thead th:last-child  { border-top-right-radius: var(--radius-md); }
.td-actions { width: 1%; text-align: right; }
.row-menu { position: relative; display: inline-block; }
.row-menu > summary { list-style: none; cursor: pointer; }
.row-menu > summary::-webkit-details-marker { display: none; }
.row-menu[open] > summary { background: var(--gray-100); color: var(--gray-900); }
.row-menu-list {
  position: absolute; right: 0; top: calc(100% + 4px); z-index: 30;
  min-width: 250px; padding: 6px; display: grid; gap: 2px;
  background: #fff; border: 1px solid var(--gray-200); border-radius: 10px; box-shadow: var(--shadow-lg);
  text-align: left;
}
.row-menu-list form { margin: 0; }
.row-menu-item {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 9px 10px; border: 0; border-radius: 6px; background: none;
  font: inherit; font-size: 13px; color: var(--gray-700); cursor: pointer; text-align: left;
}
.row-menu-item:hover, .row-menu-item:focus-visible { background: var(--gray-100); outline: none; }
.row-menu-danger { color: #b42318; }
.row-menu-danger:hover, .row-menu-danger:focus-visible { background: #fef3f2; }
.row-inactive td { color: var(--gray-400); }
.username-code { font-family: var(--font-mono); font-size: 12px; background: var(--gray-100); padding: 1px 6px; border-radius: 4px; }

/* ── Dark mode for the above ─────────────────────────────── */
[data-theme="dark"] .inc-title { color: #eef2f8; }
[data-theme="dark"] .inc-title:hover { color: #6cb0f0; }
[data-theme="dark"] .comment,
[data-theme="dark"] .comment-reporter,
[data-theme="dark"] .comment-admin { background: none; }
[data-theme="dark"] .comment-author { color: #eef2f8; }
[data-theme="dark"] .comment-body { background: #131c28; border-color: #243143; color: #cdd6e3; }
[data-theme="dark"] .comment-admin .comment-body { background: #15243a; border-color: #21405f; }
[data-theme="dark"] .comment-internal .comment-body { background: #2a2210; border-color: #6b5717; }
[data-theme="dark"] .comment-avatar-reporter { background: #2c3a4e; color: #dde5f0; }
[data-theme="dark"] .chip-staff { background: #15273c; color: #cfe3ff; }
[data-theme="dark"] .chip-internal { background: #3a2f0c; color: #ffe08a; }
[data-theme="dark"] .count-chip { background: #1f2b3b; color: #aab7c8; }
[data-theme="dark"] #comment-form.is-internal textarea { background: #221c0d; border-color: #6b5717; }
[data-theme="dark"] .switch-toggle { color: #cdd6e3; }
[data-theme="dark"] .row-menu-list { background: #18222f; border-color: #2c3a4e; }
[data-theme="dark"] .row-menu-item { color: #cdd6e3; }
[data-theme="dark"] .row-menu-item:hover, [data-theme="dark"] .row-menu-item:focus-visible { background: #1f2b3b; }
[data-theme="dark"] .row-menu-danger { color: #ff8a80; }
[data-theme="dark"] .row-menu-danger:hover { background: #2a1c20; }
[data-theme="dark"] .username-code { background: #1f2b3b; color: #cdd6e3; }
[data-theme="dark"] .notice-chip-warning  { background: #3a2f0c; color: #ffe08a; }
[data-theme="dark"] .notice-chip-critical { background: #3a1714; color: #ffb4ab; }
/* The blue-wash tokens aren't remapped in dark mode, so the banner kept its
   light background while its text turned light. */
[data-theme="dark"] .my-queue-banner { background: linear-gradient(135deg, #15273c, #132236); border-color: #21405f; color: #cfe3ff; }
[data-theme="dark"] .my-queue-banner:hover { background: linear-gradient(135deg, #1a3150, #16283f); }
@media (max-width: 768px) {
  [data-theme="dark"] .inc-table .row-urgent { background: #2a1c20; }
  [data-theme="dark"] .inc-table tr.inc-row { border-color: #243143; }
}

@media print {
  .filters-toggle, .row-menu, .switch-toggle { display: none !important; }
}
