/* ══════════════════════════════════════════════════════════════
   ergo sum · Ticketing — Design System
   Apple-nahe Software-Ästhetik: viel Ruhe, feine Haarlinien,
   ein einziger kräftiger Akzent (Markengrün #74A61B).
   ══════════════════════════════════════════════════════════════ */

:root {
  --brand: #74a61b;
  --brand-ink: #557c12;
  --brand-tint: #eef5e2;

  --bg: #f5f5f7;
  --surface: #ffffff;
  --surface-2: #fbfbfd;
  --topbar: rgba(255, 255, 255, 0.72);
  --text: #1d1d1f;
  --text-2: #6e6e73;
  --text-3: #98989d;
  --hair: #e6e6ea;
  --hair-strong: #d7d7dc;

  --blue: #0a84ff;   --blue-t: #e8f1ff;
  --green: #2f9e44;  --green-t: #e6f4ea;
  --amber: #b26a00;  --amber-t: #fbefdc;
  --red: #d0342c;    --red-t: #fbe9e7;
  --grey: #8a8a8e;   --grey-t: #ededf0;

  --radius-lg: 16px;
  --radius: 12px;
  --radius-sm: 9px;
  --pad: 16px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08), 0 1px 4px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.22);
  --ring: 0 0 0 3px rgba(116, 166, 27, 0.28);

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display",
    "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

html[data-theme="dark"] {
  --brand: #96c93f;
  --brand-ink: #aad657;
  --brand-tint: rgba(150, 201, 63, 0.15);

  --bg: #161618;
  --surface: #202023;
  --surface-2: #26262a;
  --topbar: rgba(28, 28, 31, 0.72);
  --text: #f5f5f7;
  --text-2: #a1a1a6;
  --text-3: #7c7c82;
  --hair: rgba(255, 255, 255, 0.09);
  --hair-strong: rgba(255, 255, 255, 0.16);

  --blue-t: rgba(10, 132, 255, 0.16); --blue: #4aa3ff;
  --green-t: rgba(47, 158, 68, 0.18); --green: #56c26a;
  --amber-t: rgba(178, 106, 0, 0.20); --amber: #e0a44a;
  --red-t: rgba(208, 52, 44, 0.20);   --red: #ff6a5f;
  --grey-t: rgba(255, 255, 255, 0.08); --grey: #9a9aa0;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 30px 70px rgba(0, 0, 0, 0.6);
}

html[data-theme="contrast"] {
  --bg: #000000; --surface: #0d0d0d; --surface-2: #141414;
  --topbar: rgba(0, 0, 0, 0.85);
  --text: #ffffff; --text-2: #d9d9d9; --text-3: #a8a8a8;
  --hair: #4d4d4d; --hair-strong: #6b6b6b;
  --brand: #a6e34a; --brand-ink: #b9ef5f; --brand-tint: rgba(166, 227, 74, 0.2);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-size: 14px;
  line-height: 1.45;
}
button { font: inherit; cursor: pointer; color: inherit; }
input, select, textarea { font: inherit; color: inherit; }
b, strong { font-weight: 600; }
.muted { color: var(--text-3); }
.mono { font-variant-numeric: tabular-nums; letter-spacing: 0.01em; }

/* ── Boot ─────────────────────────────────────────────── */
.boot {
  height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 22px;
}
.boot-logo { height: 30px; opacity: 0.9; }
.boot-spinner {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2.5px solid var(--hair); border-top-color: var(--brand);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Teams-Sperre (Zugriff nur in Teams) ──────────────── */
.gate {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 24px; background: var(--bg);
}
.gate-card {
  max-width: 440px; width: 100%; text-align: center;
  background: var(--surface); border: 1px solid var(--hair);
  border-radius: 18px; padding: 40px 32px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.10);
}
.gate-logo { height: 34px; margin-bottom: 22px; }
.gate-title { font-size: 20px; font-weight: 650; margin: 0 0 12px; color: var(--text-1); }
.gate-text { font-size: 14.5px; line-height: 1.55; color: var(--text-2); margin: 0 0 24px; }
.gate-btn {
  display: inline-block; text-decoration: none;
  background: var(--brand); color: #fff; font-weight: 600; font-size: 14px;
  padding: 11px 22px; border-radius: 10px; transition: filter 0.15s;
}
.gate-btn:hover { filter: brightness(1.06); }

/* ── Layout / Topbar ──────────────────────────────────── */
.app { min-height: 100vh; }
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 12px clamp(16px, 4vw, 40px);
  background: var(--topbar);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--hair);
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-logo { height: 24px; display: block; }
.brand-div { width: 1px; height: 20px; background: var(--hair-strong); }
.brand-product {
  font-size: 15px; font-weight: 600; letter-spacing: -0.01em; color: var(--text-2);
}
.topbar-r { display: flex; align-items: center; gap: 12px; }
.badge {
  font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px;
  background: var(--brand-tint); color: var(--brand-ink);
  font-variant-numeric: tabular-nums;
}

/* ── Subbar (Segmented) ───────────────────────────────── */
.subbar {
  display: flex; align-items: center; gap: 14px;
  padding: 14px clamp(16px, 4vw, 40px) 4px;
  max-width: 1160px; margin: 0 auto;
}
.seg {
  display: inline-flex; padding: 3px; gap: 2px;
  background: var(--grey-t); border-radius: 10px;
}
.seg button {
  border: none; background: transparent; color: var(--text-2);
  padding: 6px 14px; border-radius: 8px; font-size: 13px; font-weight: 500;
  transition: background 0.15s, color 0.15s;
}
.seg button.on {
  background: var(--surface); color: var(--text);
  box-shadow: var(--shadow-sm); font-weight: 600;
}
.count { font-size: 13px; color: var(--text-3); font-variant-numeric: tabular-nums; }

.main { max-width: 1160px; margin: 0 auto; padding: 14px clamp(16px, 4vw, 40px) 72px; }

/* ── Buttons ──────────────────────────────────────────── */
.btn-primary {
  display: inline-flex; align-items: center; gap: 6px;
  border: none; border-radius: 10px; padding: 9px 16px;
  background: var(--brand); color: #fff; font-weight: 600; font-size: 13.5px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12); transition: filter 0.15s, transform 0.05s;
}
.btn-primary:hover { filter: brightness(1.06); }
.btn-primary:active { transform: translateY(0.5px); }
.btn-primary:disabled { opacity: 0.45; cursor: default; filter: none; }
.btn-primary.sm { padding: 8px 14px; }
.btn-soft {
  border: 1px solid var(--hair-strong); background: var(--surface);
  color: var(--text); border-radius: 10px; padding: 9px 16px; font-weight: 500; font-size: 13.5px;
}
.btn-soft:hover { background: var(--surface-2); }
.plus { font-size: 15px; line-height: 1; margin-top: -1px; }
.icon-btn {
  border: none; background: transparent; color: var(--text-3);
  width: 30px; height: 30px; border-radius: 8px; font-size: 20px; line-height: 1;
}
.icon-btn:hover { background: var(--grey-t); color: var(--text); }

/* ── Dashboard ────────────────────────────────────────── */
.dash { display: flex; flex-direction: column; gap: 16px; }
.stat-row {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px;
}
.stat {
  background: var(--surface); border: 1px solid var(--hair);
  border-radius: var(--radius); padding: 16px 16px 14px;
  box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
}
.stat::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--grey);
}
.stat.t-blue::before { background: var(--blue); }
.stat.t-green::before { background: var(--brand); }
.stat.t-amber::before { background: var(--amber); }
.stat.t-red::before { background: var(--red); }
.stat.t-grey::before { background: var(--grey); }
.stat-n {
  font-size: 30px; font-weight: 650; letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums; line-height: 1;
}
.stat-t { margin-top: 7px; font-size: 12.5px; color: var(--text-2); font-weight: 500; }

.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.panel {
  background: var(--surface); border: 1px solid var(--hair);
  border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden;
}
.panel-h {
  padding: 13px 16px; font-weight: 600; font-size: 13px;
  border-bottom: 1px solid var(--hair); letter-spacing: -0.01em;
}
.bars { padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; }
.bar-row { display: grid; grid-template-columns: 118px 1fr 28px; align-items: center; gap: 10px; }
.bar-label { font-size: 13px; color: var(--text-2); }
.bar-track { height: 8px; background: var(--grey-t); border-radius: 999px; overflow: hidden; }
.bar-fill { display: block; height: 100%; border-radius: 999px; background: var(--brand); transition: width 0.5s cubic-bezier(0.22, 1, 0.36, 1); }
.bar-fill.p-dringend { background: var(--red); }
.bar-fill.p-hoch { background: var(--amber); }
.bar-fill.p-normal { background: var(--brand); }
.bar-fill.p-niedrig { background: var(--grey); }
.bar-val { text-align: right; font-size: 13px; font-variant-numeric: tabular-nums; color: var(--text-2); }

.mini-list { display: flex; flex-direction: column; }
.mini-row {
  display: grid; grid-template-columns: 3px 76px 1fr auto auto; align-items: center; gap: 12px;
  border: none; background: transparent; text-align: left;
  padding: 11px 16px; border-bottom: 1px solid var(--hair); width: 100%;
}
.mini-row:last-child { border-bottom: none; }
.mini-row:hover { background: var(--surface-2); }
.mini-key { font-size: 12.5px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.mini-title { font-size: 13.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-time { font-size: 12px; color: var(--text-3); white-space: nowrap; }
.accent { width: 3px; height: 22px; border-radius: 999px; background: var(--grey); }
.accent.s-offen { background: var(--blue); }
.accent.s-in_arbeit { background: var(--brand); }
.accent.s-wartet { background: var(--amber); }
.accent.s-geschlossen { background: var(--grey); }

/* ── Pills ────────────────────────────────────────────── */
.pill {
  display: inline-block; font-size: 11.5px; font-weight: 600;
  padding: 3px 9px; border-radius: 999px; white-space: nowrap; letter-spacing: 0.01em;
}
.s-offen { background: var(--blue-t); color: var(--blue); }
.s-in_arbeit { background: var(--green-t); color: var(--green); }
.s-wartet { background: var(--amber-t); color: var(--amber); }
.s-geschlossen { background: var(--grey-t); color: var(--grey); }
.p-niedrig { background: var(--grey-t); color: var(--text-2); }
.p-normal { background: var(--brand-tint); color: var(--brand-ink); }
.p-hoch { background: var(--amber-t); color: var(--amber); }
.p-dringend { background: var(--red-t); color: var(--red); }

/* ── Filter / Suche ───────────────────────────────────── */
.filters { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.search {
  position: relative; flex: 1 1 260px; min-width: 200px; display: flex; align-items: center;
}
.search-i { position: absolute; left: 11px; color: var(--text-3); font-size: 16px; pointer-events: none; }
.search input {
  width: 100%; padding: 9px 32px 9px 32px; border-radius: 10px;
  border: 1px solid var(--hair-strong); background: var(--surface);
}
.search-x {
  position: absolute; right: 6px; border: none; background: transparent;
  color: var(--text-3); font-size: 17px; width: 24px; height: 24px; border-radius: 6px;
}
.search-x:hover { background: var(--grey-t); }
.filters select {
  padding: 9px 12px; border-radius: 10px; border: 1px solid var(--hair-strong);
  background: var(--surface); color: var(--text);
}
.chip-toggle {
  border: 1px solid var(--hair-strong); background: var(--surface);
  color: var(--text-2); padding: 9px 14px; border-radius: 10px; font-size: 13px; font-weight: 500;
}
.chip-toggle.on { background: var(--red-t); border-color: transparent; color: var(--red); }

/* ── Ticketliste ──────────────────────────────────────── */
.tlist {
  background: var(--surface); border: 1px solid var(--hair);
  border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden;
}
.tlist-head, .trow {
  display: grid;
  grid-template-columns: 3px minmax(0, 1fr) 132px 108px minmax(0, 1.05fr) 78px 132px;
  align-items: center; gap: 14px;
}
.tlist-head {
  padding: 10px 18px; border-bottom: 1px solid var(--hair);
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--text-3);
}
.trow {
  border: none; background: transparent; text-align: left; width: 100%;
  padding: 13px 18px; border-bottom: 1px solid var(--hair);
}
.trow:last-child { border-bottom: none; }
.trow:hover { background: var(--surface-2); }
.t-main { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.t-key { font-size: 11.5px; color: var(--text-3); font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }
.t-title { font-size: 14px; font-weight: 600; letter-spacing: -0.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t-desc { font-size: 12.5px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t-cat { font-size: 13px; color: var(--text-2); }
.t-cust { font-size: 13px; min-width: 0; overflow: hidden; }
.t-cust .sub { display: block; font-size: 11.5px; color: var(--text-3); }
.t-assignee { display: flex; }
.t-upd { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.ta-r { text-align: right; justify-self: end; }
.rel { font-size: 12px; color: var(--text-3); white-space: nowrap; }
.due-flag {
  font-size: 10.5px; font-weight: 700; color: var(--red);
  background: var(--red-t); padding: 2px 7px; border-radius: 999px; white-space: nowrap;
  text-transform: uppercase; letter-spacing: 0.03em;
}

/* ── Avatare ──────────────────────────────────────────── */
.avatar {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; font-weight: 600; color: #fff; flex: none;
  line-height: 1; letter-spacing: 0.01em; user-select: none;
}
.avatar-empty { background: var(--grey-t); color: var(--text-3); font-weight: 400; }
.tone-a { background: #6c8ebf; } .tone-b { background: #6aa06a; }
.tone-c { background: #c58a3a; } .tone-d { background: #b06a8c; }
.tone-e { background: #5aa0a8; } .tone-f { background: #8a7fbf; }
.tone-g { background: #c07a6a; } .tone-h { background: #7b9a3f; }

/* ── Overlay / Drawer / Modal ─────────────────────────── */
.overlay {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(0, 0, 0, 0.32); backdrop-filter: blur(2px);
  display: flex; justify-content: flex-end;
  animation: fade 0.18s ease;
}
.overlay.center { align-items: center; justify-content: center; padding: 24px; }
@keyframes fade { from { opacity: 0; } }

.drawer {
  width: min(560px, 100%); height: 100%;
  background: var(--surface); box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column;
  animation: slidein 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes slidein { from { transform: translateX(24px); opacity: 0.6; } }
.drawer-h {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; border-bottom: 1px solid var(--hair);
}
.dh-key { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text-2); }
.accent-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--grey); }
.accent-dot.s-offen { background: var(--blue); }
.accent-dot.s-in_arbeit { background: var(--brand); }
.accent-dot.s-wartet { background: var(--amber); }
.accent-dot.s-geschlossen { background: var(--grey); }
.drawer-scroll { flex: 1; overflow-y: auto; padding: 18px; }
.dh-title { font-size: 21px; font-weight: 650; letter-spacing: -0.02em; margin: 0 0 6px; }
.dh-desc { color: var(--text-2); margin: 0 0 18px; white-space: pre-wrap; }
.drawer-f {
  display: flex; gap: 10px; padding: 12px 16px;
  border-top: 1px solid var(--hair); background: var(--surface-2);
}
.comment-in {
  flex: 1; padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--hair-strong); background: var(--surface);
}

.modal {
  width: min(680px, 100%); max-height: calc(100vh - 48px);
  background: var(--surface); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); display: flex; flex-direction: column;
  animation: pop 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes pop { from { transform: scale(0.97); opacity: 0; } }
.modal-h {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--hair);
}
.modal-h h2 { margin: 0; font-size: 17px; font-weight: 650; letter-spacing: -0.01em; }
.modal-body { padding: 18px 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; }
.modal-f {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 14px 20px; border-top: 1px solid var(--hair); background: var(--surface-2);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* ── Formularfelder ───────────────────────────────────── */
.field { margin: 8px 0; }
.field > label {
  display: block; font-size: 12px; font-weight: 600; color: var(--text-2);
  margin-bottom: 6px; letter-spacing: 0.01em;
}
.field input, .field select, .field textarea {
  width: 100%; padding: 9px 11px; border-radius: 10px;
  border: 1px solid var(--hair-strong); background: var(--surface); color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field input:focus, .field select:focus, .field textarea:focus,
.search input:focus, .comment-in:focus {
  outline: none; border-color: var(--brand); box-shadow: var(--ring);
}
.field textarea { resize: vertical; min-height: 74px; }
.field input:disabled, .field select:disabled { opacity: 0.6; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.ctrl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 4px; }
.hint { font-size: 11.5px; color: var(--text-3); margin-top: 5px; }

/* Personenfeld */
.person-field {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  min-height: 40px; padding: 5px; border: 1px solid var(--hair-strong);
  border-radius: 10px; background: var(--surface);
}
.person-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--grey-t); border-radius: 999px; padding: 3px 4px 3px 4px;
}
.pc-name { font-size: 12.5px; font-weight: 500; padding-left: 2px; }
.pc-x { border: none; background: transparent; color: var(--text-3); font-size: 15px; line-height: 1; padding: 0 5px; border-radius: 50%; }
.pc-x:hover { color: var(--red); }
.person-add {
  display: inline-flex; align-items: center; gap: 5px;
  border: none; background: transparent; color: var(--brand-ink);
  font-size: 12.5px; font-weight: 600; padding: 5px 8px; border-radius: 8px;
}
.person-add:hover { background: var(--brand-tint); }
.manual { display: flex; gap: 8px; margin-top: 8px; }
.manual input { flex: 1; padding: 8px 10px; border-radius: 9px; border: 1px solid var(--hair-strong); background: var(--surface); }

/* Meta-Box */
.meta-box {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px 20px;
  margin: 18px 0; padding: 14px 16px;
  background: var(--surface-2); border: 1px solid var(--hair); border-radius: var(--radius);
}
.meta-box > div > span {
  display: block; font-size: 11px; font-weight: 600; color: var(--text-3);
  text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 3px;
}
.meta-box > div > div { font-size: 13.5px; }
.meta-person { display: flex; align-items: center; gap: 7px; }

/* ── Verlauf / Timeline ───────────────────────────────── */
.section-h { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-3); margin: 4px 0 12px; }
.timeline { display: flex; flex-direction: column; gap: 2px; position: relative; }
.tl-item { display: grid; grid-template-columns: 28px 1fr; gap: 12px; padding: 6px 0; position: relative; }
.tl-item::before {
  content: ""; position: absolute; left: 13.5px; top: 34px; bottom: -6px; width: 1.5px;
  background: var(--hair);
}
.tl-item:last-child::before { display: none; }
.tl-body { padding-top: 3px; min-width: 0; }
.tl-meta { font-size: 13px; }
.tl-meta b { font-weight: 600; }
.tl-time { color: var(--text-3); font-size: 12px; }
.tl-line { font-size: 13px; color: var(--text-2); margin-top: 1px; }
.tl-comment {
  font-size: 13.5px; color: var(--text); margin-top: 5px;
  background: var(--surface-2); border: 1px solid var(--hair);
  padding: 9px 11px; border-radius: 10px; white-space: pre-wrap;
}

/* ── Empty / Toast ────────────────────────────────────── */
.empty {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  padding: 56px 20px; color: var(--text-3); text-align: center;
  background: var(--surface); border: 1px solid var(--hair);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
.empty.small { padding: 28px; border: none; box-shadow: none; background: transparent; }
.empty-mark { width: 40px; height: 40px; opacity: 0.4; }
.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%);
  z-index: 90; background: var(--text); color: var(--bg);
  padding: 10px 18px; border-radius: 12px; font-size: 13.5px; font-weight: 500;
  box-shadow: var(--shadow-md); animation: toastin 0.2s ease;
}
@keyframes toastin { from { opacity: 0; transform: translate(-50%, 8px); } }

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 900px) {
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .dash-grid { grid-template-columns: 1fr; }
  .tlist-head, .trow { grid-template-columns: 3px minmax(0, 1fr) 100px 66px 96px; gap: 12px; }
  .h-cat, .t-cat, .h-cust, .t-cust { display: none; }
}
@media (max-width: 560px) {
  .brand-product { display: none; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .tlist-head { display: none; }
  .trow { grid-template-columns: 3px minmax(0, 1fr) auto; grid-auto-rows: auto; }
  .h-prio, .t-cat, .t-cust, .t-assignee { display: none; }
  .grid-2, .grid-3, .ctrl-grid, .meta-box { grid-template-columns: 1fr; }
  .drawer { width: 100%; }
  .subbar { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
