/* ═══════════════════════════════════════════════════════════
   Multidev Design System — Helpdesk App
   ═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&display=swap');

/* ── Fontes ─────────────────────────────────────────────── */
@font-face {
  font-family: 'Big Noodle Titling';
  src: url('../fonts/BigNoodleTitling.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Big Noodle Titling';
  src: url('../fonts/BigNoodleTitling-Oblique.ttf') format('truetype');
  font-weight: 400;
  font-style: oblique;
  font-display: swap;
}

/* ── Tokens ─────────────────────────────────────────────── */
:root {
  /* Paleta canônica DS */
  --paper:   #E8ECEF;
  --paper-2: #ffffff;
  --paper-3: #f5f7f9;
  --ink:     #1A1D20;
  --ink-2:   #525c6a;
  --ink-3:   #8b96a4;
  --rule:    #d0d6de;
  --rule-2:  #e9ecf0;
  --green:   #47764A;
  --blue:    #4F6E91;
  --clay:    #A85A3C;

  /* Paleta interna (uso restrito ao ds.css) */
  --_blue-50:  #f0f4f9;
  --_blue-100: #dde7f1;
  --_blue-200: #b9cbe0;
  --_blue-500: #54749F;
  --_blue-600: #466189;
  --_blue-700: #394e6e;
  --_blue-800: #2d3e57;
  --_blue-900: #1f2c3f;
  --_blue-950: #11192a;

  --_green-400: #5a9465;
  --_green-500: #42784E;
  --_green-600: #356340;
  --_green-700: #2a4f33;

  --_n-0:   #ffffff;
  --_n-25:  #fafbfc;
  --_n-50:  #f4f6f8;
  --_n-100: #e9ecf0;
  --_n-200: #d4dae1;
  --_n-300: #b3bcc7;
  --_n-400: #8b96a4;
  --_n-500: #6b7685;
  --_n-600: #525c6a;
  --_n-700: #3d4651;
  --_n-800: #262d36;
  --_n-900: #161b22;

  /* Tipografia */
  --font-display: 'Big Noodle Titling', 'Impact', condensed, sans-serif;
  --font-sans:    'Inter', system-ui, -apple-system, sans-serif;
  --font-mono:    ui-monospace, 'SF Mono', Menlo, monospace;

  /* Escala tipográfica */
  --t-11: 11px; --t-12: 12px; --t-13: 13px; --t-14: 14px;
  --t-15: 15px; --t-16: 16px; --t-18: 18px; --t-20: 20px;
  --t-24: 24px; --t-28: 28px; --t-32: 32px; --t-40: 40px;

  /* Espaçamento (escala 4px) */
  --s-1: 4px;  --s-2: 8px;   --s-3: 12px;  --s-4: 16px;
  --s-5: 20px; --s-6: 24px;  --s-7: 28px;  --s-8: 32px;
  --s-10: 40px; --s-12: 48px; --s-16: 64px;

  /* Raios */
  --r-0: 0;
  --r-1: 4px;
  --r-2: 6px;
  --r-3: 10px;
  --r-pill: 9999px;

  /* Sombras */
  --shadow-1: 0 1px 3px rgba(0,0,0,0.07), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-2: 0 4px 16px rgba(0,0,0,0.09), 0 1px 4px rgba(0,0,0,0.05);
  --shadow-focus: 0 0 0 3px color-mix(in srgb, var(--green) 30%, transparent);
}

/* ── Reset ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  font-size: var(--t-14);
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: inherit; }

/* ═══════════════════════════════════════════════════════════
   LAYOUT
   ═══════════════════════════════════════════════════════════ */

.app { display: flex; min-height: 100vh; }

/* ── Sidebar ─────────────────────────────────────────────── */
.sidebar {
  width: 220px;
  background: var(--paper-2);
  border-right: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  z-index: 40;
}

.sidebar-logo {
  padding: var(--s-4) var(--s-5);
  border-bottom: 1px solid var(--rule-2);
  display: flex;
  align-items: center;
  gap: var(--s-2);
  flex-shrink: 0;
}
.sidebar-logo img { height: 22px; width: auto; display: block; }

.sidebar-nav {
  flex: 1;
  padding: var(--s-3);
  overflow-y: auto;
}

.sidebar-nav-section { margin-top: var(--s-5); margin-bottom: var(--s-2); padding: 0 var(--s-2); }
.sidebar-nav-section-label {
  font-family: var(--font-mono);
  font-size: var(--t-11);
  text-transform: uppercase;
  letter-spacing: 0.10em;
  color: var(--ink-3);
  font-weight: 400;
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  padding: 7px var(--s-3);
  border-radius: var(--r-2);
  font-size: var(--t-13);
  font-weight: 500;
  color: var(--ink-2);
  transition: background 140ms, color 140ms;
  margin-bottom: 1px;
}
.sidebar-nav-item:hover { background: var(--_n-50); color: var(--ink); }
.sidebar-nav-item.active { background: var(--_blue-50); color: var(--_blue-700); }
.sidebar-nav-item svg,
.sidebar-nav-item [data-lucide] { width: 15px; height: 15px; flex-shrink: 0; opacity: 0.7; }
.sidebar-nav-item.active [data-lucide] { opacity: 1; }

.sidebar-footer {
  padding: var(--s-3) var(--s-4);
  border-top: 1px solid var(--rule-2);
  flex-shrink: 0;
}
.sidebar-user { display: flex; align-items: center; gap: var(--s-2); margin-bottom: var(--s-2); }
.sidebar-avatar {
  width: 28px; height: 28px;
  border-radius: var(--r-pill);
  background: var(--_blue-100);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: var(--_blue-700);
}
.sidebar-avatar [data-lucide] { width: 14px; height: 14px; }
.sidebar-username {
  font-size: var(--t-13);
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-logout {
  display: flex; align-items: center; gap: var(--s-1);
  font-size: var(--t-12);
  color: var(--ink-3);
  transition: color 140ms;
}
.sidebar-logout:hover { color: var(--ink-2); }
.sidebar-logout [data-lucide] { width: 13px; height: 13px; }

/* ── Main content ────────────────────────────────────────── */
.main {
  flex: 1;
  margin-left: 220px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.page-header {
  background: var(--paper-2);
  border-bottom: 1px solid var(--rule);
  padding: 0 var(--s-6);
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 30;
  flex-shrink: 0;
}

.page-title {
  font-family: var(--font-display);
  font-size: var(--t-20);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--ink);
  line-height: 1;
}

.page-actions { display: flex; align-items: center; gap: var(--s-3); }

.page-body { flex: 1; padding: var(--s-6); }

/* ═══════════════════════════════════════════════════════════
   COMPONENTES
   ═══════════════════════════════════════════════════════════ */

/* ── Botões ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: 7px var(--s-4);
  border-radius: var(--r-2);
  font-size: var(--t-13);
  font-weight: 500;
  border: 1px solid transparent;
  transition: background 160ms, border-color 160ms, opacity 160ms;
  white-space: nowrap;
  line-height: 1;
  background: var(--ink);
  color: var(--paper-2);
  border-color: var(--ink);
}
.btn:hover { background: var(--_blue-900); border-color: var(--_blue-900); }
.btn [data-lucide] { width: 14px; height: 14px; flex-shrink: 0; }

.btn--secondary {
  background: var(--paper-2);
  color: var(--ink);
  border-color: var(--rule);
}
.btn--secondary:hover { background: var(--_n-50); border-color: var(--_n-300); }

.btn--accent {
  background: var(--green);
  color: var(--paper-2);
  border-color: var(--green);
}
.btn--accent:hover { background: var(--_green-600); border-color: var(--_green-600); }

.btn--ghost {
  background: transparent;
  color: var(--ink-2);
  border-color: transparent;
}
.btn--ghost:hover { background: var(--_n-100); color: var(--ink); }

.btn--danger {
  background: var(--paper-2);
  color: #dc2626;
  border-color: var(--rule);
}
.btn--danger:hover { background: #fef2f2; border-color: #fca5a5; }

.btn--sm {
  padding: 5px var(--s-3);
  font-size: var(--t-12);
}
.btn--sm [data-lucide] { width: 13px; height: 13px; }

/* ── Badges ──────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: var(--r-pill);
  font-size: var(--t-11);
  font-weight: 500;
  white-space: nowrap;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--_n-100);
  color: var(--_n-600);
}
.badge [data-lucide] { width: 11px; height: 11px; }
.badge .led {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

.badge--blue  { background: #dbeafe; color: #1d4ed8; }
.badge--ink   { background: var(--_n-100); color: var(--ink); }
.badge--clay  { background: #fde8df; color: #7c2d12; }
.badge--green { background: #d1fae5; color: var(--_green-700); }

/* ── Cards ───────────────────────────────────────────────── */
.card {
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: var(--r-3);
  box-shadow: var(--shadow-1);
}
.card__header {
  padding: var(--s-4) var(--s-6);
  border-bottom: 1px solid var(--rule-2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
}
.card__title {
  font-family: var(--font-display);
  font-size: var(--t-16);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--ink);
  line-height: 1;
  display: flex;
  align-items: center;
  gap: var(--s-2);
}
.card__title [data-lucide] { width: 15px; height: 15px; color: var(--ink-3); }
.card__body { padding: var(--s-5) var(--s-6); }

/* ── Formulários ─────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 5px; }
.field label {
  font-size: var(--t-12);
  font-weight: 500;
  color: var(--ink-2);
  letter-spacing: 0.01em;
}
.field input,
.field select,
.field textarea {
  padding: 7px 10px;
  border: 1px solid var(--rule);
  border-radius: var(--r-2);
  font-size: var(--t-13);
  color: var(--ink);
  background: var(--paper-2);
  transition: border-color 140ms, box-shadow 140ms;
  width: 100%;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: var(--shadow-focus);
}
.field textarea { resize: vertical; line-height: 1.5; }
.field .hint { font-size: var(--t-12); color: var(--ink-3); }
.field.has-error input,
.field.has-error select,
.field.has-error textarea { border-color: #dc2626; }
.field .error { font-size: var(--t-12); color: #dc2626; }

input[type="text"], input[type="email"], input[type="password"],
input[type="number"], input[type="color"], select, textarea {
  padding: 7px 10px;
  border: 1px solid var(--rule);
  border-radius: var(--r-2);
  font-size: var(--t-13);
  color: var(--ink);
  background: var(--paper-2);
  transition: border-color 140ms, box-shadow 140ms;
  width: 100%;
  font-family: var(--font-sans);
}
input[type="text"]:focus, input[type="email"]:focus,
input[type="password"]:focus, input[type="number"]:focus,
select:focus, textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: var(--shadow-focus);
}
input[type="color"] { padding: 3px 6px; height: 36px; }
input[type="checkbox"] { width: auto; }
input[type="file"] { padding: 6px 8px; font-size: var(--t-12); color: var(--ink-2); }

/* ── Tabela ──────────────────────────────────────────────── */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--t-13);
}
.data-table thead tr { background: var(--_n-50); border-bottom: 1px solid var(--rule); }
.data-table th {
  padding: 10px var(--s-4);
  text-align: left;
  font-size: var(--t-11);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--ink-3);
  white-space: nowrap;
}
.data-table tbody tr { border-bottom: 1px solid var(--rule-2); transition: background 120ms; }
.data-table tbody tr:hover { background: var(--_n-50); }
.data-table tbody tr:last-child { border-bottom: none; }
.data-table td { padding: 11px var(--s-4); color: var(--ink); vertical-align: middle; }
.data-table .col-num { width: 52px; }
.data-table .col-actions { width: 1%; white-space: nowrap; text-align: right; }
.data-table .mono { font-family: var(--font-mono); font-size: var(--t-12); color: var(--ink-3); }

/* ── Progress stepper ────────────────────────────────────── */
.stepper { display: flex; align-items: center; gap: 0; }

.stepper-connector {
  flex: 1;
  height: 2px;
  background: var(--rule);
  margin: 0 var(--s-1);
  transition: background 300ms;
}
.stepper-connector.done { background: var(--green); }

.stepper-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  position: relative;
}
.stepper-btn {
  width: 34px; height: 34px;
  border-radius: var(--r-pill);
  border: 2px solid var(--rule);
  background: var(--paper-2);
  color: var(--ink-3);
  display: flex; align-items: center; justify-content: center;
  transition: all 180ms;
  cursor: pointer;
}
.stepper-btn [data-lucide] { width: 15px; height: 15px; }
.stepper-btn:hover { border-color: var(--blue); color: var(--blue); }

.stepper-step.current .stepper-btn {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper-2);
  box-shadow: var(--shadow-1);
}
.stepper-step.done .stepper-btn {
  background: var(--green);
  border-color: var(--green);
  color: var(--paper-2);
}
.stepper-step.cancelled .stepper-btn {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #dc2626;
}

.stepper-label {
  font-size: var(--t-11);
  font-weight: 500;
  color: var(--ink-3);
  white-space: nowrap;
  text-align: center;
}
.stepper-step.current .stepper-label { color: var(--ink); font-weight: 600; }
.stepper-step.done .stepper-label    { color: var(--green); }

/* ── Timeline ────────────────────────────────────────────── */
.timeline { display: flex; flex-direction: column; gap: var(--s-4); }
.timeline-item {
  padding-left: var(--s-3);
  border-left: 2px solid var(--rule);
  font-size: var(--t-13);
}
.timeline-item.reply { border-left-color: var(--blue); }
.timeline-meta {
  display: flex; align-items: center; gap: 4px;
  font-size: var(--t-12);
  color: var(--ink-3);
  font-family: var(--font-mono);
  margin-bottom: 3px;
}
.timeline-meta [data-lucide] { width: 11px; height: 11px; }
.timeline-action { font-weight: 500; color: var(--ink); }
.timeline-item.reply .timeline-action { color: var(--blue); }
.timeline-detail { font-size: var(--t-12); color: var(--ink-3); margin-top: 2px; }

/* ── Empty state ─────────────────────────────────────────── */
.empty-state { padding: var(--s-12) var(--s-6); text-align: center; color: var(--ink-3); }
.empty-state [data-lucide] { width: 32px; height: 32px; margin: 0 auto var(--s-3); opacity: 0.4; display: block; }
.empty-state-title { font-size: var(--t-14); font-weight: 500; color: var(--ink-2); margin-bottom: 4px; }
.empty-state-desc  { font-size: var(--t-13); }

/* ── Flash messages ──────────────────────────────────────── */
.flash-messages { display: flex; flex-direction: column; gap: var(--s-2); margin-bottom: var(--s-4); }
.flash {
  display: flex; align-items: center; gap: var(--s-2);
  padding: var(--s-3) var(--s-4);
  border-radius: var(--r-2);
  font-size: var(--t-14);
  border: 1px solid transparent;
}
.flash [data-lucide] { width: 16px; height: 16px; flex-shrink: 0; }
.flash-success { background: #f0faf2; color: var(--green);  border-color: #c3e6ca; }
.flash-error   { background: #fff5f5; color: #b91c1c;       border-color: #fecaca; }
.flash-warning { background: #fffbeb; color: #92400e;       border-color: #fde68a; }
.flash-info    { background: #eff6ff; color: var(--blue);   border-color: #bfdbfe; }

/* ── Spinner ─────────────────────────────────────────────── */
.spinner {
  display: inline-block;
  width: 18px; height: 18px;
  border: 2px solid var(--rule);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Status tabs ─────────────────────────────────────────── */
.status-tabs { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-bottom: var(--s-4); }
.status-tab {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 12px;
  border-radius: var(--r-pill);
  font-size: var(--t-12);
  font-weight: 500;
  border: 1px solid var(--rule);
  background: var(--paper-2);
  color: var(--ink-2);
  transition: all 140ms;
}
.status-tab:hover { border-color: var(--_n-400); color: var(--ink); }
.status-tab.active { background: var(--ink); border-color: var(--ink); color: var(--paper-2); }
.status-tab .count { font-family: var(--font-mono); font-weight: 600; font-size: var(--t-11); opacity: 0.8; }

/* ── Filtros ─────────────────────────────────────────────── */
.filters {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3);
  padding: var(--s-3) var(--s-4);
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: var(--r-2);
  margin-bottom: var(--s-4);
}
.filters select { width: auto; padding: 5px 8px; font-size: var(--t-12); }
.filter-search { position: relative; flex: 1; min-width: 180px; }
.filter-search [data-lucide] {
  position: absolute; left: 9px; top: 50%;
  transform: translateY(-50%);
  width: 13px; height: 13px;
  color: var(--ink-3);
  pointer-events: none;
}
.filter-search input { padding-left: 28px; padding-top: 5px; padding-bottom: 5px; font-size: var(--t-12); }

/* ── Modal ───────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.65);
  display: none; align-items: center; justify-content: center;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--paper-2);
  border-radius: var(--r-3);
  box-shadow: var(--shadow-2);
  max-width: 700px; width: 100%;
  margin: var(--s-4);
  display: flex; flex-direction: column;
  max-height: 90vh;
}
.modal__header {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--s-3) var(--s-5);
  border-bottom: 1px solid var(--rule-2);
  flex-shrink: 0;
}
.modal__title {
  display: flex; align-items: center; gap: var(--s-2);
  font-size: var(--t-13); font-weight: 600; color: var(--ink);
}
.modal__title [data-lucide] { width: 15px; height: 15px; color: var(--ink-3); }
.modal__body {
  flex: 1; overflow: auto; padding: var(--s-4);
  display: flex; align-items: center; justify-content: center;
}
.modal__close {
  background: none; border: none;
  color: var(--ink-3); padding: 4px;
  border-radius: var(--r-1);
  display: flex; align-items: center;
  transition: color 140ms, background 140ms;
}
.modal__close:hover { color: var(--ink); background: var(--_n-100); }
.modal__close [data-lucide] { width: 18px; height: 18px; }

/* ── Alertas ─────────────────────────────────────────────── */
.alert {
  display: flex; align-items: flex-start; gap: var(--s-3);
  padding: var(--s-3) var(--s-4);
  border-radius: var(--r-2);
  font-size: var(--t-13);
  margin-bottom: var(--s-4);
  border: 1px solid transparent;
}
.alert.info    { background: var(--_blue-50);  border-color: var(--_blue-200); color: var(--_blue-800); }
.alert.success { background: #d1fae5; border-color: #6ee7b7; color: var(--_green-700); }
.alert.warning { background: #fef3c7; border-color: #fde68a; color: #92400e; }
.alert.danger  { background: #fee2e2; border-color: #fca5a5; color: #991b1b; }

/* ── Toggle ──────────────────────────────────────────────── */
.toggle { display: flex; align-items: center; gap: var(--s-2); cursor: pointer; }
.toggle input[type="checkbox"] {
  width: 36px; height: 20px;
  appearance: none;
  border-radius: 10px;
  border: 1px solid var(--rule);
  background: var(--_n-100);
  position: relative;
  transition: background 140ms, border-color 140ms;
  flex-shrink: 0;
  cursor: pointer;
}
.toggle input[type="checkbox"]::after {
  content: "";
  position: absolute;
  top: 2px; left: 2px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--paper-2);
  box-shadow: var(--shadow-1);
  transition: transform 140ms;
}
.toggle input[type="checkbox"]:checked { background: var(--green); border-color: var(--green); }
.toggle input[type="checkbox"]:checked::after { transform: translateX(16px); }
.toggle-label { font-size: var(--t-13); color: var(--ink); }

/* ── Login ───────────────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: var(--_blue-950);
  padding: var(--s-6);
  position: relative;
  overflow: hidden;
}
.login-page::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 50% 60% at 0% 100%, color-mix(in srgb, var(--green) 18%, transparent), transparent 60%),
    radial-gradient(ellipse 60% 50% at 100% 0%,  color-mix(in srgb, var(--blue)  20%, transparent), transparent 65%);
  pointer-events: none;
}
.login-card {
  position: relative;
  background: var(--paper-2);
  border-radius: var(--r-3);
  box-shadow: var(--shadow-2);
  padding: var(--s-8);
  width: 100%; max-width: 360px;
}
.login-logo { margin-bottom: var(--s-6); }
.login-logo img { height: 24px; width: auto; display: block; }
.login-title {
  font-family: var(--font-display);
  font-size: var(--t-28);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--ink);
  font-weight: 400;
  margin-bottom: var(--s-1);
  line-height: 1;
}
.login-subtitle { font-size: var(--t-13); color: var(--ink-3); margin-bottom: var(--s-6); }
.login-form { display: flex; flex-direction: column; gap: var(--s-4); }

/* ── Utilitários ─────────────────────────────────────────── */
.mono        { font-family: var(--font-mono); }
.text-muted  { color: var(--ink-3); }
.text-2      { color: var(--ink-2); }
.gap-2       { gap: var(--s-2); }
.sr-only     { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

.display-heading {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-weight: 400;
  line-height: 1;
}

.breadcrumb { font-size: var(--t-12); color: var(--ink-3); display: flex; align-items: center; gap: 6px; }
.breadcrumb-sep { opacity: 0.5; }

.link-action {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: var(--t-12); color: var(--ink-3);
  transition: color 140ms;
}
.link-action:hover { color: var(--blue); }
.link-action [data-lucide] { width: 12px; height: 12px; }
.link-action.danger:hover { color: #dc2626; }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s-4); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-4); }
@media (max-width: 640px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

hr.divider { border: none; border-top: 1px solid var(--rule-2); margin: var(--s-5) 0; }

.color-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; display: inline-block; }

/* ═══════════════════════════════════════════════════════════
   KANBAN
   ═══════════════════════════════════════════════════════════ */

/* Board */
.kanban-board {
  display: flex;
  gap: var(--s-4);
  overflow-x: auto;
  padding-bottom: var(--s-4);
  align-items: flex-start;
  height: calc(100vh - 120px);
}

/* Column */
.kanban-column {
  flex: 0 0 260px;
  background: var(--paper-3);
  border: 1px solid var(--rule);
  border-radius: var(--r-3);
  display: flex;
  flex-direction: column;
  max-height: 100%;
}

.kanban-column__header {
  padding: var(--s-3) var(--s-4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--rule);
  flex-shrink: 0;
}

.kanban-column__title {
  font-size: var(--t-12);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--ink-2);
}

.kanban-column__count {
  font-size: var(--t-11);
  background: var(--rule);
  color: var(--ink-3);
  border-radius: var(--r-pill);
  padding: 1px 7px;
  font-weight: 500;
}

.kanban-column__cards {
  padding: var(--s-3);
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  overflow-y: auto;
  flex: 1;
  min-height: 80px;
}

/* Collapsed section (cancelled) */
.kanban-column__collapse-toggle {
  font-size: var(--t-12);
  color: var(--ink-3);
  background: none;
  border: none;
  padding: var(--s-2) var(--s-4);
  cursor: pointer;
  width: 100%;
  text-align: left;
  border-top: 1px solid var(--rule);
}
.kanban-column__collapse-toggle:hover { color: var(--ink-2); }

/* Card */
.kanban-card {
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--ink-3);
  border-radius: var(--r-2);
  padding: var(--s-3);
  cursor: grab;
  box-shadow: var(--shadow-1);
  transition: box-shadow 0.15s;
}
.kanban-card:hover { box-shadow: var(--shadow-2); }
.kanban-card:active { cursor: grabbing; }

/* Priority border colors */
.kanban-card[data-priority="urgent"] { border-left-color: #c0392b; }
.kanban-card[data-priority="high"]   { border-left-color: #e67e22; }
.kanban-card[data-priority="medium"] { border-left-color: var(--blue); }
.kanban-card[data-priority="low"]    { border-left-color: var(--ink-3); }

/* Card ghost (SortableJS) */
.kanban-card--ghost {
  opacity: 0.4;
  background: var(--_blue-100);
}

/* Card header */
.kanban-card__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--s-1);
}

.kanban-card__id {
  font-size: var(--t-11);
  color: var(--ink-3);
  font-weight: 500;
}

/* Priority badges */
.kanban-card__priority {
  font-size: var(--t-11);
  font-weight: 600;
  border-radius: var(--r-1);
  padding: 1px 5px;
}
.kanban-card__priority[data-priority="urgent"] { color: #c0392b; background: #c0392b15; }
.kanban-card__priority[data-priority="high"]   { color: #e67e22; background: #e67e2215; }
.kanban-card__priority[data-priority="medium"] { color: var(--blue); background: var(--_blue-50); }
.kanban-card__priority[data-priority="low"]    { color: var(--ink-3); background: var(--_n-100); }

/* Card title */
.kanban-card__title {
  display: block;
  font-size: var(--t-13);
  font-weight: 600;
  color: var(--ink);
  line-height: 1.35;
  margin-bottom: var(--s-1);
}
.kanban-card__title:hover { color: var(--blue); }

/* Card client */
.kanban-card__client {
  font-size: var(--t-12);
  color: var(--ink-3);
  margin-bottom: var(--s-2);
}

/* Card tags */
.kanban-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-1);
  margin-bottom: var(--s-2);
}

/* Card age */
.kanban-card__age {
  font-size: var(--t-11);
  color: var(--ink-3);
}
.kanban-card__age--stale {
  color: #c0392b;
  font-weight: 500;
}

/* Filters bar */
.kanban-filters {
  display: flex;
  gap: var(--s-3);
  align-items: center;
  padding: var(--s-3) 0 var(--s-4);
}

/* Toast */
.kanban-toast {
  position: fixed;
  bottom: var(--s-6);
  right: var(--s-6);
  background: var(--ink);
  color: var(--_n-0);
  font-size: var(--t-13);
  padding: var(--s-3) var(--s-4);
  border-radius: var(--r-2);
  box-shadow: var(--shadow-2);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
  z-index: 1000;
}
.kanban-toast--visible {
  opacity: 1;
  transform: translateY(0);
}
