/* ========== Mira shared styles ========== */
:root {
  --bg: #f6f3ec;
  --bg-2: #efeadf;
  --bg-3: #e9e3d5;
  --ink: #0f1310;
  --ink-2: #2a2f2a;
  --muted: #6b6f68;
  --rule: rgba(15,19,16,0.14);
  --rule-strong: rgba(15,19,16,0.28);
  --accent: #0b6b3a;
  --accent-soft: #e3ecdf;
  --warn: #b8431a;
  --gold: #c08a2e;
  --sans: 'Geist', ui-sans-serif, system-ui, sans-serif;
  --mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  /* ── Aliases so app.css (old design system) resolves correctly ── */
  --bg-card:    var(--bg);
  --bg-soft:    var(--bg-2);
  --line:       var(--rule);
  --text:       var(--ink);
  --text-muted: var(--muted);
  --text-dim:   var(--muted);
  --green:      #16a34a;
  --red:        var(--warn);
  --amber:      var(--gold);
  --blue:       #3b82f6;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
.mono { font-family: var(--mono); }
.label { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.muted { color: var(--muted); }
.accent { color: var(--accent); }

.logo { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 18px; letter-spacing: -0.015em; }
svg.logo-mark { width: 26px; height: 26px; display: inline-block; flex-shrink: 0; }
.logo-mark::after { content: none; }

.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; font: 500 13.5px var(--sans); border: 1px solid var(--rule-strong); background: transparent; color: var(--ink); border-radius: 0; cursor: pointer; transition: background .12s, color .12s, border-color .12s; text-decoration: none; }
.btn:hover { text-decoration: none; background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-primary:hover { background: #084f2b; border-color: #084f2b; color: #fff; }
.btn-ghost { border-color: transparent; padding-left: 4px; padding-right: 4px; }
.btn-ghost:hover { background: transparent; color: var(--accent); }
.btn-sm { padding: 4px 10px; font-size: 12px; }

.input { display: block; width: 100%; background: var(--bg); border: 1px solid var(--rule); padding: 10px 12px; font: 14px var(--sans); color: var(--ink); outline: none; border-radius: 0; }
.input:focus { border-color: var(--accent); }

.tag { display: inline-block; font: 500 11px var(--mono); text-transform: uppercase; letter-spacing: 0.06em; padding: 2px 6px; border: 1px solid var(--rule-strong); color: var(--ink-2); background: var(--bg); }
.tag.accent { color: var(--accent); border-color: var(--accent); }
.tag.warn { color: var(--warn); border-color: var(--warn); }
.tag.gold { color: var(--gold); border-color: var(--gold); }

.status { font-family: var(--mono); font-size: 12px; color: var(--accent); }
.status::before { content: "● "; }
.status.warn { color: var(--warn); }
.status.muted { color: var(--muted); }

.hr { border: 0; border-top: 1px solid var(--rule); margin: 0; }

/* ===== Top bar shared across app pages ===== */
.appbar { display: flex; align-items: center; gap: 22px; height: 52px; padding: 0 22px; background: var(--bg); border-bottom: 1px solid var(--rule); position: sticky; top: 0; z-index: 50; }
.appbar .crumbs { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.appbar .crumbs .sep { color: var(--rule-strong); }
.appbar .crumbs a:hover { color: var(--ink); }
.appbar .crumbs .here { color: var(--ink); }
.appbar .spacer { flex: 1; }
.appbar .meta { font-family: var(--mono); font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.appbar .kbd { font-family: var(--mono); font-size: 11px; padding: 2px 6px; border: 1px solid var(--rule); color: var(--muted); }

/* ===== Channel chip icons (SVG-free badges) ===== */
.ch { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-2); }
.ch::before { content: ""; width: 10px; height: 10px; min-width: 10px; display: inline-block; border-radius: 50%; flex-shrink: 0; }
.ch.wa::before { background: #25D366; }
.ch.ig::before { background: linear-gradient(135deg, #f58529, #dd2a7b 50%, #515bd4); }
.ch.fb::before { background: #1877F2; }
.ch.im::before { background: #34C759; }
.ch.em::before { background: var(--ink-2); }

/* ===== Utilities ===== */
.hidden { display: none !important; }
.spacer { flex: 1; }

/* ===== Pulse animation (agent status dot) ===== */
@keyframes mira-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(11,107,58,0.45); }
  70%  { box-shadow: 0 0 0 6px rgba(11,107,58,0); }
  100% { box-shadow: 0 0 0 0 rgba(11,107,58,0); }
}
/* .pulse kept as a hook but no longer animates: a blinking dot draws the
   eye continuously and never earns it. */
.pulse { }
