/* hidden attribute must override any display property */
[hidden] { display: none !important; }

/* Lisa — Design System tokens */
:root {
  --ink-900: oklch(0.18 0.005 60);
  --ink-800: oklch(0.25 0.005 60);
  --ink-700: oklch(0.32 0.005 60);
  --ink-600: oklch(0.45 0.005 60);
  --ink-500: oklch(0.55 0.005 60);
  --ink-400: oklch(0.66 0.005 60);
  --ink-300: oklch(0.78 0.005 60);
  --ink-200: oklch(0.88 0.005 60);
  --ink-150: oklch(0.91 0.005 60);
  --ink-100: oklch(0.94 0.005 60);
  --ink-75:  oklch(0.96 0.005 60);
  --ink-50:  oklch(0.975 0.005 60);
  --paper:   oklch(0.995 0.003 80);

  --accent:        oklch(0.42 0.08 160);
  --accent-strong: oklch(0.34 0.09 160);
  --accent-soft:   oklch(0.94 0.03 160);
  --accent-ink:    oklch(0.99 0.005 80);

  --ok:     oklch(0.55 0.10 150);
  --ok-bg:  oklch(0.95 0.03 150);
  --warn:   oklch(0.62 0.13 80);
  --warn-bg:oklch(0.95 0.05 80);
  --danger: oklch(0.55 0.18 28);
  --danger-bg: oklch(0.95 0.05 28);
  --info:   oklch(0.50 0.10 235);
  --info-bg:oklch(0.95 0.03 235);

  /* CNPJ tags */
  --cnpj-old: oklch(0.45 0.10 240);
  --cnpj-old-bg: oklch(0.95 0.03 240);
  --cnpj-pat: oklch(0.55 0.15 28);
  --cnpj-pat-bg: oklch(0.95 0.04 28);
  --cnpj-ser: oklch(0.55 0.13 80);
  --cnpj-ser-bg: oklch(0.95 0.04 80);
  --cnpj-new: oklch(0.45 0.10 160);
  --cnpj-new-bg: oklch(0.94 0.03 160);

  /* density */
  --row-h: 40px;
  --pad-y: 12px;
  --pad-x: 16px;
  --card-pad: 20px;

  --radius: 6px;
  --radius-sm: 4px;
  --radius-lg: 10px;

  --font-sans: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --sidebar-w: 240px;
  --sidebar-w-collapsed: 56px;
  --header-h: 56px;
  --breadcrumb-h: 40px;
}

[data-density="compact"] {
  --row-h: 32px;
  --pad-y: 6px;
  --pad-x: 12px;
  --card-pad: 16px;
}
[data-density="airy"] {
  --row-h: 48px;
  --pad-y: 16px;
  --pad-x: 20px;
  --card-pad: 24px;
}

[data-theme="dark"] {
  --ink-900: oklch(0.97 0.005 60);
  --ink-800: oklch(0.92 0.005 60);
  --ink-700: oklch(0.82 0.005 60);
  --ink-600: oklch(0.65 0.005 60);
  --ink-500: oklch(0.55 0.005 60);
  --ink-400: oklch(0.42 0.005 60);
  --ink-300: oklch(0.32 0.005 60);
  --ink-200: oklch(0.26 0.005 60);
  --ink-150: oklch(0.23 0.005 60);
  --ink-100: oklch(0.21 0.005 60);
  --ink-75:  oklch(0.20 0.005 60);
  --ink-50:  oklch(0.155 0.005 60);
  --paper:   oklch(0.185 0.005 60);

  --accent:        oklch(0.70 0.10 160);
  --accent-strong: oklch(0.78 0.10 160);
  --accent-soft:   oklch(0.28 0.05 160);
  --accent-ink:    oklch(0.15 0.005 60);

  --ok-bg:    oklch(0.27 0.04 150);
  --warn-bg:  oklch(0.28 0.05 80);
  --danger-bg:oklch(0.28 0.06 28);
  --info-bg:  oklch(0.27 0.05 235);

  --cnpj-old: oklch(0.72 0.10 240);
  --cnpj-old-bg: oklch(0.27 0.05 240);
  --cnpj-pat: oklch(0.75 0.13 28);
  --cnpj-pat-bg: oklch(0.27 0.05 28);
  --cnpj-ser: oklch(0.78 0.13 80);
  --cnpj-ser-bg: oklch(0.27 0.05 80);
  --cnpj-new: oklch(0.72 0.10 160);
  --cnpj-new-bg: oklch(0.27 0.05 160);
}

/* Accent overrides */
[data-accent="blue"]   { --accent: oklch(0.42 0.12 250); --accent-strong: oklch(0.34 0.13 250); --accent-soft: oklch(0.94 0.04 250); }
[data-accent="indigo"] { --accent: oklch(0.42 0.14 280); --accent-strong: oklch(0.34 0.15 280); --accent-soft: oklch(0.94 0.04 280); }
[data-accent="ember"]  { --accent: oklch(0.55 0.13 50);  --accent-strong: oklch(0.46 0.14 50);  --accent-soft: oklch(0.95 0.04 50); }
[data-theme="dark"][data-accent="blue"]   { --accent: oklch(0.72 0.10 250); --accent-soft: oklch(0.28 0.06 250); }
[data-theme="dark"][data-accent="indigo"] { --accent: oklch(0.72 0.11 280); --accent-soft: oklch(0.28 0.06 280); }
[data-theme="dark"][data-accent="ember"]  { --accent: oklch(0.78 0.12 50);  --accent-soft: oklch(0.28 0.06 50); }

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink-900);
  background: var(--ink-50);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
}

button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }

.mono, .num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.num { text-align: right; }

/* ============== APP SHELL ============== */
.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
  transition: grid-template-columns 0.2s ease;
}
.app[data-collapsed="true"] {
  grid-template-columns: var(--sidebar-w-collapsed) 1fr;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  background: var(--paper);
  border-right: 1px solid var(--ink-200);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.sidebar-brand {
  text-decoration: none;
  height: var(--header-h);
  display: flex;
  align-items: center;
  padding: 0 16px;
  border-bottom: 1px solid var(--ink-200);
  gap: 7px;
}
.sidebar-brand-mark {
  width: 35px;
  height: 35px;
  color: var(--paper);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}
.sidebar-brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.sidebar-brand-name { font-weight: 600; font-size: 14px; color: var(--ink-900); }
.sidebar-brand-sub { font-size: 11px; color: var(--ink-500); }
[data-collapsed="true"] .sidebar-brand-text { display: none; }

.sidebar-nav { flex: 1; overflow-y: auto; padding: 12px 0; }
.sidebar-section-label {
  font-size: 11px;
  color: var(--ink-500);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 500;
  padding: 16px 16px 6px;
}
[data-collapsed="true"] .sidebar-section-label { display: none; }
.sidebar-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  height: 36px;
  font-size: 13.5px;
  color: var(--ink-700);
  border-left: 2px solid transparent;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
.sidebar-item:hover { background: var(--ink-75); color: var(--ink-900); }
.sidebar-item[aria-current="true"] {
  background: var(--ink-100);
  color: var(--ink-900);
  border-left-color: var(--accent);
  font-weight: 500;
}
.sidebar-item svg { width: 18px; height: 18px; flex-shrink: 0; stroke-width: 1.5; }
[data-collapsed="true"] .sidebar-item-label { display: none; }
[data-collapsed="true"] .sidebar-item { justify-content: center; padding: 0; }

.sidebar-footer {
  border-top: 1px solid var(--ink-200);
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar-footer-user {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--ink-200); color: var(--ink-700);
  display: grid; place-items: center; font-size: 12px; font-weight: 600;
  flex-shrink: 0;
}
.sidebar-footer-info { line-height: 1.2; flex: 1; min-width: 0; }
.sidebar-footer-name { font-size: 13px; font-weight: 500; color: var(--ink-900); }
.sidebar-footer-sub { font-size: 11px; color: var(--ink-500); }
[data-collapsed="true"] .sidebar-footer-info { display: none; }
[data-collapsed="true"] .sidebar-footer { justify-content: center; }

/* ============== MAIN ============== */
.main { display: flex; flex-direction: column; min-width: 0; }
.topbar {
  height: var(--header-h);
  border-bottom: 1px solid var(--ink-200);
  background: var(--paper);
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 10;
}
.topbar-collapse {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  background: transparent; border: none; border-radius: 6px;
  color: var(--ink-700);
}
.topbar-collapse:hover { background: var(--ink-100); }

.topbar-search {
  flex: 1;
  max-width: 480px;
  display: flex; align-items: center; gap: 8px;
  background: var(--ink-75);
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 6px 10px;
  color: var(--ink-600);
}
.topbar-search:focus-within { border-color: var(--ink-300); background: var(--paper); }
.topbar-search input { background: transparent; border: none; outline: none; flex: 1; }
.topbar-search kbd {
  font-family: var(--font-mono);
  font-size: 11px;
  background: var(--ink-100);
  border: 1px solid var(--ink-200);
  border-radius: 4px;
  padding: 1px 5px;
  color: var(--ink-600);
}

.topbar-spacer { flex: 1; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  background: transparent; border: 1px solid transparent;
  border-radius: 6px;
  color: var(--ink-700);
}
.icon-btn:hover { background: var(--ink-100); }
.icon-btn svg { width: 18px; height: 18px; stroke-width: 1.5; }

.period-pill {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--ink-700);
  background: var(--ink-75);
  border: 1px solid var(--ink-200);
  border-radius: 6px;
  padding: 5px 10px;
}
.period-pill .mono { font-size: 12px; color: var(--ink-900); font-weight: 500; }

.breadcrumb {
  height: var(--breadcrumb-h);
  border-bottom: 1px solid var(--ink-200);
  background: var(--paper);
  display: flex; align-items: center;
  padding: 0 20px;
  gap: 6px;
  font-size: 13px;
  color: var(--ink-600);
}
.breadcrumb-item { color: var(--ink-600); cursor: pointer; }
.breadcrumb-item:hover { color: var(--ink-900); }
.breadcrumb-item[aria-current="true"] { color: var(--ink-900); font-weight: 500; cursor: default; }
.breadcrumb-sep { color: var(--ink-400); }

.page-content {
  padding: 20px 24px 60px;
  min-width: 0;
}
.page-actions { display: flex; gap: 8px; flex-shrink: 0; }

/* ============== BUTTONS ============== */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 12px;
  border-radius: 6px;
  font-size: 13px; font-weight: 500;
  border: 1px solid var(--ink-300);
  background: var(--paper);
  color: var(--ink-900);
  white-space: nowrap;
}
.btn:hover { background: var(--ink-75); }
.btn svg { width: 14px; height: 14px; stroke-width: 1.75; }
.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--ink-700); }
.btn-ghost:hover { background: var(--ink-100); color: var(--ink-900); }
.btn-danger { color: var(--danger); border-color: var(--ink-300); }
.btn-danger:hover { background: var(--danger-bg); border-color: var(--danger); }
.btn-sm { height: 26px; padding: 0 8px; font-size: 12px; }
.btn-lg { height: 38px; padding: 0 16px; font-size: 14px; }

/* ============== CARDS ============== */
.card {
  background: var(--paper);
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-lg);
}
.card-header {
  padding: 14px var(--card-pad);
  border-bottom: 1px solid var(--ink-200);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.card-title { font-size: 14px; font-weight: 600; margin: 0; color: var(--ink-900); }
.card-sub { font-size: 12px; color: var(--ink-500); margin: 2px 0 0; }
.card-body { padding: var(--card-pad); }
.card-body.no-pad { padding: 0; }

/* ============== KPI ============== */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.kpi {
  background: var(--paper);
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  display: flex; flex-direction: column; gap: 4px;
}
.kpi-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 500; color: var(--ink-500); }
.kpi-value { font-size: 26px; font-weight: 600; color: var(--ink-900); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.kpi-value .currency { font-size: 13px; color: var(--ink-500); font-weight: 500; margin-right: 4px; }
.kpi-meta { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-600); margin-top: 2px; }
.kpi-delta { font-size: 12px; font-weight: 500; }
.kpi-delta.up { color: var(--ok); }
.kpi-delta.down { color: var(--danger); }
.kpi-delta.neutral { color: var(--ink-600); }

/* ============== TABLE ============== */
.table-wrap { overflow-x: auto; border-radius: var(--radius-lg); }
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.table thead th {
  text-align: left;
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-500);
  background: var(--ink-50);
  padding: 8px var(--pad-x);
  border-bottom: 1px solid var(--ink-200);
  position: sticky;
  top: 0;
  white-space: nowrap;
}
.table thead th.num { text-align: right; }
.table tbody td {
  padding: var(--pad-y) var(--pad-x);
  border-bottom: 1px solid var(--ink-150);
  height: var(--row-h);
  color: var(--ink-800);
  vertical-align: middle;
}
.table tbody td.num { font-variant-numeric: tabular-nums; text-align: right; font-family: var(--font-mono); }
.table tbody tr:hover { background: var(--ink-75); }
.table tbody tr[aria-selected="true"] { background: var(--accent-soft); }
.table tbody tr.muted td { color: var(--ink-500); }
.table tbody tr.clickable { cursor: pointer; }
.table td .primary { font-weight: 500; color: var(--ink-900); }
.table td .meta { font-size: 12px; color: var(--ink-500); }

/* ============== TAGS / PILLS ============== */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  height: 22px;
  padding: 0 8px;
  border-radius: 11px;
  font-size: 11.5px;
  font-weight: 500;
  font-family: var(--font-mono);
  letter-spacing: 0;
  white-space: nowrap;
  border: 1px solid currentColor;
}
.pill.solid { border-color: transparent; }
.pill.ghost { background: transparent; }
.pill.tag-old { color: var(--cnpj-old); background: var(--cnpj-old-bg); }
.pill.tag-pat { color: var(--cnpj-pat); background: var(--cnpj-pat-bg); }
.pill.tag-ser { color: var(--cnpj-ser); background: var(--cnpj-ser-bg); }
.pill.tag-new { color: var(--cnpj-new); background: var(--cnpj-new-bg); }
.pill.status-ok    { color: var(--ok); background: var(--ok-bg); }
.pill.status-warn  { color: var(--warn); background: var(--warn-bg); }
.pill.status-danger{ color: var(--danger); background: var(--danger-bg); }
.pill.status-info  { color: var(--info); background: var(--info-bg); }
.pill.neutral { color: var(--ink-700); background: var(--ink-100); }
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* sans pill for status text */
.pill.sans { font-family: var(--font-sans); font-size: 12px; }

/* ============== TABS ============== */
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--ink-200);
  margin-bottom: 20px;
}
.tab {
  padding: 10px 14px;
  font-size: 13.5px;
  color: var(--ink-600);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
  font-weight: 500;
}
.tab:hover { color: var(--ink-900); }
.tab[aria-selected="true"] {
  color: var(--ink-900);
  border-bottom-color: var(--accent);
}
.tab-count {
  display: inline-block;
  background: var(--ink-100);
  color: var(--ink-600);
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 9px;
  margin-left: 6px;
  font-weight: 500;
}
.tab[aria-selected="true"] .tab-count { background: var(--accent-soft); color: var(--accent); }

/* ============== FILTERS ============== */
.filters {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--ink-200);
  background: var(--paper);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  flex-wrap: wrap;
}
.filter-input {
  display: flex; align-items: center; gap: 6px;
  height: 30px;
  padding: 0 10px;
  border: 1px solid var(--ink-200);
  border-radius: 6px;
  background: var(--paper);
  color: var(--ink-800);
  font-size: 13px;
}
.filter-input input, .filter-input select {
  background: transparent; border: none; outline: none; min-width: 0;
}
.filter-input svg { width: 14px; height: 14px; color: var(--ink-500); }

/* ============== MODAL ============== */
.modal-overlay {
  position: fixed; inset: 0;
  background: oklch(0.18 0.005 60 / 0.4);
  display: grid; place-items: center;
  z-index: 100;
  padding: 24px;
}
.modal {
  background: var(--paper);
  border: 1px solid var(--ink-300);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  display: flex; flex-direction: column;
  box-shadow: 0 20px 50px oklch(0.18 0.005 60 / 0.25);
}
.modal.wide { max-width: 880px; }
.modal-header {
  padding: 18px 20px;
  border-bottom: 1px solid var(--ink-200);
  display: flex; align-items: center; justify-content: space-between;
}
.modal-title { font-size: 16px; font-weight: 600; margin: 0; }
.modal-body { padding: 20px; overflow-y: auto; flex: 1; }
.modal-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--ink-200);
  display: flex; justify-content: flex-end; gap: 8px;
}

/* ============== FORM ============== */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field-label { font-size: 12px; font-weight: 500; color: var(--ink-700); }
.field-hint { font-size: 11.5px; color: var(--ink-500); margin-top: 2px; }
.field-input,
.field-select,
.field-textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--ink-200);
  border-radius: 6px;
  background: var(--paper);
  color: var(--ink-900);
  font-size: 13.5px;
  outline: none;
}
.field-input:focus, .field-select:focus, .field-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-row-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }

/* ============== EMPTY STATE ============== */
.empty {
  padding: 60px 20px;
  text-align: center;
  color: var(--ink-500);
}
.empty-title { font-size: 14px; font-weight: 500; color: var(--ink-700); margin-bottom: 4px; }

/* ============== UTILS ============== */
.row { display: flex; gap: 12px; align-items: center; }
.col { display: flex; flex-direction: column; gap: 4px; }
.grow { flex: 1; }
.muted { color: var(--ink-500); }
.text-sm { font-size: 12.5px; }
.divider { height: 1px; background: var(--ink-200); }
.vdivider { width: 1px; background: var(--ink-200); align-self: stretch; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.tnums { font-variant-numeric: tabular-nums; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mb-4 { margin-bottom: 16px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-tomador { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; }

/* ============== DETAIL HEADER ============== */
.detail-head {
  background: var(--paper);
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-bottom: 20px;
}
.detail-head .top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 12px; }
.detail-head h1 { font-size: 22px; font-weight: 600; margin: 0; }
.detail-head .meta-row { display: flex; gap: 24px; flex-wrap: wrap; }
.meta-pair { display: flex; flex-direction: column; gap: 2px; }
.meta-pair-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-500); font-weight: 500; }
.meta-pair-value { font-size: 13.5px; color: var(--ink-900); font-weight: 500; }
.meta-pair-value.mono { font-size: 13px; }

/* drag handle */
.drag-handle {
  cursor: grab;
  color: var(--ink-400);
  display: inline-flex; align-items: center;
}
.drag-handle:active { cursor: grabbing; color: var(--ink-600); }

/* progress bar */
.bar { height: 4px; background: var(--ink-150); border-radius: 2px; overflow: hidden; }
.bar > div { height: 100%; background: var(--accent); }

/* timeline */
.timeline { display: flex; flex-direction: column; gap: 0; }
.timeline-item {
  display: grid; grid-template-columns: 100px 1fr; gap: 16px;
  padding: 12px 0;
  border-bottom: 1px dashed var(--ink-200);
}
.timeline-item:last-child { border-bottom: none; }
.timeline-when { font-size: 12px; color: var(--ink-500); font-family: var(--font-mono); padding-top: 2px; }
.timeline-what { font-size: 13.5px; color: var(--ink-800); }
.timeline-what .who { font-weight: 500; color: var(--ink-900); }

/* calendar */
.cal { display: grid; grid-template-columns: 220px repeat(31, 1fr); border-top: 1px solid var(--ink-200); }
.cal-cell {
  border-right: 1px solid var(--ink-150);
  border-bottom: 1px solid var(--ink-150);
  min-height: 30px;
  display: grid; place-items: center;
  font-size: 11px;
  font-family: var(--font-mono);
}
.cal-name {
  border-right: 1px solid var(--ink-200);
  border-bottom: 1px solid var(--ink-150);
  padding: 6px 10px;
  display: flex; align-items: center; gap: 8px;
  font-size: 13px;
  white-space: nowrap;
}
.cal-header { background: var(--ink-50); color: var(--ink-500); font-weight: 500; }
.cal-cell.w { background: var(--accent-soft); color: var(--accent-strong); }
.cal-cell.f { color: var(--ink-400); }
.cal-cell.sat, .cal-cell.sun { background: var(--ink-75); }
.cal-cell.holiday { background: var(--warn-bg); color: var(--warn); }
.cal-cell.absent { background: var(--danger-bg); color: var(--danger); }

/* upload dropzone */
.dropzone {
  border: 2px dashed var(--ink-300);
  border-radius: var(--radius-lg);
  padding: 40px 20px;
  text-align: center;
  background: var(--ink-50);
  color: var(--ink-600);
}
.dropzone strong { color: var(--ink-900); }

/* import preview row */
.diff-row {
  display: grid;
  grid-template-columns: 32px 1fr 1fr 1fr 120px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--ink-150);
  align-items: center;
  gap: 12px;
  font-size: 13px;
}
.diff-row.head { background: var(--ink-50); font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-500); font-weight: 500; }
.diff-row .delta { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.diff-row .delta.pos { color: var(--ok); }
.diff-row .delta.neg { color: var(--danger); }

/* checkbox */
.chk { width: 16px; height: 16px; border: 1.5px solid var(--ink-300); border-radius: 3px; display: inline-grid; place-items: center; cursor: pointer; background: var(--paper); }
.chk.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

/* avatar */
.avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--ink-200);
  color: var(--ink-700);
  display: grid; place-items: center;
  font-size: 11px; font-weight: 600;
  flex-shrink: 0;
}

/* payment plan column */
.plan-col {
  background: var(--paper);
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-lg);
  display: flex; flex-direction: column;
  min-height: 400px;
}
.plan-col-head { padding: 14px 16px; border-bottom: 1px solid var(--ink-200); }
.plan-col-body { padding: 8px; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.plan-row {
  display: grid; grid-template-columns: 16px 1fr auto; gap: 10px;
  padding: 8px 10px;
  background: var(--ink-50);
  border-radius: 6px;
  align-items: center;
  font-size: 13px;
}
.plan-row:hover { background: var(--ink-100); }

/* scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--ink-200); border-radius: 5px; border: 2px solid var(--ink-50); }
::-webkit-scrollbar-thumb:hover { background: var(--ink-300); }

/* mini bar chart in dashboard */
.minibar { display: flex; align-items: flex-end; gap: 4px; height: 60px; }
.minibar > div { flex: 1; background: var(--accent); opacity: 0.7; border-radius: 2px 2px 0 0; min-height: 4px; }
.minibar > div.now { background: var(--accent-strong); opacity: 1; }

/* spine sparkline-ish progress */
.priority-meter {
  display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 4px;
}
.priority-meter > div {
  height: 6px;
  border-radius: 2px;
  background: var(--ink-150);
}
.priority-meter > div.on { background: var(--accent); }

/* Flash messages */
.flash { padding: 10px 20px; font-size: 13px; display: flex; align-items: center; gap: 8px; }
.flash-notice { background: var(--ok-bg); color: var(--ok); border-bottom: 1px solid var(--ok); }
.flash-alert  { background: var(--danger-bg); color: var(--danger); border-bottom: 1px solid var(--danger); }

/* Sidebar link wrapper */
a.sidebar-item, a.sidebar-item:visited { text-decoration: none; display: flex; align-items: center; gap: 12px; padding: 0 16px; height: 36px; font-size: 13.5px; color: var(--ink-700); border-left: 2px solid transparent; cursor: pointer; user-select: none; white-space: nowrap; }
a.sidebar-item:hover { background: var(--ink-75); color: var(--ink-900); }
a.sidebar-item[aria-current="true"] { background: var(--ink-100); color: var(--ink-900); border-left-color: var(--accent); font-weight: 500; }
[data-collapsed="true"] a.sidebar-item { justify-content: center; padding: 0; }

/* ── Form aliases (Rails views → design system) ────────────────────────── */
.form-group          { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.form-label          { font-size: 12px; font-weight: 500; color: var(--ink-700); }
.form-input,
.form-select         { width: 100%; padding: 8px 10px; border: 1px solid var(--ink-200);
                       border-radius: 6px; background: var(--paper); font-size: 13.5px;
                       font-family: inherit; color: var(--ink-900);
                       transition: border-color 0.15s, box-shadow 0.15s; }
.form-textarea       { width: 100%; padding: 8px 10px; border: 1px solid var(--ink-200);
                       border-radius: 6px; background: var(--paper); font-size: 13.5px;
                       font-family: inherit; color: var(--ink-900); resize: vertical;
                       transition: border-color 0.15s, box-shadow 0.15s; }
.form-input:focus,
.form-select:focus,
.form-textarea:focus { outline: none; border-color: var(--accent);
                       box-shadow: 0 0 0 3px var(--accent-soft); }
.form-input.mono,
.form-select.mono    { font-family: var(--mono); font-size: 13px; }
.form-checkbox       { width: 16px; height: 16px; cursor: pointer;
                       accent-color: var(--accent); }
select.form-input,
select.form-select   { appearance: auto; }

/* ── Espaçamento geral das páginas ─────────────────────────────────────── */
.page-header         { display: flex; align-items: flex-start; justify-content: space-between;
                       gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-title          { font-size: 22px; font-weight: 700; color: var(--ink-900); margin: 0; line-height: 1.2; }
.page-subtitle       { font-size: 13px; color: var(--ink-500); margin: 4px 0 0; }

/* ── Ajustes de table ───────────────────────────────────────────────────── */
.table               { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table thead tr      { border-bottom: 1px solid var(--border); }
.table th            { padding: 10px 14px; text-align: left; font-size: 11.5px; font-weight: 600;
                       color: var(--ink-500); text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
.table td            { padding: 11px 14px; color: var(--ink-800); border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: var(--ink-50); }

/* ── Período dropdown ────────────────────────────────────────────────────── */
.period-pill         { display: flex; align-items: center; gap: 6px; padding: 6px 12px;
                       border-radius: 20px; border: 1px solid var(--ink-200); background: var(--surface-2);
                       font-size: 13px; color: var(--ink-700); cursor: pointer; user-select: none; }
.period-pill:hover   { background: var(--ink-100); border-color: var(--ink-300); }
.period-dropdown     { position: absolute; top: calc(100% + 8px); right: 0;
                       background: var(--paper); border: 1px solid var(--ink-200); border-radius: 10px;
                       box-shadow: 0 8px 24px oklch(0.18 0.005 60 / 0.14); min-width: 160px;
                       z-index: 200; padding: 6px; }
.period-dropdown .btn { display: flex; width: 100%; justify-content: flex-start;
                        border-radius: 6px; font-variant-numeric: tabular-nums; }

/* ── Tokens ausentes ─────────────────────────────────────────────────────── */
:root { --surface-2: var(--ink-75); }
[data-theme="dark"] { --surface-2: var(--ink-100); }

/* ── Sidebar versão no rodapé ────────────────────────────────────────────── */
.sidebar-footer-version {
  font-size: 11px; font-family: var(--font-mono);
  color: var(--ink-400); padding: 0 16px;
}
[data-collapsed="true"] .sidebar-footer-version { display: none; }

/* ── Topbar avatar ───────────────────────────────────────────────────────── */
.topbar-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--ink-900); color: var(--paper);
  font-size: 11px; font-weight: 600;
  display: grid; place-items: center;
  border: none; cursor: pointer; flex-shrink: 0;
  font-family: var(--font-sans);
}
.topbar-avatar:hover { opacity: 0.85; }

/* ── Theme toggle icons ──────────────────────────────────────────────────── */
.theme-icon-dark                    { display: none; }
[data-theme="dark"] .theme-icon-light { display: none; }
[data-theme="dark"] .theme-icon-dark  { display: inline-flex; }

/* ── Dock (desktop: oculto) ─────────────────────────────────────────────── */
.dock { display: none; }

/* ── Profile page ────────────────────────────────────────────────────────── */
.content-padded { max-width: 640px; width: 100%; }

.profile-cover {
  height: 72px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  position: relative;
}
.profile-avatar-wrap {
  position: absolute;
  bottom: -28px; left: 24px;
  width: 64px; height: 64px;
  border-radius: 50%;
  border: 3px solid var(--paper);
  overflow: hidden;
  background: var(--accent-soft);
}
.profile-avatar-img { width: 100%; height: 100%; object-fit: cover; }
.profile-avatar-initials {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
}

.card-section-label {
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--ink-500);
  margin-bottom: 14px;
  padding: 16px 20px 0;
}

.profile-dl { list-style: none; margin: 0; padding: 0 20px 20px; }
.profile-dl-row {
  display: flex; align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--ink-150);
  gap: 16px;
}
.profile-dl-row:last-child { border-bottom: none; }
.profile-dl-row dt { font-size: 12px; color: var(--ink-500); min-width: 180px; flex-shrink: 0; }
.profile-dl-row dd { font-size: 13px; color: var(--ink-900); margin: 0; }

.profile-upload-row { display: flex; align-items: center; gap: 16px; padding: 16px 20px; }
.profile-upload-preview {
  width: 72px; height: 72px;
  border-radius: 50%;
  border: 2px solid var(--ink-200);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--accent-soft);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 700; color: var(--accent);
}
.profile-upload-actions { display: flex; flex-direction: column; gap: 6px; }
.profile-upload-label { cursor: pointer; }

/* ── Form sections ────────────────────────────────────────────────────────── */
.form-section { padding: 0 20px 20px; }
.form-section-label {
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--ink-500);
  margin-bottom: 14px;
  padding-top: 16px;
}
.form-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.form-field:last-child { margin-bottom: 0; }
.form-hint { font-size: 11px; color: var(--ink-400); margin: 0; }
.form-actions { display: flex; gap: 8px; padding: 0 20px 20px; }

/* ── Toggle switch ────────────────────────────────────────────────────────── */
.toggle-label {
  display: flex; align-items: center; gap: 10px; cursor: pointer;
}
.toggle-input { display: none; }
.toggle-track {
  width: 36px; height: 20px;
  background: var(--ink-300);
  border-radius: 10px;
  position: relative;
  transition: background 0.2s;
  flex-shrink: 0;
}
.toggle-track::after {
  content: "";
  position: absolute;
  top: 3px; left: 3px;
  width: 14px; height: 14px;
  background: white;
  border-radius: 50%;
  transition: transform 0.2s;
}
.toggle-input:checked + .toggle-track { background: var(--accent); }
.toggle-input:checked + .toggle-track::after { transform: translateX(16px); }
.toggle-hint { font-size: 13px; color: var(--ink-700); }

/* ── Mobile ─────────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .topbar { padding: 0 8px; gap: 8px; }
  .topbar-search { display: none; }
  .topbar-collapse { display: none; }
  .main { padding-bottom: 0; }
  .page-content { padding: 12px 16px 80px; }

  /* Tables: scroll horizontal */
  .card-body, .card-body.no-pad, .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .table { min-width: 480px; }

  /* KPIs: 2 colunas no mobile */
  .kpis { grid-template-columns: 1fr 1fr; }

  /* Profile */
  .profile-dl-row { flex-wrap: wrap; }
  .profile-dl-row dt { min-width: unset; width: 100%; margin-bottom: 2px; }

  /* Formulários */
  .form-actions { flex-direction: column; }
  .form-actions .btn { width: 100%; justify-content: center; }

  .dock {
    display: flex;
    position: fixed; bottom: 0; left: 0; right: 0;
    height: 60px;
    background: var(--paper);
    border-top: 1px solid var(--ink-200);
    z-index: 50;
    justify-content: space-around;
    align-items: stretch;
    padding: 0 4px;
    padding-bottom: env(safe-area-inset-bottom);
  }
  .dock-item {
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 3px; flex: 1;
    font-size: 10px; color: var(--ink-500);
    text-decoration: none; border-radius: 8px; padding: 6px 0;
  }
  .dock-item svg { width: 22px; height: 22px; }
  .dock-item.active { color: var(--accent); }
  .dock-item:hover  { color: var(--ink-900); }
}

/* ── Dashboard layout ────────────────────────────────────────────────────── */
.dash-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.dash-row {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 20px;
  margin-bottom: 20px;
}
@media (max-width: 900px) {
  .dash-row { grid-template-columns: 1fr; }
  .dash-kpis { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .dash-kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
}

/* ── Search results ──────────────────────────────────────────────────────── */
.search-section {
  margin-bottom: 28px;
}
.search-section-header {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--ink-500);
  margin-bottom: 10px;
}
.search-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; height: 18px;
  padding: 0 6px;
  background: var(--ink-150);
  color: var(--ink-600);
  border-radius: 9px;
  font-size: 11px; font-weight: 600;
}
.search-empty-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 80px 24px;
  text-align: center;
  color: var(--ink-400);
}
.search-empty-icon { margin-bottom: 16px; opacity: 0.3; }
.search-empty-title { font-size: 15px; font-weight: 600; color: var(--ink-600); margin-bottom: 8px; }
.search-empty-hint { font-size: 13px; max-width: 360px; line-height: 1.5; }

/* ── Auth layout ─────────────────────────────────────────────────────────── */
.auth-body {
  margin: 0; padding: 0;
  background: var(--ink-50);
  font-family: var(--font-sans);
  min-height: 100vh;
}

.auth-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
}

.auth-brand {
  background: var(--accent-strong);
  background-image: radial-gradient(ellipse at 30% 60%, oklch(0.38 0.10 160 / 0.6) 0%, transparent 70%),
                    radial-gradient(ellipse at 80% 20%, oklch(0.28 0.06 200 / 0.4) 0%, transparent 60%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
  position: relative;
  overflow: hidden;
}

.auth-brand-inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  max-width: 360px;
  width: 100%;
}

.auth-ninaut-logo {
  max-width: 240px;
  width: 100%;
  height: auto;
  filter: brightness(0) invert(1);
  opacity: 0.95;
  margin: 0 auto
}

.auth-brand-tagline {
  margin: 0 auto;
  font-size: 18px;
  font-weight: 400;
  color: oklch(0.95 0.02 160);
  line-height: 1.4;
}

.auth-brand-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding-top: 32px;
}

.auth-brand-poweredby {
  font-size: 12px;
  color: oklch(0.80 0.03 160);
  font-weight: 500;
  letter-spacing: 0.03em;
}

.auth-lisa-logo {
  width: 320px;
  opacity: 0.55;
  filter: brightness(0) invert(1);
  margin: 0 auto
}

.auth-form-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 32px;
  background: var(--paper);
}

.auth-card {
  width: 100%;
  max-width: 400px;
}

.auth-card-header {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 32px;
}

.auth-card-mark {
  width: 44px; height: 44px;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 700;
  flex-shrink: 0;
}

.auth-card-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--ink-900);
  line-height: 1.2;
}

.auth-card-sub {
  font-size: 13px;
  color: var(--ink-500);
  margin-top: 3px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.auth-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-700);
}

.auth-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.auth-forgot {
  font-size: 12px;
  color: var(--accent);
  text-decoration: none;
}
.auth-forgot:hover { text-decoration: underline; }

.auth-input {
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--ink-200);
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--ink-900);
  background: var(--paper);
  outline: none;
  transition: border-color 0.15s;
  width: 100%;
  box-sizing: border-box;
}
.auth-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.auth-input::placeholder { color: var(--ink-400); }

.auth-btn {
  height: 42px;
  background: var(--accent);
  color: var(--accent-ink);
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
  margin-top: 4px;
}
.auth-btn:hover { background: var(--accent-strong); }

.auth-mobile-brand { display: none; }

.flash {
  position: fixed;
  top: 16px; left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}
.flash-notice { background: var(--ok-bg); color: var(--ok); border: 1px solid var(--ok); }
.flash-alert  { background: var(--danger-bg); color: var(--danger); border: 1px solid var(--danger); }

@media (max-width: 768px) {
  .auth-split { grid-template-columns: 1fr; }
  .auth-brand { display: none; }
  .auth-form-side { padding: 32px 24px; }
  .auth-mobile-brand {
    display: block;
    margin-top: 40px;
    text-align: center;
  }
  .auth-mobile-logo {
    max-width: 160px;
    opacity: 0.4;
    filter: grayscale(1);
  }
}

/* ── Table wrapper (mobile scroll) ──────────────────────────────────────── */
.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-lg);
}
.table-wrapper .table { min-width: 560px; }

/* ── Chat float ──────────────────────────────────────────────────────────── */
.chat-float {
  position: fixed;
  bottom: 24px; right: 24px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}

.chat-toggle-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 48px;
  padding: 0 18px;
  background: var(--accent);
  color: var(--accent-ink);
  border: none;
  border-radius: 24px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 16px oklch(0.42 0.08 160 / 0.35);
  transition: background 0.15s, box-shadow 0.15s, transform 0.1s;
}
.chat-toggle-btn:hover {
  background: var(--accent-strong);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px oklch(0.42 0.08 160 / 0.4);
}
.chat-toggle-btn svg { width: 18px; height: 18px; }

.chat-panel {
  width: 340px;
  height: 480px;
  background: var(--paper);
  border: 1px solid var(--ink-200);
  border-radius: 14px;
  box-shadow: 0 8px 32px oklch(0.18 0.005 60 / 0.14);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chat-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--ink-150);
  background: var(--accent);
  color: var(--accent-ink);
}

.chat-panel-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
}

.chat-panel-title-mark {
  width: 24px; height: 24px;
  background: oklch(1 0 0 / 0.15);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
}

.chat-close-btn {
  background: none; border: none;
  color: var(--accent-ink);
  opacity: 0.7;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  line-height: 0;
}
.chat-close-btn:hover { opacity: 1; background: oklch(1 0 0 / 0.1); }

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-message {
  max-width: 85%;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.45;
}

.chat-message.assistant {
  align-self: flex-start;
  background: var(--ink-75);
  color: var(--ink-800);
  border-bottom-left-radius: 3px;
}

.chat-message.user {
  align-self: flex-end;
  background: var(--accent);
  color: var(--accent-ink);
  border-bottom-right-radius: 3px;
}

.chat-message-name {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
  opacity: 0.6;
}

.chat-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--ink-150);
}

.chat-input {
  flex: 1;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--ink-200);
  border-radius: 18px;
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--ink-900);
  background: var(--ink-50);
  outline: none;
  transition: border-color 0.15s;
}
.chat-input:focus { border-color: var(--accent); }
.chat-input::placeholder { color: var(--ink-400); }

.chat-send-btn {
  width: 36px; height: 36px;
  background: var(--accent);
  color: var(--accent-ink);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s;
  flex-shrink: 0;
}
.chat-send-btn:hover { background: var(--accent-strong); }
.chat-send-btn svg { width: 15px; height: 15px; }

.chat-coming-soon {
  font-size: 11px;
  color: var(--ink-400);
  text-align: center;
  padding: 4px 0;
}

@media (max-width: 640px) {
  .chat-float { bottom: 76px; right: 16px; }
  .chat-panel { width: calc(100vw - 32px); }
}

/* ── Version badge ───────────────────────────────────────────────────────── */
.sidebar-footer-version {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-400);
  background: var(--ink-100);
  padding: 3px 8px;
  border-radius: 10px;
  letter-spacing: 0.04em;
  transition: color 0.15s, background 0.15s;
  cursor: default;
  margin-left: auto;
}
.sidebar-footer-version:hover,
.sidebar-footer-version a:hover {
  color: var(--accent);
  background: var(--accent-soft);
}
