/* TSTS — RTL-first styles. Uses logical properties so LTR flip is automatic. */
:root {
  --bg: #f4f6fa;
  --panel: #ffffff;
  --border: #e3e8f0;
  --text: #1c2434;
  --muted: #66708a;
  --primary: #1a56db;
  --primary-dark: #1442a8;
  --ok: #27ae60;
  --warn: #f2994a;
  --danger: #eb5757;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(20, 30, 60, .08);
  --font: 'Segoe UI', Tahoma, 'Noto Kufi Arabic', 'Helvetica Neue', Arial, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 14.5px;
  line-height: 1.6;
}
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 14px; }
a { color: var(--primary); text-decoration: none; }

/* ---------- layout ---------- */
#app { min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  background: var(--panel); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 14px;
  padding: 0 18px; height: 56px; position: sticky; top: 0; z-index: 50;
}
.brand { font-weight: 700; font-size: 15px; color: var(--primary-dark); white-space: nowrap; }
.brand small { display: block; font-size: 10.5px; color: var(--muted); font-weight: 400; line-height: 1; }
.topbar .spacer { flex: 1; }
.top-search { max-width: 340px; flex: 1; }
.top-search input {
  width: 100%; padding: 7px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg);
}
.main-wrap { display: flex; flex: 1; min-height: 0; }
.sidebar {
  width: 210px; background: var(--panel); border-inline-end: 1px solid var(--border);
  padding: 14px 10px; flex-shrink: 0;
}
.sidebar a {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 12px; border-radius: 8px; color: var(--text); font-weight: 500; margin-bottom: 3px;
}
.sidebar a.active, .sidebar a:hover { background: #e9effc; color: var(--primary-dark); }
.sidebar .icon { width: 18px; text-align: center; }
.content { flex: 1; padding: 20px 22px; overflow-x: auto; min-width: 0; max-width: 1240px; margin-inline: auto; width: 100%; }

.page-title { font-size: 19px; font-weight: 700; margin-bottom: 16px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.page-title .grow { flex: 1; }

/* ---------- components ---------- */
.card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--primary); color: #fff; border: none; border-radius: 8px;
  padding: 8px 16px; font-size: 14px; font-weight: 600;
}
.btn:hover { background: var(--primary-dark); }
.btn.secondary { background: var(--panel); color: var(--text); border: 1px solid var(--border); }
.btn.secondary:hover { background: var(--bg); }
.btn.danger { background: var(--danger); }
.btn.small { padding: 5px 11px; font-size: 12.5px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; white-space: nowrap;
}
.chip.st-new { background: #e8f0fe; color: #1a56db; }
.chip.st-under_review { background: #fef3e2; color: #b26a00; }
.chip.st-need_more_info { background: #fdeaea; color: #c0392b; }
.chip.st-confirmed { background: #e6f7ef; color: #1e8e5a; }
.chip.st-assigned { background: #ede9fe; color: #6d28d9; }
.chip.st-in_progress { background: #dbeafe; color: #1d4ed8; }
.chip.st-testing { background: #fef9c3; color: #a16207; }
.chip.st-resolved { background: #d1fae5; color: #047857; }
.chip.st-closed { background: #e5e7eb; color: #4b5563; }
.chip.st-reopened { background: #ffe4e6; color: #be123c; }
/* prio chips get a tinted bg + darkened text inline (WCAG contrast) — see prioChip() */

/* darker text shades on tinted backgrounds: ≥4.5:1 contrast (WCAG AA) */
.badge-sla { font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 6px; }
.badge-sla.ok { background: #e6f7ef; color: #14683d; }
.badge-sla.warn { background: #fff4e5; color: #935010; }
.badge-sla.breach { background: #fdeaea; color: #a12b2b; }
.badge-sla.met { background: #e6f7ef; color: #14683d; }
.badge-sla.missed { background: #fdeaea; color: #a12b2b; }

/* ---------- forms ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.field label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 5px; }
.field label .req { color: var(--danger); }
.field input, .field select, .field textarea {
  width: 100%; padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel); color: var(--text);
}
.field textarea { min-height: 90px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid #bcd0f7; border-color: var(--primary); }
.hint { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* ---------- table ---------- */
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: start; font-size: 12px; color: var(--muted); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: none; }
.tbl tbody tr { cursor: pointer; }
.tbl tbody tr:hover { background: #f8fafd; }
.ticket-no { font-family: Consolas, monospace; font-size: 12.5px; color: var(--muted); direction: ltr; unicode-bidi: embed; }

/* ---------- filters bar ---------- */
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; align-items: center; }
.filters select, .filters input {
  padding: 7px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel); font-size: 13px;
}

/* ---------- kanban ---------- */
.board { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 14px; align-items: flex-start; }
.col {
  background: #eceff5; border-radius: var(--radius); min-width: 230px; width: 230px; flex-shrink: 0;
  display: flex; flex-direction: column; max-height: calc(100vh - 210px);
}
.col-head {
  padding: 10px 12px; font-weight: 700; font-size: 13px; display: flex; justify-content: space-between; align-items: center;
  position: sticky; top: 0;
}
.col-head .cnt { background: rgba(0,0,0,.08); border-radius: 10px; padding: 0 8px; font-size: 12px; }
.col-body { padding: 4px 8px 10px; overflow-y: auto; flex: 1; min-height: 60px; }
.col.drag-over { outline: 2px dashed var(--primary); outline-offset: -3px; }
.kcard {
  background: var(--panel); border-radius: 8px; box-shadow: var(--shadow);
  padding: 9px 11px; margin-bottom: 8px; cursor: grab; border-inline-start: 4px solid transparent;
  position: relative;
}
.kcard:active { cursor: grabbing; }
.kcard.sla-warn { border-inline-start-color: var(--warn); background: #fffaf3; }
.kcard.sla-breach { border-inline-start-color: var(--danger); background: #fdf3f3; }
.kcard .kno { font-family: Consolas, monospace; font-size: 11px; color: var(--muted); direction: ltr; unicode-bidi: embed; }
.kcard .ktitle { font-size: 13px; font-weight: 600; margin: 3px 0 6px; line-height: 1.4; }
.kcard .kmeta { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: 11.5px; color: var(--muted); }
.kcard.dragging { opacity: .45; }
.board-alert { display: flex; gap: 10px; margin-bottom: 12px; font-size: 13px; flex-wrap: wrap; }
.board-alert .pill { padding: 4px 12px; border-radius: 20px; font-weight: 700; }
.board-alert .late { background: #fdeaea; color: #a12b2b; }
.board-alert .warn { background: #fff4e5; color: #935010; }

/* ---------- ticket details ---------- */
.detail-grid { display: grid; grid-template-columns: 1fr 320px; gap: 18px; align-items: start; }
.detail-head { padding: 16px 18px; margin-bottom: 16px; }
.detail-head h1 { font-size: 17px; margin: 6px 0 10px; }
.detail-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.section { padding: 15px 18px; margin-bottom: 15px; }
.section h3 { font-size: 13.5px; color: var(--muted); margin-bottom: 10px; text-transform: uppercase; letter-spacing: .3px; }
.kv { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; font-size: 13px; border-bottom: 1px dashed var(--border); }
.kv:last-child { border-bottom: none; }
.kv .k { color: var(--muted); flex-shrink: 0; }
.kv .v { text-align: end; font-weight: 500; word-break: break-word; }
.pre { white-space: pre-wrap; font-size: 13.5px; }

.comment { display: flex; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.comment:last-child { border-bottom: none; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; flex-shrink: 0;
}
.comment.internal { background: #fffbe9; border-radius: 8px; padding: 12px; border: 1px dashed #e5c94b; }
.comment .cmeta { font-size: 12px; color: var(--muted); }
.comment .cbody { margin-top: 3px; white-space: pre-wrap; }
.lock { font-size: 11px; background: #f5e8b8; color: #8a6d00; border-radius: 5px; padding: 1px 7px; font-weight: 700; }

.timeline { position: relative; padding-inline-start: 18px; }
.timeline::before { content: ''; position: absolute; inset-inline-start: 5px; top: 6px; bottom: 6px; width: 2px; background: var(--border); }
.tl-item { position: relative; padding: 4px 0 10px; font-size: 12.5px; }
.tl-item::before {
  content: ''; position: absolute; inset-inline-start: -17.5px; top: 9px;
  width: 9px; height: 9px; border-radius: 50%; background: var(--primary); border: 2px solid #fff;
}
.tl-item .when { color: var(--muted); font-size: 11.5px; }

.stars { display: inline-flex; gap: 3px; direction: ltr; }
.stars button { background: none; border: none; font-size: 26px; color: #d5d9e2; padding: 0 2px; }
.stars button.on { color: #f5b301; }
.star-static { color: #f5b301; font-size: 15px; }

/* ---------- notifications ---------- */
.bell-wrap { position: relative; }
.bell-btn { background: none; border: none; font-size: 19px; position: relative; padding: 6px; }
.bell-badge {
  position: absolute; top: 0; inset-inline-end: 0; background: var(--danger); color: #fff;
  font-size: 11px; border-radius: 10px; min-width: 17px; height: 17px; display: flex; align-items: center; justify-content: center; font-weight: 700;
}
.bell-menu {
  position: absolute; top: 42px; inset-inline-end: 0; width: 330px; max-height: 420px; overflow-y: auto; z-index: 100;
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 8px 30px rgba(20,30,60,.14);
}
.bell-menu .n-item { padding: 10px 14px; border-bottom: 1px solid var(--border); cursor: pointer; font-size: 13px; }
.bell-menu .n-item.unread { background: #f0f5ff; }
.bell-menu .n-item:hover { background: var(--bg); }
.bell-menu .n-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--border); font-weight: 700; }

/* ---------- reports ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 18px; }
.kpi { padding: 14px 16px; }
.kpi .kv-num { font-size: 24px; font-weight: 800; color: var(--primary-dark); }
.kpi .kv-label { font-size: 12px; color: var(--muted); }
.charts { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 18px; }
.chart-box { padding: 14px 16px; }
.chart-box h3 { font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.bars-v { display: flex; align-items: flex-end; gap: 3px; height: 130px; }
.bars-v .bar { flex: 1; background: var(--primary); border-radius: 3px 3px 0 0; min-height: 2px; position: relative; }
.bars-v .bar:hover::after {
  content: attr(data-tip); position: absolute; bottom: 100%; inset-inline-start: 50%; transform: translateX(-50%);
  background: var(--text); color: #fff; font-size: 11px; padding: 2px 8px; border-radius: 5px; white-space: nowrap; z-index: 5;
}
.hbar { margin-bottom: 8px; }
.hbar .hb-label { display: flex; justify-content: space-between; font-size: 12.5px; margin-bottom: 3px; }
.hbar .hb-track { background: var(--bg); border-radius: 6px; height: 10px; overflow: hidden; }
.hbar .hb-fill { height: 100%; border-radius: 6px; background: var(--primary); }

/* ---------- admin ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 16px; flex-wrap: wrap; }
.tabs button {
  background: none; border: none; padding: 9px 16px; font-size: 13.5px; font-weight: 600; color: var(--muted);
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tabs button.active { color: var(--primary); border-bottom-color: var(--primary); }

/* ---------- modal & toast ---------- */
.modal-back {
  position: fixed; inset: 0; background: rgba(15, 23, 42, .45); z-index: 200;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal { background: var(--panel); border-radius: 12px; width: 100%; max-width: 480px; padding: 20px 22px; max-height: 90vh; overflow-y: auto; }
.modal h2 { font-size: 16px; margin-bottom: 14px; }
.modal .modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; }

#toasts { position: fixed; bottom: 20px; inset-inline-start: 20px; z-index: 300; display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: var(--text); color: #fff; padding: 10px 18px; border-radius: 8px; font-size: 13.5px;
  box-shadow: 0 4px 14px rgba(0,0,0,.2); animation: pop .18s ease;
}
.toast.err { background: var(--danger); }
.toast.ok { background: var(--ok); }
@keyframes pop { from { transform: translateY(8px); opacity: 0; } }

/* ---------- login ---------- */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #10275e, #1a56db); padding: 20px; }
.login-card { background: var(--panel); border-radius: 14px; padding: 30px 30px 24px; width: 100%; max-width: 400px; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.login-card h1 { font-size: 18px; margin-bottom: 4px; color: var(--primary-dark); }
.login-card .sub { color: var(--muted); font-size: 13px; margin-bottom: 20px; }
.login-card .field { margin-bottom: 13px; }
.demo-box { margin-top: 18px; background: var(--bg); border-radius: 8px; padding: 10px 14px; font-size: 12px; color: var(--muted); }
.demo-box b { display: block; margin-bottom: 4px; }
.demo-box code { direction: ltr; unicode-bidi: embed; display: inline-block; }
.login-lang { text-align: center; margin-top: 14px; }

/* ---------- attachments ---------- */
.att-chip {
  display: inline-flex; align-items: center; gap: 7px; background: var(--bg); border: 1px solid var(--border);
  border-radius: 8px; padding: 5px 11px; font-size: 12.5px; margin: 3px;
}

/* ---------- new-ticket wizard ---------- */
.wizard-card { max-width: 760px; padding: 22px 24px; }
.wizard-steps { display: flex; align-items: center; margin-bottom: 22px; }
.wstep { display: flex; align-items: center; gap: 9px; }
.wstep .num {
  width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: var(--bg); border: 2px solid var(--border); color: var(--muted);
  font-weight: 700; font-size: 13.5px; transition: all .25s; flex-shrink: 0;
}
.wstep.on .num { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 0 0 4px rgba(47,110,237,.15); }
.wstep.done .num { background: var(--ok); border-color: var(--ok); color: #fff; }
.wstep .lbl { font-size: 13px; font-weight: 600; color: var(--muted); }
.wstep.on .lbl, .wstep.done .lbl { color: var(--text); }
.wconn { flex: 1; height: 2px; background: var(--border); margin: 0 12px; min-width: 22px; border-radius: 2px; }
.wconn.on { background: var(--primary); }

.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg button {
  flex: 1; min-width: 68px; padding: 9px 10px; border: 1.5px solid var(--border); border-radius: 9px;
  background: var(--panel); font-size: 13px; cursor: pointer; color: var(--muted); font-weight: 600;
  font-family: inherit; transition: all .15s;
}
.seg button.on { border-color: var(--primary); color: var(--primary); background: #eef4ff; }

.dropzone {
  display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 18px 12px; width: 100%;
  border: 2px dashed var(--border); border-radius: 12px; background: var(--bg); cursor: pointer;
  color: var(--muted); font-size: 13px; text-align: center; transition: border-color .2s, color .2s;
  font-family: inherit;
}
.dropzone:hover { border-color: var(--primary); color: var(--primary); }
.dropzone .dz-icon { font-size: 22px; }

.wizard-actions { display: flex; justify-content: space-between; gap: 10px; margin-top: 4px; }
.wizard-actions .btn { min-width: 132px; }
.wizard-actions .btn:only-child { margin-inline-start: auto; }

.empty { text-align: center; color: var(--muted); padding: 40px 10px; }
.empty .e-ico { font-size: 34px; margin-bottom: 8px; }

/* ---------- avatars & user menu ---------- */
.user-menu { display: flex; align-items: center; gap: 9px; cursor: pointer; font-size: 13px; font-weight: 600; }
.user-menu .u-role { font-size: 11px; color: var(--muted); font-weight: 400; line-height: 1.2; }
.avatar-sm, .avatar-lg {
  border-radius: 50%; object-fit: cover; display: inline-flex; align-items: center; justify-content: center;
  background: #e9effc; color: var(--primary-dark); font-weight: 700; flex-shrink: 0;
}
.avatar-sm { width: 34px; height: 34px; font-size: 15px; }
.avatar-lg { width: 72px; height: 72px; font-size: 28px; }
.avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }

/* ---------- loading skeleton ---------- */
.skel-wrap { padding: 16px 14px; display: flex; flex-direction: column; gap: 18px; }
.skel-row { display: flex; gap: 12px; align-items: center; }
.skel {
  background: linear-gradient(90deg, var(--border) 25%, var(--bg) 50%, var(--border) 75%);
  background-size: 200% 100%; animation: skel-sh 1.2s linear infinite; border-radius: 6px;
}
.skel.s-dot { width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0; }
.skel.s-line { height: 12px; margin: 5px 0; }
.skel.w60 { width: 60%; }
.skel.w35 { width: 35%; }
@keyframes skel-sh { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ---------- tickets as cards (phones) ---------- */
.t-cards { display: none; }
.t-card { padding: 13px 14px; border-bottom: 1px solid var(--border); cursor: pointer; }
.t-card:last-child { border-bottom: none; }
.t-card .tc-top { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.t-card .tc-title { font-weight: 600; line-height: 1.5; margin-bottom: 9px; }
.t-card .tc-chips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.t-card .tc-assignee { font-size: 12px; color: var(--muted); margin-inline-start: auto; }

/* kanban quick-move button (touch devices have no drag & drop) */
.kmove {
  display: none; width: 100%; justify-content: center; align-items: center; gap: 6px;
  margin-top: 9px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--bg); color: var(--text); font-size: 12.5px; font-weight: 600;
}

/* keyboard focus for clickable rows/cards */
.tbl tbody tr:focus-visible, .kcard:focus-visible, .t-card:focus-visible {
  outline: 2px solid var(--primary); outline-offset: -2px;
}

/* ---------- responsive (NFR-03) ---------- */
.mobile-only { display: none; }
.lo-ico { display: none; }
@media (max-width: 860px) {
  .sidebar { display: none; }
  .mobile-only { display: block; }

  /* compact topbar: fits 375px with no horizontal overflow */
  .topbar { gap: 7px; padding: 0 10px; }
  .brand { font-size: 13px; }
  .brand small { display: none; }
  .user-menu .u-txt { display: none; }
  .lo-txt { display: none; }
  .lo-ico { display: inline; font-size: 15px; }
  .bell-btn { padding: 8px; }
  .bell-menu { position: fixed; top: 58px; inset-inline: 10px; width: auto; }

  /* 44px touch targets */
  .btn { min-height: 44px; }
  .btn.small { min-height: 40px; padding: 8px 13px; font-size: 13px; }
  .filters select, .filters input { min-height: 42px; font-size: 16px; flex: 1; min-width: 0; }

  /* tickets: cards instead of the table */
  .t-table { display: none; }
  .t-cards { display: block; }

  /* wide admin/report tables scroll inside their card */
  .card:not(.wizard-card) { overflow-x: auto; }
  .card .tbl { min-width: 560px; }

  .kmove { display: inline-flex; min-height: 40px; }
  .mobile-nav { padding-bottom: env(safe-area-inset-bottom, 0); }
  .mobile-nav {
    display: flex; background: var(--panel); border-top: 1px solid var(--border);
    position: sticky; bottom: 0; z-index: 60;
  }
  .mobile-nav a { flex: 1; text-align: center; padding: 9px 4px; font-size: 11px; color: var(--muted); }
  .mobile-nav a.active { color: var(--primary); font-weight: 700; }
  .detail-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .charts { grid-template-columns: 1fr; }
  .top-search { display: none; }
  .content { padding: 14px 12px; }
  /* Kanban becomes vertical list of columns on phones */
  .board { flex-direction: column; }
  .col { width: 100%; min-width: 0; max-height: none; }
  .tbl .hide-m { display: none; }

  /* new-ticket wizard on phones: big touch targets, 16px inputs (stops iOS zoom),
     action bar pinned above the bottom nav */
  .wizard-card { padding: 16px 14px; }
  .field input, .field select, .field textarea { font-size: 16px; padding: 11px 13px; }
  .field label { font-size: 13.5px; }
  .seg button { padding: 11px 8px; font-size: 14px; }
  .wizard-actions {
    position: sticky; bottom: 56px; z-index: 5;
    background: var(--panel); padding: 10px 0 4px;
    border-top: 1px solid var(--border); margin-top: 12px;
  }
  .wizard-actions .btn { flex: 1; min-width: 0; padding: 12px 12px; font-size: 15px; }
  .wstep .lbl { font-size: 12px; }
}

/* ==================== dark theme ==================== */
[data-theme="dark"] {
  --bg: #0f1522;
  --panel: #1a2333;
  --border: #2a3550;
  --text: #e7ecf7;
  --muted: #9aa7c4;
  --primary: #4d82f3;
  --primary-dark: #7ea6f8;
  --shadow: 0 1px 3px rgba(0, 0, 0, .45);
}
[data-theme="dark"] .sidebar a.active, [data-theme="dark"] .sidebar a:hover { background: #233252; color: #aec8ff; }
[data-theme="dark"] .tbl tbody tr:hover { background: #202b44; }
[data-theme="dark"] .btn { color: #fff; }
[data-theme="dark"] .btn.secondary { color: var(--text); }
[data-theme="dark"] .col { background: #131c2f; }
[data-theme="dark"] .col-head .cnt { background: rgba(255, 255, 255, .1); }
[data-theme="dark"] .kcard.sla-warn { background: #241d10; }
[data-theme="dark"] .kcard.sla-breach { background: #271416; }
[data-theme="dark"] .comment.internal { background: #232010; border-color: #6b5a1e; }
[data-theme="dark"] .lock { background: #3a3210; color: #e5c96a; }
[data-theme="dark"] .tl-item::before { border-color: var(--panel); }
[data-theme="dark"] .bell-menu .n-item.unread { background: #1c2a47; }
[data-theme="dark"] .avatar-sm, [data-theme="dark"] .avatar-lg { background: #233252; color: #aec8ff; }
[data-theme="dark"] .seg button.on { background: #1d2f55; color: #9dc0ff; border-color: var(--primary); }
[data-theme="dark"] .chip.st-new { background: #173058; color: #9dc0ff; }
[data-theme="dark"] .chip.st-under_review { background: #382a10; color: #f0c169; }
[data-theme="dark"] .chip.st-need_more_info { background: #3b1a1a; color: #f2a0a0; }
[data-theme="dark"] .chip.st-confirmed { background: #12331f; color: #7fdcae; }
[data-theme="dark"] .chip.st-assigned { background: #2a1f4d; color: #c3b2ff; }
[data-theme="dark"] .chip.st-in_progress { background: #14284a; color: #9cc1ff; }
[data-theme="dark"] .chip.st-testing { background: #333010; color: #e8d675; }
[data-theme="dark"] .chip.st-resolved { background: #0e3327; color: #6fdcae; }
[data-theme="dark"] .chip.st-closed { background: #262b33; color: #aab3c0; }
[data-theme="dark"] .chip.st-reopened { background: #3b1420; color: #f2a0b3; }
[data-theme="dark"] .badge-sla.ok, [data-theme="dark"] .badge-sla.met { background: #12321f; color: #79d9a2; }
[data-theme="dark"] .badge-sla.warn { background: #362508; color: #f0b969; }
[data-theme="dark"] .badge-sla.breach, [data-theme="dark"] .badge-sla.missed { background: #391414; color: #f09a9a; }
[data-theme="dark"] .board-alert .late { background: #391414; color: #f09a9a; }
[data-theme="dark"] .board-alert .warn { background: #362508; color: #f0b969; }
[data-theme="dark"] .login-wrap { background: linear-gradient(135deg, #060d1f, #12295c); }
