/* ── k9x HIL — Case Management CSS ────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:           #f8fafc;
  --surface:      #ffffff;
  --card:         #ffffff;
  --border:       #e2e8f0;
  --text:         #1e293b;
  --muted:        #64748b;
  --accent:       #6366f1;
  --accent-hover: #4f46e5;
  --accent-dim:   #eef2ff;
  --green:        #10b981;
  --amber:        #f59e0b;
  --red:          #ef4444;
  --blue:         #6366f1;
  --cyan:         #06b6d4;
  --purple:       #8b5cf6;
  --orange:       #fb923c;
  --shadow:       0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05);
  --shadow-md:    0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.05);
}

body.dark {
  --bg:           #0f172a;
  --surface:      #1e293b;
  --card:         #1e293b;
  --border:       #334155;
  --text:         #e2e8f0;
  --muted:        #94a3b8;
  --accent-dim:   #312e81;
  --shadow:       0 1px 3px rgba(0,0,0,.4);
  --shadow-md:    0 4px 6px rgba(0,0,0,.4);
}

body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; background: var(--bg); color: var(--text); }

/* ── Layout ──────────────────────────────────────────────────────────────── */
.layout { display: flex; height: 100vh; }

/* ── Sidebar ─────────────────────────────────────────────────────────────── */
.sidebar {
  width: 220px; min-width: 220px; background: var(--surface);
  border-right: 1px solid var(--border); display: flex; flex-direction: column;
  padding: 0; overflow-y: auto;
}
.sidebar-brand {
  padding: 20px 16px 12px; display: flex; align-items: center; gap: 8px;
  font-size: 16px; color: var(--accent); letter-spacing: 0.03em;
}
.brand-icon { font-size: 20px; }
.brand-text { color: var(--muted); }
.brand-text strong { color: var(--accent); }

.sidebar-nav { padding: 8px 8px 16px; display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  background: none; border: none; color: var(--muted); font-size: 13px;
  padding: 10px 12px; border-radius: 6px; cursor: pointer; text-align: left;
  display: flex; align-items: center; gap: 8px; transition: all 0.15s;
}
.nav-item:hover { background: var(--accent-dim); color: var(--text); }
.nav-item.active { background: var(--accent); color: #fff; font-weight: 600; }
.nav-icon { font-size: 14px; width: 18px; text-align: center; }
.nav-badge {
  margin-left: auto; background: var(--red); color: #fff; font-size: 10px;
  font-weight: 700; padding: 1px 6px; border-radius: 10px; min-width: 18px; text-align: center;
}

/* App tabs in sidebar */
#app-tabs { padding: 4px 8px 8px; }
.nav-project-label {
  font-size: 10px; font-weight: 700; color: var(--muted); text-transform: uppercase;
  letter-spacing: 0.08em; padding: 12px 12px 4px; margin-top: 4px;
  border-top: 1px solid var(--border);
}
.nav-app-item { font-size: 12px; }
.nav-app-badge { font-size: 9px; }

/* Task app label */
.task-app-label {
  background: var(--accent-dim); color: var(--accent); font-size: 10px;
  font-weight: 600; padding: 1px 6px; border-radius: 3px;
}

/* Queue card app row */
.queue-card-app { font-size: 10px; color: var(--muted); margin-top: 6px; }

/* PII / TTL badges */
.badge-pii { background: #dc262622; color: var(--red); }
.badge-ttl { background: #6366f122; color: var(--blue); }

/* Artifact list */
.artifact-list { display: flex; flex-direction: column; gap: 6px; }
.artifact-item {
  display: flex; align-items: center; gap: 8px; font-size: 12px;
  padding: 6px 10px; background: var(--bg); border: 1px solid var(--border);
  border-radius: 6px;
}
.artifact-icon { font-size: 14px; }
.artifact-name { color: var(--text); }

.sidebar-desc {
  padding: 16px; margin: 0 8px; background: var(--bg); border-radius: 8px;
  border: 1px solid var(--border);
}
.sidebar-desc-title { font-size: 11px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 6px; }
.sidebar-desc-body { font-size: 11px; color: var(--muted); line-height: 1.5; }

.sidebar-footer { margin-top: auto; padding: 16px; border-top: 1px solid var(--border); }
.sidebar-footer-text { font-size: 11px; color: var(--muted); font-weight: 600; }
.sidebar-footer-sub { font-size: 10px; color: var(--muted); opacity: 0.6; margin-top: 2px; }

/* ── Main ────────────────────────────────────────────────────────────────── */
.main { flex: 1; display: flex; flex-direction: column; overflow: hidden; }

.header {
  height: 52px; background: var(--surface); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; padding: 0 24px; flex-shrink: 0;
}
.header-title { font-size: 14px; font-weight: 600; color: var(--text); }
.header-actions { display: flex; align-items: center; gap: 12px; position: relative; }

.theme-toggle {
  background: none; border: 1px solid var(--border); border-radius: 6px;
  color: var(--muted); font-size: 14px; padding: 4px 8px; cursor: pointer;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }

/* User chip */
.user-chip {
  display: flex; align-items: center; gap: 8px; cursor: pointer;
  padding: 4px 10px; border-radius: 6px; transition: background 0.15s;
}
.user-chip:hover { background: var(--accent-dim); }
.user-avatar {
  width: 28px; height: 28px; border-radius: 50%; background: var(--accent);
  color: #fff; font-size: 12px; font-weight: 700; display: flex; align-items: center;
  justify-content: center;
}
.user-name { font-size: 12px; color: var(--muted); }

.user-menu {
  position: absolute; top: 42px; right: 0; background: var(--card);
  border: 1px solid var(--border); border-radius: 8px; padding: 12px 16px;
  min-width: 180px; z-index: 100; box-shadow: var(--shadow-md);
}
.user-menu-email { font-size: 12px; color: var(--text); font-weight: 600; margin-bottom: 2px; }
.user-menu-role { font-size: 11px; color: var(--muted); margin-bottom: 10px; text-transform: capitalize; }
.user-menu-btn {
  width: 100%; background: none; border: 1px solid var(--border); color: var(--muted);
  padding: 6px 0; border-radius: 4px; font-size: 11px; cursor: pointer;
}
.user-menu-btn:hover { border-color: var(--red); color: var(--red); }

/* ── Panels ──────────────────────────────────────────────────────────────── */
.panel { display: none; padding: 24px; overflow-y: auto; flex: 1; }
.panel.active { display: block; }

/* ── Login ────────────────────────────────────────────────────────────────── */
.login-card {
  max-width: 340px; margin: 80px auto; background: var(--card);
  border: 1px solid var(--border); border-radius: 12px; padding: 32px;
  box-shadow: var(--shadow-md);
}
.login-brand { font-size: 22px; color: var(--muted); text-align: center; margin-bottom: 4px; }
.login-brand strong { color: var(--accent); }
.login-subtitle { font-size: 12px; color: var(--muted); text-align: center; margin-bottom: 24px; }
.login-card input {
  width: 100%; background: var(--bg); border: 1px solid var(--border);
  color: var(--text); padding: 10px 12px; border-radius: 6px; font-size: 13px;
  margin-bottom: 10px; outline: none;
}
.login-card input:focus { border-color: var(--accent); }
.login-error { color: var(--red); font-size: 11px; margin-top: 8px; text-align: center; }

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
  border: none; border-radius: 6px; font-size: 12px; font-weight: 600;
  cursor: pointer; padding: 8px 16px; transition: all 0.15s;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-block { width: 100%; margin-top: 4px; }
.btn-sm { padding: 5px 10px; font-size: 11px; }
.btn-outline {
  background: none; border: 1px solid var(--border); color: var(--muted);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-green { background: var(--green); color: #fff; }
.btn-green:hover { opacity: 0.9; }
.btn-amber { background: var(--amber); color: #000; }
.btn-amber:hover { opacity: 0.9; }
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { opacity: 0.9; }

/* ── Stat cards ──────────────────────────────────────────────────────────── */
.stat-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.stat-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 10px;
  padding: 16px; display: flex; flex-direction: column; box-shadow: var(--shadow);
}
.stat-card-label { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; }
.stat-card-value { font-size: 28px; font-weight: 700; margin-top: 6px; }
.stat-card-sub { font-size: 10px; color: var(--muted); margin-top: 4px; }

/* ── Section title ───────────────────────────────────────────────────────── */
.section-title {
  font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase;
  letter-spacing: 0.08em; margin-bottom: 12px;
}

/* ── Task list ───────────────────────────────────────────────────────────── */
.task-list { display: flex; flex-direction: column; gap: 8px; }

.task-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 8px;
  padding: 14px 16px; cursor: pointer; transition: all 0.15s;
  display: flex; align-items: flex-start; gap: 12px; box-shadow: var(--shadow);
}
.task-card:hover { border-color: var(--accent); box-shadow: var(--shadow-md); }

.task-priority-bar {
  width: 3px; min-height: 40px; border-radius: 2px; flex-shrink: 0;
}
.priority-critical { background: var(--red); }
.priority-high { background: var(--orange); }
.priority-medium { background: var(--amber); }
.priority-low { background: var(--green); }

.task-card-body { flex: 1; min-width: 0; }
.task-card-title { font-size: 13px; font-weight: 600; color: var(--text); line-height: 1.3; }
.task-card-meta { font-size: 11px; color: var(--muted); margin-top: 4px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.task-card-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex-shrink: 0; }

/* ── Status / priority badges ────────────────────────────────────────────── */
.badge {
  font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 4px;
  text-transform: uppercase; letter-spacing: 0.06em; white-space: nowrap;
}
.badge-pending     { background: #fef3c7; color: #92400e; }
.badge-in_progress { background: #e0e7ff; color: #3730a3; }
.badge-completed   { background: #d1fae5; color: #065f46; }
.badge-escalated   { background: #ffedd5; color: #9a3412; }
.badge-rejected    { background: #fee2e2; color: #991b1b; }

.badge-critical { background: #fee2e2; color: #991b1b; }
.badge-high     { background: #ffedd5; color: #9a3412; }
.badge-medium   { background: #fef3c7; color: #92400e; }
.badge-low      { background: #d1fae5; color: #065f46; }

body.dark .badge-pending     { background: #78350f33; color: var(--amber); }
body.dark .badge-in_progress { background: #312e8133; color: #818cf8; }
body.dark .badge-completed   { background: #064e3b33; color: var(--green); }
body.dark .badge-escalated   { background: #7c2d1233; color: var(--orange); }
body.dark .badge-rejected    { background: #7f1d1d33; color: var(--red); }
body.dark .badge-critical    { background: #7f1d1d33; color: var(--red); }
body.dark .badge-high        { background: #7c2d1233; color: var(--orange); }
body.dark .badge-medium      { background: #78350f33; color: var(--amber); }
body.dark .badge-low         { background: #064e3b33; color: var(--green); }

/* ── Task filters ────────────────────────────────────────────────────────── */
.task-filters {
  display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; align-items: center;
}
.filter-btn {
  background: var(--card); border: 1px solid var(--border); color: var(--muted);
  font-size: 11px; padding: 5px 12px; border-radius: 4px; cursor: pointer; text-transform: capitalize;
}
.filter-btn:hover { border-color: var(--accent); color: var(--text); }
.filter-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }

/* ── Queue grid ──────────────────────────────────────────────────────────── */
.queue-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.queue-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 10px;
  padding: 20px; cursor: pointer; transition: all 0.15s; box-shadow: var(--shadow);
}
.queue-card:hover { border-color: var(--accent); box-shadow: var(--shadow-md); }
.queue-card-name { font-size: 14px; font-weight: 600; color: var(--text); }
.queue-card-desc { font-size: 11px; color: var(--muted); margin-top: 6px; line-height: 1.4; }
.queue-card-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; }
.queue-card-topic { font-size: 10px; color: var(--muted); opacity: 0.7; font-family: monospace; }
.queue-card-count { font-size: 12px; font-weight: 700; color: var(--accent); }

/* ── Modal ────────────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; background: #00000055; z-index: 200;
  display: flex; align-items: center; justify-content: center;
}
body.dark .modal-overlay { background: #00000088; }
.modal-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  width: 580px; max-width: 90vw; max-height: 85vh; overflow-y: auto;
  box-shadow: var(--shadow-md);
}
.modal-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
}
.modal-title { font-size: 14px; font-weight: 600; color: var(--text); }
.modal-close {
  background: none; border: none; color: var(--muted); font-size: 16px;
  cursor: pointer; padding: 4px;
}
.modal-close:hover { color: var(--text); }
.modal-body { padding: 20px; }

.modal-section { margin-bottom: 16px; }
.modal-section-title { font-size: 10px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 6px; }
.modal-desc { font-size: 12px; color: var(--text); line-height: 1.5; }
.modal-kv { display: grid; grid-template-columns: 120px 1fr; gap: 4px 12px; font-size: 12px; }
.modal-kv-label { color: var(--muted); }
.modal-kv-value { color: var(--text); font-family: monospace; font-size: 11px; }

.modal-payload {
  background: var(--bg); border: 1px solid var(--border); border-radius: 6px;
  padding: 12px; font-family: monospace; font-size: 11px; color: var(--cyan);
  white-space: pre-wrap; word-break: break-all; max-height: 200px; overflow-y: auto;
}

.modal-actions { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }

/* ── Timeline ────────────────────────────────────────────────────────────── */
.timeline { display: flex; flex-direction: column; gap: 0; }
.timeline-item {
  display: flex; gap: 10px; padding: 8px 0; position: relative;
}
.timeline-dot {
  width: 8px; height: 8px; border-radius: 50%; margin-top: 4px; flex-shrink: 0;
}
.timeline-content { flex: 1; }
.timeline-action { font-size: 12px; color: var(--text); font-weight: 500; }
.timeline-actor { color: var(--accent); }
.timeline-comment { font-size: 11px; color: var(--muted); margin-top: 2px; }
.timeline-time { font-size: 10px; color: var(--muted); opacity: 0.6; margin-top: 2px; }

/* ── Empty state ─────────────────────────────────────────────────────────── */
.empty-state {
  text-align: center; padding: 48px 0; color: var(--muted);
}
.empty-state-icon { font-size: 32px; margin-bottom: 12px; opacity: 0.5; }
.empty-state-text { font-size: 13px; }

/* ── Comment input ───────────────────────────────────────────────────────── */
.modal-comment-input {
  width: 100%; background: var(--bg); border: 1px solid var(--border);
  color: var(--text); padding: 8px 10px; border-radius: 6px; font-size: 12px;
  margin-top: 8px; outline: none; resize: vertical; min-height: 60px;
  font-family: inherit;
}
.modal-comment-input:focus { border-color: var(--accent); }

/* ── Dashboard — Overview (pie + table) ──────────────────────────────────── */
.dash-overview {
  display: grid; grid-template-columns: 240px 1fr; gap: 20px; margin-top: 20px;
}
@media (max-width: 768px) { .dash-overview { grid-template-columns: 1fr; } }

.dash-pie-section { }
.dash-table-section { }

/* Pie chart */
.pie-wrap { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.pie-wrap svg { filter: drop-shadow(0 2px 4px rgba(0,0,0,.1)); }
body.dark .pie-wrap svg { filter: drop-shadow(0 2px 4px rgba(0,0,0,.4)); }
.pie-legend { display: flex; flex-direction: column; gap: 4px; width: 100%; }
.pie-legend-item { display: flex; align-items: center; gap: 6px; font-size: 11px; }
.pie-legend-dot { width: 8px; height: 8px; border-radius: 2px; flex-shrink: 0; }
.pie-legend-label { color: var(--muted); flex: 1; }
.pie-legend-value { font-weight: 700; color: var(--text); }
.dash-pie-empty { font-size: 12px; color: var(--muted); text-align: center; padding: 40px 0; }

/* Queue summary table */
.dash-queue-table {
  width: 100%; border-collapse: collapse; font-size: 12px;
}
.dash-queue-table th {
  text-align: left; font-size: 10px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.06em; padding: 6px 10px;
  border-bottom: 1px solid var(--border);
}
.dash-queue-row { cursor: pointer; transition: background 0.15s; }
.dash-queue-row:hover { background: var(--accent-dim); }
.dash-queue-row td { padding: 8px 10px; border-bottom: 1px solid var(--border); }
.dash-qt-name { font-weight: 600; color: var(--text); }
.dash-qt-app { color: var(--muted); }
.dash-qt-count { font-weight: 600; color: var(--accent); text-align: center; }
.dash-qt-urgent { text-align: center; color: var(--muted); }
.dash-qt-red { color: var(--red); font-weight: 700; }

/* ── Dashboard — Queue-centric layout ────────────────────────────────────── */
.dash-project-header {
  display: flex; align-items: center; gap: 8px; margin-top: 24px; margin-bottom: 12px;
}
.dash-project-name { font-size: 14px; font-weight: 700; color: var(--text); }
.dash-project-sep { font-size: 14px; color: var(--muted); }
.dash-app-name { font-size: 14px; font-weight: 500; color: var(--muted); }

.dash-queue-grid {
  display: flex; flex-direction: column; gap: 16px;
}

.dash-queue-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 10px;
  padding: 16px 20px; box-shadow: var(--shadow);
}
.dash-queue-card.dash-queue-urgent {
  border-bottom: 3px solid var(--red);
}

.dash-queue-header {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px;
}
.dash-queue-name { font-size: 14px; font-weight: 700; color: var(--text); }
.dash-queue-count { font-size: 12px; font-weight: 600; color: var(--accent); }

.dash-queue-topic { font-size: 10px; color: var(--muted); opacity: 0.6; font-family: monospace; margin-bottom: 4px; }
.dash-queue-ttl { font-size: 10px; color: var(--muted); margin-bottom: 8px; }

.dash-queue-urgent-bar {
  background: #ef444418; border: 1px solid #ef444444; border-radius: 4px;
  padding: 4px 10px; font-size: 11px; color: var(--red); font-weight: 600;
  margin-bottom: 10px; display: flex; align-items: center; gap: 6px;
}
.dash-urgent-count {
  background: var(--red); color: #fff; font-size: 10px; font-weight: 700;
  padding: 1px 6px; border-radius: 8px; min-width: 18px; text-align: center;
}

.dash-queue-tasks {
  display: flex; flex-direction: column; gap: 6px; margin-top: 8px;
  border-top: 1px solid var(--border); padding-top: 10px;
}

.dash-queue-empty {
  font-size: 11px; color: var(--muted); padding: 8px 0; text-align: center;
}

/* ── Urgency bar + labels ────────────────────────────────────────────────── */
.urgency-bar-wrap {
  height: 4px; background: var(--border); border-radius: 2px; margin-top: 8px;
  overflow: hidden;
}
.urgency-bar {
  height: 100%; border-radius: 2px; transition: width 0.3s;
}
.urgency-label { font-size: 11px; font-weight: 700; white-space: nowrap; }
.urgency-action { font-size: 10px; color: var(--muted); white-space: nowrap; }

.task-card-expired { border-color: var(--red); background: #ef444408; }
body.dark .task-card-expired { background: #ef444412; }

/* ── Administration ──────────────────────────────────────────────────────── */
.sidebar-admin { border-top: 1px solid var(--border); margin-top: auto; }

.admin-section { }
.admin-desc { font-size: 12px; color: var(--muted); line-height: 1.5; }

.admin-rules-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px; margin-top: 12px;
}
.admin-rule-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 8px;
  padding: 16px; box-shadow: var(--shadow);
}
.admin-rule-title { font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.admin-rule-desc { font-size: 11px; color: var(--muted); line-height: 1.4; margin-bottom: 8px; }
.admin-rule-status { }

.admin-planned-list { display: flex; flex-direction: column; gap: 6px; }
.admin-planned-item {
  font-size: 12px; color: var(--muted); padding: 6px 12px;
  background: var(--card); border: 1px dashed var(--border); border-radius: 6px;
}
.admin-planned-item::before { content: "◇ "; color: var(--accent); }

/* Admin forms */
.admin-form { margin-top: 12px; }
.admin-form-title { font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 12px; }
.admin-form-hint { font-size: 12px; color: var(--muted); padding: 16px 0; }
.admin-form-row {
  display: flex; align-items: center; gap: 12px; margin-bottom: 8px;
}
.admin-form-label {
  font-size: 12px; color: var(--muted); min-width: 140px; font-weight: 500;
}
.admin-form-input {
  flex: 1; background: var(--bg); border: 1px solid var(--border);
  color: var(--text); padding: 7px 10px; border-radius: 6px; font-size: 12px;
  outline: none; max-width: 300px;
}
.admin-form-input:focus { border-color: var(--accent); }

.admin-rule-active { border-color: var(--green); }
/* Admin console card grid */
.admin-card-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px;
}
.admin-console-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 10px;
  padding: 24px; cursor: pointer; transition: all 0.15s; box-shadow: var(--shadow);
  display: flex; gap: 16px; align-items: flex-start;
}
.admin-console-card:hover { border-color: var(--accent); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.admin-console-icon { font-size: 24px; color: var(--accent); flex-shrink: 0; width: 32px; text-align: center; }
.admin-console-body { flex: 1; }
.admin-console-title { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.admin-console-desc { font-size: 11px; color: var(--muted); line-height: 1.5; }

.admin-back {
  font-size: 12px; color: var(--accent); cursor: pointer; margin-bottom: 16px;
  display: inline-block; padding: 4px 0;
}
.admin-back:hover { text-decoration: underline; }

.admin-rule-card { cursor: pointer; transition: border-color 0.15s; }
.admin-rule-card:hover { border-color: var(--accent); }

/* ── Task table ──────────────────────────────────────────────────────────── */
.task-table-wrap { overflow-x: auto; }
.task-table {
  width: 100%; border-collapse: collapse; font-size: 12px; min-width: 800px;
}
.task-table thead th {
  text-align: left; font-size: 10px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.06em; padding: 8px 10px;
  border-bottom: 2px solid var(--border); cursor: pointer; white-space: nowrap;
  user-select: none;
}
.task-table thead th:hover { color: var(--accent); }
.task-table tbody tr { transition: background 0.1s; }
.task-table tbody tr:hover { background: var(--accent-dim); }
.task-table tbody td { padding: 10px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }

.sort-icon { font-size: 9px; color: var(--muted); margin-left: 2px; }
.sort-icon.active { color: var(--accent); }

.tt-pri-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
.tt-title { font-weight: 600; color: var(--text); max-width: 300px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tt-app { color: var(--muted); font-size: 11px; }
.tt-queue { color: var(--muted); font-size: 11px; }
.tt-assignee { font-size: 11px; color: var(--text); }
.tt-unassigned { color: var(--red); font-weight: 600; font-size: 10px; }
.tt-ttl { font-weight: 600; font-size: 11px; white-space: nowrap; }
.tt-age { color: var(--muted); font-size: 11px; white-space: nowrap; }
.tt-col-pri { width: 30px; }
.tt-col-action { width: 60px; }

.tt-row-unassigned { background: #ef444406; }
body.dark .tt-row-unassigned { background: #ef444410; }
.tt-row-expired { background: #ef444410; }
body.dark .tt-row-expired { background: #ef444418; }
