/* [SH] Supporthub theme.css — LIGHT design tokens + base components.
   Port of the mailhub component system to a light theme (plan 04 §2, decision D1):
   same Inter font, indigo accent, identical component vocabulary
   (cards / pills / chips / toasts / modals / tables / inputs / sidebar chrome).
   Loaded by every page as /theme.css?v=1 — bump ?v on change (cache-buster protocol). */

:root {
  /* surfaces */
  --bg: #f5f6fa;            /* page background */
  --surface: #ffffff;       /* cards, panes, sidebar */
  --surface-2: #f0f1f7;     /* hovers, input bg, chips */
  --surface-3: #e8eaf2;     /* pressed, selected row */
  /* lines */
  --border: #e3e5ef;
  --border-strong: #ced2e0;
  /* text */
  --text: #181b27;
  --text-2: #5b6171;        /* secondary */
  --text-3: #8a90a3;        /* tertiary / placeholders */
  /* accent — mailhub indigo family, darkened one step for light bg */
  --accent: #4f46e5;
  --accent-hover: #4338ca;
  --accent-soft: #eef0fe;   /* selected nav, ai badge bg */
  /* status */
  --ok: #16a34a;
  --warn: #d97706;
  --err: #dc2626;
  --info: #0891b2;
  --note-bg: #fef9c3;       /* internal notes */
  --note-border: #fde047;
  /* typography */
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  /* radii */
  --r-sm: 6px; --r-md: 10px; --r-lg: 12px; --r-pill: 999px;
  /* shadows (flat otherwise) */
  --shadow-card: 0 1px 2px rgba(20, 22, 40, .06);
  --shadow-pop: 0 8px 24px rgba(20, 22, 40, .16);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 13.5px;
  line-height: 1.45;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
h1, h2, h3 { color: var(--text); letter-spacing: -0.01em; }
code, .mono { font-family: var(--mono); font-size: 12.5px; }

/* ---- cards ---- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  padding: 16px;
}

/* ---- buttons (mailhub class names, light colors) ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 16px; border-radius: var(--r-sm); cursor: pointer;
  font: inherit; font-size: 13.5px; font-weight: 600;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border-strong);
  transition: background .15s, border-color .15s, color .15s;
}
.btn:hover { background: var(--surface-2); }
.btn:disabled { opacity: .55; cursor: default; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-danger { background: var(--err); border-color: var(--err); color: #fff; }
.btn-danger:hover { filter: brightness(.92); }
.btn-sm { padding: 5px 10px; font-size: 12.5px; }

/* ---- forms ---- */
.f-label, label.f-label {
  display: block; font-size: 12px; font-weight: 600; color: var(--text-2);
  margin: 0 0 6px; letter-spacing: .02em;
}
.inp, .f-inp,
input.inp, select.inp, textarea.inp {
  width: 100%; padding: 10px 12px; font: inherit; font-size: 13.5px;
  background: var(--surface-2); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--r-sm);
}
.inp:focus, .f-inp:focus { outline: none; border-color: var(--accent); background: var(--surface); }
.inp::placeholder { color: var(--text-3); }

/* ---- status pill (rendered by SH.pill) ---- */
.sh-pill {
  display: inline-block; padding: 2px 10px; border-radius: var(--r-pill);
  font-size: 12px; font-weight: 600; text-transform: capitalize;
  line-height: 1.6; white-space: nowrap;
}

/* ---- label chip (rendered by SH.chip) ---- */
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 9px; border-radius: var(--r-pill);
  background: var(--surface-2); border: 1px solid var(--border);
  font-size: 11px; font-weight: 600; color: var(--text-2); white-space: nowrap;
}
.chip .dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }

/* ---- keyboard hint ---- */
.kbd {
  display: inline-block; padding: 1px 6px; border: 1px solid var(--border-strong);
  border-bottom-width: 2px; border-radius: 5px; background: var(--surface);
  font-family: var(--mono); font-size: 11px; color: var(--text-2);
}

/* ---- tables ---- */
table.tbl { width: 100%; border-collapse: collapse; }
.tbl th {
  text-align: left; font-size: 11.5px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .04em; color: var(--text-3); padding: 8px 12px;
  border-bottom: 1px solid var(--border);
}
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--border); font-size: 13px; }
.tbl tr:hover td { background: var(--surface-2); }
.tbl tr:last-child td { border-bottom: none; }

/* ---- skeleton shimmer (lists/conversation loading) ---- */
.skel {
  display: block; height: 12px; border-radius: 6px;
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 50%, var(--surface-2) 75%);
  background-size: 200% 100%;
  animation: shShimmer 1.2s linear infinite;
}
@keyframes shShimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ---- empty states ---- */
.empty { text-align: center; color: var(--text-3); padding: 36px 12px; }
.empty .t { font-size: 14px; font-weight: 600; color: var(--text-2); margin-bottom: 4px; }

/* ---- generic utility ---- */
.muted { color: var(--text-2); }
.muted-3 { color: var(--text-3); }
.err-text { color: var(--err); }
.ok-text { color: var(--ok); }
.row { display: flex; align-items: center; gap: 10px; }
.grow { flex: 1; }
