:root {
    --bg: #f0f4f8;
    --surface: #ffffff;
    --surface-2: #f8fafc;
    --border: #e2e8f0;
    --border-light: #cbd5e1;
    --accent: #1d4ed8;
    --accent-dim: rgba(29,78,216,0.08);
    --green: #16a34a;
    --yellow: #b45309;
    --red: #dc2626;
    --orange: #c2410c;
    --purple: #7c3aed;
    --text: #0f172a;
    --text-2: #475569;
    --text-3: #94a3b8;
    --mono: 'IBM Plex Mono', monospace;
    --sans: 'DM Sans', sans-serif;
  }
  body { background: var(--bg); color: var(--text); font-family: var(--sans); min-height: 100vh; }
  .font-mono { font-family: var(--mono) !important; }

  /* Header */
  .site-header { background: var(--surface); border-bottom: 1px solid var(--border); }
  .wordmark { font-family: var(--mono); font-size: 11px; font-weight: 600; letter-spacing: .15em; text-transform: uppercase; color: var(--accent); }
  .page-title { font-size: 1.25rem; font-weight: 600; letter-spacing: -.02em; color: var(--text); }
  .header-meta { font-family: var(--mono); font-size: 10px; color: var(--text-3); line-height: 1.8; }

  /* Stat cards */
  .stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; }
  .stat-label { font-family: var(--mono); font-size: 9px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); margin-bottom: 4px; }
  .stat-value { font-family: var(--mono); font-size: 1.35rem; font-weight: 600; color: var(--text); }

  /* Toolbar */
  .search-box { background: var(--surface); border: 1px solid var(--border); border-radius: 6px; padding: 8px 14px; font-family: var(--mono); font-size: 12px; color: var(--text); outline: none; transition: border-color .15s; width: 100%; }
  .search-box::placeholder { color: var(--text-3); }
  .search-box:focus { border-color: var(--accent); box-shadow: none; }
  .filter-btn { background: var(--surface); border: 1px solid var(--border); border-radius: 6px; padding: 7px 12px; font-family: var(--mono); font-size: 11px; color: var(--text-2); cursor: pointer; transition: all .15s; white-space: nowrap; }
  .filter-btn:hover, .filter-btn.active { border-color: var(--accent); color: var(--accent); background: var(--accent-dim); }
  .btn-new { background: var(--accent); border: none; border-radius: 6px; padding: 8px 16px; font-family: var(--mono); font-size: 11px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: #fff; cursor: pointer; white-space: nowrap; transition: opacity .15s; }
  .btn-new:hover { opacity: .85; }

  /* Table */
  .table-card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
  .ticket-table { margin: 0; }
  .ticket-table thead { background: var(--surface-2); }
  .ticket-table th { font-family: var(--mono); font-size: 9px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); font-weight: 500; border-bottom: 1px solid var(--border) !important; padding: 11px 12px; white-space: nowrap; }
  .ticket-table td { padding: 12px; vertical-align: middle; border-bottom: 1px solid var(--border) !important; }
  .ticket-table tbody tr:last-child td { border-bottom: none !important; }
  .ticket-table tbody tr:hover { background: var(--surface-2); cursor: pointer; }
  .table-footer { display: flex; align-items: center; justify-content: space-between; padding: 11px 14px; border-top: 1px solid var(--border); background: var(--surface-2); flex-wrap: wrap; gap: 8px; }

  /* Item thumb */
  .item-thumb { width: 46px; height: 46px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--border-light); overflow: hidden; flex-shrink: 0; }
  .item-thumb img { width: 100%; height: 100%; object-fit: cover; }
  .item-name { font-size: 13px; font-weight: 500; color: var(--text); }
  .item-sub { font-family: var(--mono); font-size: 10px; color: var(--text-3); }

  /* Priority */
  .priority-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
  .priority-dot.high { background: var(--red); box-shadow: 0 0 5px var(--red); }
  .priority-dot.med  { background: var(--yellow); }
  .priority-dot.low  { background: var(--text-3); }

  /* Ticket # */
  .ticket-num { font-family: var(--mono); font-size: 12px; font-weight: 600; color: var(--accent); }

  /* Badges */
  .bu-badge { display: inline-flex; align-items: center; gap: 5px; font-family: var(--mono); font-size: 9px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; padding: 3px 8px; border-radius: 4px; white-space: nowrap; border: 1px solid transparent; }
  .bu-badge::before { content: ''; width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0; }
  .bu-badge.intake  { background: #f1f5f9; color: #475569; border-color: #e2e8f0; }
  .bu-badge.intake::before { background: #94a3b8; }
  .bu-badge.diag    { background: #ede9fe; color: var(--purple); border-color: #ddd6fe; }
  .bu-badge.diag::before { background: var(--purple); }
  .bu-badge.waiting { background: #fef3c7; color: var(--yellow); border-color: #fde68a; }
  .bu-badge.waiting::before { background: var(--yellow); }
  .bu-badge.repair  { background: #dbeafe; color: var(--accent); border-color: #bfdbfe; }
  .bu-badge.repair::before { background: var(--accent); }
  .bu-badge.qc      { background: #ffedd5; color: var(--orange); border-color: #fed7aa; }
  .bu-badge.qc::before { background: var(--orange); }
  .bu-badge.ready   { background: #dcfce7; color: var(--green); border-color: #bbf7d0; }
  .bu-badge.ready::before { background: var(--green); }
  .bu-badge.closed  { background: #f1f5f9; color: #94a3b8; border-color: #e2e8f0; }
  .bu-badge.closed::before { background: #cbd5e1; }

  /* Tech avatar */
  .tech-av { width: 28px; height: 28px; border-radius: 50%; background: #dbeafe; border: 1px solid #93c5fd; font-family: var(--mono); font-size: 10px; font-weight: 600; color: var(--accent); display: flex; align-items: center; justify-content: center; }
  .tech-av.empty { background: var(--surface-2); border: 1px dashed var(--border-light); color: var(--text-3); }

  /* Date / amount */
  .date-main { font-family: var(--mono); font-size: 11px; color: var(--text-2); }
  .date-age  { font-family: var(--mono); font-size: 10px; color: var(--text-3); }
  .date-age.urgent { color: var(--red); }
  .amount { font-family: var(--mono); font-size: 13px; font-weight: 600; color: var(--text); }
  .amount.tbd { color: var(--text-3); font-weight: 400; }

  /* Page buttons */
  .page-btn { background: var(--surface); border: 1px solid var(--border); border-radius: 4px; padding: 5px 11px; font-family: var(--mono); font-size: 11px; color: var(--text-2); cursor: pointer; }
  .page-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }

  /* Mobile cards */
  .mobile-card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 14px; cursor: pointer; transition: box-shadow .15s; text-decoration: none; color: inherit; display: block; }
  .mobile-card:hover { box-shadow: 0 2px 12px rgba(29,78,216,.1); }
  .mobile-card-footer { border-top: 1px solid var(--border); padding-top: 9px; margin-top: 10px; font-family: var(--mono); font-size: 10px; color: var(--text-3); }
  .mobile-issue { font-size: 12px; color: var(--text-2); margin-top: 3px; line-height: 1.45; }