/* =====================================================================
   EP Base UI · COMPONENTS — the 12 (C2–C12). Assumes tokens.css first.
   ===================================================================== */

/* ---------- Section headings ---------- */
.section-title { font-family: var(--font-serif); font-size: 22px; font-weight: 600;
  color: var(--color-slate-900); letter-spacing: -.015em; margin: 0 0 4px; }
.section-sub { color: var(--color-slate-500); font-size: 13.5px; margin: 0 0 20px; }
.muted { color: var(--color-slate-500); }
.mono { font-family: var(--font-mono); }
.divider { height: 1px; background: var(--color-border); margin: 16px 0; }

/* ---------- Card ---------- */
.card { background: var(--color-card); border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-card);
  display: flex; flex-direction: column; }
/* Accented/highlighted card — draws the eye to a primary shortcut (e.g. Job Card). */
.card.is-accent { border-color: var(--color-navy-200); background: var(--color-navy-50);
  box-shadow: 0 1px 2px rgba(15,23,42,.04), inset 3px 0 0 var(--color-navy-600); }
.card.is-accent .list-row { transition: transform .15s ease; }
.card.is-accent .list-row:hover { transform: translateX(2px); }
.card.is-accent .list-row:hover .list-time svg { color: var(--color-navy-600); }
.card-header { padding: 18px 22px 14px; border-bottom: 1px solid var(--color-border);
  display: flex; align-items: center; gap: 12px; }
.card-title { font-family: var(--font-serif); font-size: 17px; font-weight: 600;
  color: var(--color-slate-900); letter-spacing: -.005em;
  display: inline-flex; align-items: center; gap: 8px; }
.card-title svg { width: 16px; height: 16px; color: var(--color-slate-400); flex: none; }
.card-subtitle { font-size: 12.5px; color: var(--color-slate-500); margin-top: 2px; }
.card-body { padding: 18px 22px; flex: 1 1 auto; }
.card-actions { margin-left: auto; display: flex; gap: 8px; }

/* ---------- Buttons (C6 verbs; one gold per screen) ---------- */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px;
  border-radius: 11px; font-size: 13px; font-weight: 600; border: 1px solid transparent;
  cursor: pointer; font-family: inherit; white-space: nowrap;
  transition: transform .12s ease, box-shadow .15s ease, filter .15s, background .15s, border-color .15s; }
.btn:active { transform: scale(.97); }
.btn .btn-ico { width: 16px; height: 16px; flex: 0 0 auto; }
.btn-gold, .btn-accent, .btn-primary {
  background: var(--gold-grad); color: #1a1206; border: none; font-weight: 600;
  box-shadow: 0 6px 16px -6px rgba(182,134,31,.6); }
.btn-gold:hover, .btn-accent:hover, .btn-primary:hover {
  box-shadow: 0 10px 22px -6px rgba(182,134,31,.7); filter: brightness(1.03); }
.btn-ghost { background: #fff; color: var(--color-slate-700); border-color: var(--color-border); }
.btn-ghost:hover { background: var(--color-slate-50); border-color: var(--color-slate-300); }
.btn-danger { background: #fff; color: var(--color-red-600); border-color: var(--color-red-100); }
.btn-danger:hover { background: var(--color-red-100); }
.btn-sm { padding: 5px 10px; font-size: 12px; border-radius: 9px; }
/* on ink hero backgrounds, ghost buttons read as translucent glass */
.btn-glass { background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.2); }
.btn-glass:hover { background: rgba(255,255,255,.2); }

/* ---------- KPI stat card (C2) ---------- */
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.kpi { position: relative; background: var(--color-card); border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); padding: 18px 20px; overflow: hidden;
  box-shadow: 0 12px 30px -14px rgba(15,23,42,.10), 0 2px 6px -3px rgba(15,23,42,.05); }
.kpi-accent { position: absolute; top: 0; left: 0; right: 0; height: 5px; background: var(--gold-grad); }
.kpi-accent-emerald { background: linear-gradient(90deg,#34d399,#059669); }
.kpi-accent-red { background: linear-gradient(90deg,#fb7185,#e11d48); }
.kpi-accent-violet { background: linear-gradient(90deg,#a78bfa,#7c3aed); }
.kpi-accent-blue { background: linear-gradient(90deg,#60a5fa,#2563eb); }
.kpi-clickable { display: block; color: inherit; cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease; }
.kpi-clickable:hover { transform: translateY(-3px);
  box-shadow: 0 22px 44px -16px rgba(15,23,42,.18), 0 5px 12px -5px rgba(15,23,42,.09); }
.kpi-label { font-size: 11.5px; font-weight: 600; color: var(--color-slate-500);
  text-transform: uppercase; letter-spacing: .06em; margin-bottom: 8px; }
.kpi-value { font-family: var(--font-serif); font-size: 28px; font-weight: 700;
  color: var(--color-slate-900); line-height: 1; letter-spacing: -.02em; }
.kpi-top { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.kpi-top .kpi-label { margin-bottom: 0; }
.kpi-ico { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; flex-shrink: 0; }
.kpi-ico svg { width: 19px; height: 19px; display: block; }
.kpi-ico-navy    { background: var(--color-navy-50);    color: var(--color-navy-700); }
.kpi-ico-violet  { background: var(--color-violet-100); color: var(--color-violet-600); }
.kpi-ico-emerald { background: var(--color-emerald-100);color: var(--color-emerald-600); }
.kpi-ico-amber   { background: var(--color-amber-100);  color: var(--color-amber-700); }
.kpi-ico-red     { background: var(--color-red-100);    color: var(--color-red-600); }
.kpi-ico-teal    { background: #ccfbf1;                 color: #0d9488; }
.kpi-chip { display: inline-flex; align-items: center; gap: 2px; }
.kpi-chip svg { width: 14px; height: 14px; display: block; }
.kpi-meta { font-size: 12px; color: var(--color-slate-500); margin-top: 8px; }
.kpi:has(.kpi-accent-emerald) .kpi-value { color: var(--color-emerald-600); }
.kpi:has(.kpi-accent-amber) .kpi-value { color: var(--color-amber-600); }
.kpi:has(.kpi-accent-red) .kpi-value { color: var(--color-red-600); }
.kpi:has(.kpi-accent-violet) .kpi-value { color: var(--color-violet-600); }
/* large figure circle on the right (statement/ledger KPIs) */
.kpi-fig { position: absolute; right: 20px; top: 50%; transform: translateY(-2px);
  width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; }
.kpi-fig svg { width: 22px; height: 22px; display: block; }
.kpi:has(.kpi-fig) .kpi-label,
.kpi:has(.kpi-fig) .kpi-value,
.kpi:has(.kpi-fig) .kpi-meta { padding-right: 62px; }

/* ---------- Avatars ---------- */
.avatar { width: 36px; height: 36px; border-radius: 50%; display: inline-grid; place-items: center;
  font-weight: 600; font-size: 13px; color: #fff; flex-shrink: 0; background: var(--color-navy-700);
  box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.55), var(--shadow-sm); }
.avatar-sm { width: 24px; height: 24px; font-size: 10.5px; }
.avatar-md { width: 32px; height: 32px; font-size: 12px; }
.avatar-lg { width: 56px; height: 56px; font-size: 20px; }
.avatar-amber { background: linear-gradient(135deg,#f59e0b,#d97706); }
.avatar-emerald { background: linear-gradient(135deg,#10b981,#059669); }
.avatar-violet { background: linear-gradient(135deg,#8b5cf6,#7c3aed); }
.avatar-rose { background: linear-gradient(135deg,#f43f5e,#e11d48); }
.avatar-sky { background: linear-gradient(135deg,#38bdf8,#0284c7); }
.avatar-teal { background: linear-gradient(135deg,#14b8a6,#0f766e); }
.avatar-slate { background: linear-gradient(135deg,#64748b,#475569); }
.avatar-indigo { background: linear-gradient(135deg,#6366f1,#4338ca); }

/* ---------- Pills & badges (C11) ---------- */
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600; letter-spacing: .01em; }
.pill-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill-emerald { background: var(--color-emerald-100); color: var(--color-emerald-600); }
.pill-amber { background: var(--color-amber-100); color: var(--color-amber-700); }
.pill-red { background: var(--color-red-100); color: var(--color-red-600); }
.pill-violet { background: var(--color-violet-100); color: var(--color-violet-600); }
.pill-slate { background: var(--color-slate-100); color: var(--color-slate-600); }
.pill-navy { background: var(--color-navy-50); color: var(--color-navy-800); }

/* ---------- Source dot (C11) ---------- */
.source-dot { width: 22px; height: 22px; border-radius: 6px; display: inline-grid; place-items: center;
  font-size: 11px; font-weight: 700; color: #fff; flex-shrink: 0; }
.source-dot svg { width: 13px; height: 13px; display: block; }
/* source badge with a trailing channel label (design: Source-badges template) */
.source-badge { display: inline-flex; align-items: center; gap: 8px; }
.source-badge .source-label { font-size: 12.5px; font-weight: 500; color: var(--color-slate-700); white-space: nowrap; }
.source-email, .source-mail { background: #f0533a; }
.source-whatsapp { background: #25d366; }
.source-phone { background: var(--color-navy-700); }
.source-walkin { background: var(--color-emerald-600); }
.source-referral { background: var(--color-amber-600); }
.source-website { background: #6366f1; }
.source-ig { background: linear-gradient(135deg,#fa7e1e,#d62976,#962fbf); }

/* ---------- Data table (C4) ---------- */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--color-slate-500); font-weight: 600; padding: 12px 16px;
  background: var(--color-slate-50); border-bottom: 1px solid var(--color-border); }
.table td { padding: 14px 16px; font-size: 13px; color: var(--color-slate-700);
  border-bottom: 1px solid var(--color-slate-100); vertical-align: middle; }
.table tbody tr { transition: background .12s; }
.table tbody tr:hover { background: var(--color-slate-50); }
.table tbody tr:last-child td { border-bottom: 0; }
.table .cell-strong { color: var(--color-slate-900); font-weight: 600; }
.lead-name-cell { display: flex; align-items: center; gap: 10px; }
.lead-meta { font-size: 11.5px; color: var(--color-slate-500); margin-top: 2px; font-family: var(--font-mono); }
.table-count { font-size: 12.5px; color: var(--color-slate-500); padding: 12px 16px; }

/* ---------- Filter-pill row (C3) ---------- */
.filter-bar { display: flex; gap: 8px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.filter-chip { user-select: none; padding: 7px 14px; border-radius: 999px; background: var(--color-card);
  border: 1px solid var(--color-border); font-size: 12.5px; font-weight: 600; color: var(--color-slate-600);
  cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.filter-chip:hover { border-color: var(--color-navy-500); }
.filter-chip.is-active { background: var(--color-navy-800); color: #fff; border-color: var(--color-navy-800); }
.filter-chip .chip-count { opacity: .6; margin-left: 3px; font-variant-numeric: tabular-nums; }
.filter-spacer { flex: 1; }
/* In-page list search box (customers / quotes) — icon + input, right-aligned after the spacer. */
.list-search-wrap { position: relative; display: inline-flex; align-items: center; min-width: 340px; }
.list-search-icon { position: absolute; left: 15px; display: inline-flex; align-items: center;
  pointer-events: none; color: var(--color-slate-400); }
.list-search-icon svg { width: 18px; height: 18px; }
.filter-bar .list-search { width: 100%; height: 42px; padding: 0 16px 0 42px; border: 1px solid var(--color-border);
  border-radius: 999px; background: var(--color-card); font-size: 14px; font-family: inherit;
  color: var(--color-slate-800); transition: border-color .15s, box-shadow .15s; }
.filter-bar .list-search::placeholder { color: var(--color-slate-400); }
.filter-bar .list-search:focus { outline: none; border-color: var(--color-navy-500);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); }
.list-search-wrap:focus-within .list-search-icon { color: var(--color-navy-500); }
@media (max-width: 700px) { .list-search-wrap { flex-basis: 100%; min-width: 0; width: 100%; } }

/* ---------- Detail hero band (C5) ---------- */
.lead-hero { background: var(--ink-grad); border-radius: var(--radius-lg); padding: 28px; color: #fff;
  margin-bottom: 24px; position: relative; isolation: isolate; overflow: hidden;
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.06); }
/* signature gold top hairline */
.lead-hero::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 2px; z-index: 2;
  background: var(--gold-grad); opacity: .9; }
/* ambient depth: soft gold + violet glows */
.lead-hero::after { content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(680px 260px at 88% -30%, rgba(216,173,63,.16), transparent 70%),
    radial-gradient(520px 280px at 4% 130%, rgba(124,58,237,.14), transparent 70%); }
.lead-hero-row { display: flex; align-items: center; gap: 20px; position: relative; z-index: 1; }
.lead-hero-row .avatar-lg { border-radius: 16px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 10px 24px -8px rgba(216,173,63,.55), 0 0 0 1px rgba(255,255,255,.08); }
.lead-hero-name { font-family: var(--font-serif); font-size: 28px; font-weight: 600;
  letter-spacing: -.02em; line-height: 1.1; }
.lead-hero-meta { color: rgba(255,255,255,.6); font-size: 13px; margin-top: 5px; font-family: var(--font-mono); letter-spacing: .01em; }
.lead-hero-tags { display: flex; gap: 8px; margin-top: 13px; flex-wrap: wrap; }
.hero-tag { display: inline-flex; align-items: center; background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1); padding: 5px 11px;
  border-radius: 999px; font-size: 11.5px; color: rgba(255,255,255,.9); font-weight: 500;
  transition: background .15s, border-color .15s; }
.hero-tag:hover { background: rgba(255,255,255,.11); border-color: rgba(255,255,255,.18); }
/* status pill, color-coded per lifecycle stage */
.hero-tag-status { font-weight: 600; letter-spacing: .01em; }
.hero-tag-status.is-emerald { color: #86efac; background: rgba(34,197,94,.14); border-color: rgba(34,197,94,.28); }
.hero-tag-status.is-amber { color: #f2d488; background: rgba(216,173,63,.16); border-color: rgba(216,173,63,.3); }
.hero-tag-status.is-slate { color: #cbd5e1; background: rgba(148,163,184,.14); border-color: rgba(148,163,184,.26); }
.lead-hero-actions { margin-left: auto; display: flex; gap: 8px; position: relative; z-index: 1; }

/* ---------- Workflow verb bar (C6) ---------- */
.verb-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }

/* ---------- Detail layout + brief rail (C8) ---------- */
.detail-grid { display: grid; grid-template-columns: 1fr 340px; gap: 20px; align-items: start; }
.field-list { display: grid; grid-template-columns: 1fr; gap: 0; }
.field-row { display: flex; flex-direction: column; gap: 2px; padding: 9px 0;
  border-bottom: 1px dashed var(--color-slate-100); }
.field-row:last-child { border-bottom: 0; }
.field-key { font-size: 11px; font-weight: 600; color: var(--color-slate-500);
  text-transform: uppercase; letter-spacing: .05em; }
.field-value { font-size: 13.5px; color: var(--color-slate-800); font-weight: 500; }
.field-value.is-strong { color: var(--color-slate-900); font-weight: 600; }
.field-value.is-currency { font-family: var(--font-serif); font-size: 16px; color: var(--color-amber-700); }

/* ---------- Timeline tabs (C7) ---------- */
.tab-bar { display: flex; gap: 4px; border-bottom: 1px solid var(--color-border); padding: 0 22px; }
.tab { padding: 12px 14px; font-size: 13px; font-weight: 600; color: var(--color-slate-500);
  border-bottom: 2px solid transparent; cursor: pointer; transition: color .15s, border-color .15s; }
.tab:hover { color: var(--color-slate-700); }
.tab.is-active { color: var(--color-navy-800); border-bottom-color: var(--color-amber-500); }
.tab-panel { display: none; }
.tab-panel.is-active { display: block; }

.timeline { position: relative; padding-left: 28px; }
.timeline::before { content: ''; position: absolute; left: 9px; top: 8px; bottom: 8px; width: 2px;
  background: var(--color-slate-200); border-radius: 1px; }
.timeline-item { position: relative; padding-bottom: 18px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot { position: absolute; left: -23px; top: 4px; width: 14px; height: 14px; border-radius: 50%;
  background: var(--color-navy-700); border: 3px solid var(--color-card); box-shadow: 0 0 0 2px var(--color-slate-200); }
.timeline-dot.is-gold { background: var(--color-amber-500); }
.timeline-dot.is-close { background: var(--color-red-500); }
.timeline-dot.is-success { background: var(--color-emerald-500); }
.timeline-dot.is-violet { background: var(--color-violet-500); }
.timeline-time { font-size: 11.5px; color: var(--color-slate-500); font-weight: 500; margin-bottom: 2px; }
.timeline-body { font-size: 13px; color: var(--color-slate-700); line-height: 1.55; }
.timeline-body strong { color: var(--color-slate-900); }

/* ---------- Modal / slide-over (C10) ---------- */
.modal-overlay { position: fixed; inset: 0; background: rgba(15,23,42,.55); display: grid; place-items: center;
  z-index: 100; padding: 20px; backdrop-filter: blur(2px); animation: fadeIn .15s ease-out; }
.modal-overlay[hidden] { display: none; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.modal-card { background: #fff; border-radius: var(--radius-lg); width: 100%; max-width: 480px;
  box-shadow: var(--shadow-lg); animation: slideUp .2s ease-out; overflow: hidden;
  max-height: calc(100vh - 40px); display: flex; flex-direction: column; }
.modal-header { padding: 18px 22px; border-bottom: 1px solid var(--color-border);
  display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.modal-title { font-family: var(--font-serif); font-size: 18px; font-weight: 600;
  color: var(--color-slate-900); letter-spacing: -.01em; }
.modal-close { margin-left: auto; width: 28px; height: 28px; border-radius: 8px; background: transparent;
  border: 1px solid var(--color-border); display: grid; place-items: center; cursor: pointer;
  font-size: 18px; color: var(--color-slate-500); }
.modal-close:hover { background: var(--color-slate-100); color: var(--color-slate-900); }
.modal-body { padding: 18px 22px; overflow-y: auto; flex: 1 1 auto; }
.modal-actions { padding: 14px 22px; background: var(--color-slate-50); display: flex; gap: 8px;
  justify-content: flex-end; border-top: 1px solid var(--color-border); flex-shrink: 0; }

/* Right slide-over (C10 variant) — used for entity detail sheets (tasks etc.),
   so a detail is a slide-over, not a full page. Shares .modal-* header/body/actions. */
@keyframes slideInRight { from { transform: translateX(100%); } to { transform: translateX(0); } }
.slideover-overlay { position: fixed; inset: 0; background: rgba(15,23,42,.55); z-index: 110;
  display: flex; justify-content: flex-end; backdrop-filter: blur(2px); animation: fadeIn .15s ease-out; }
.slideover-overlay[hidden] { display: none; }
.slideover-panel { background: #fff; width: min(560px, 94vw); height: 100%; box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; animation: slideInRight .22s cubic-bezier(.4,0,.2,1); }
.slideover-panel .modal-body { padding: 20px 22px; }

/* ---------- Form fields ---------- */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12px; font-weight: 600; color: var(--color-slate-700); margin-bottom: 6px; }
.field input, .field select, .field textarea { width: 100%; padding: 10px 14px; border: 1px solid var(--color-border);
  border-radius: var(--radius); font-size: 13.5px; font-family: inherit; background: #fff;
  color: var(--color-slate-800); resize: vertical; transition: border-color .15s, box-shadow .15s; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none;
  border-color: var(--focus-border); box-shadow: 0 0 0 3px var(--focus-ring); }
/* professional custom select — drops the native OS dropdown chrome */
.field select {
  appearance: none; -webkit-appearance: none; -moz-appearance: none;
  padding-right: 40px; font-weight: 600; cursor: pointer;
  background-image: var(--select-caret);
  background-repeat: no-repeat; background-position: right 13px center; background-size: 16px;
}
.field select:hover { border-color: var(--color-slate-300); }
/* Global baseline for any bare/unclassed <select> (filters, inline pickers,
   etc.) so no native OS dropdown chrome leaks through anywhere. Classed
   selects (.field/.toolbar/.ep-select/…) override sizing at higher specificity. */
select {
  appearance: none; -webkit-appearance: none; -moz-appearance: none;
  font-family: inherit; font-size: 13px; font-weight: 500; line-height: 1.3;
  color: var(--color-slate-800); cursor: pointer;
  padding: 9px 34px 9px 13px;
  border: 1px solid var(--color-border); border-radius: var(--radius-sm);
  background-color: #fff;
  background-image: var(--select-caret);
  background-repeat: no-repeat; background-position: right 12px center; background-size: 16px;
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
select:hover { border-color: var(--color-slate-300); }
select:focus, select:focus-visible { outline: none;
  border-color: var(--focus-border); box-shadow: 0 0 0 3px var(--focus-ring); }
.btn-block { width: 100%; justify-content: center; padding: 12px; font-size: 14px; }

/* ---------- Toast ---------- */
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); padding: 12px 20px;
  background: var(--color-slate-900); color: #fff; border-radius: var(--radius); box-shadow: var(--shadow-lg);
  font-size: 13.5px; font-weight: 500; z-index: 200; animation: slideUp .2s ease-out; max-width: 480px; }
.toast[hidden] { display: none; }
.toast-success { background: var(--color-emerald-600); }

/* ---------- Notification panel (C10 variant) ---------- */
.notification-panel { position: fixed; top: 70px; right: 32px; width: 360px; background: #fff;
  border: 1px solid var(--color-border); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  z-index: 90; overflow: hidden; animation: slideUp .15s ease-out; }
.notification-panel[hidden] { display: none; }
.notif-header { padding: 14px 18px; border-bottom: 1px solid var(--color-border); display: flex; align-items: center; }
.notif-list { max-height: 440px; overflow-y: auto; }
.notif-item { padding: 12px 18px; display: flex; gap: 12px; align-items: flex-start;
  border-bottom: 1px solid var(--color-slate-100); cursor: pointer; transition: background .12s; }
.notif-item:hover { background: var(--color-slate-50); }
.notif-item:last-child { border-bottom: 0; }
.notif-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; flex-shrink: 0; }
.notif-title { font-size: 13px; font-weight: 500; color: var(--color-slate-800); line-height: 1.4; }
.notif-time { font-size: 11.5px; color: var(--color-slate-500); margin-top: 3px; }

/* ---------- Layout helpers ---------- */
.grid-2 { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.row { display: flex; align-items: center; gap: 12px; }
.col { display: flex; flex-direction: column; gap: 12px; }
.space-between { justify-content: space-between; }
.text-sm { font-size: 12px; } .text-xs { font-size: 11px; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .section-title { font-size: 24px; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  /* data tables -> stacked cards (native-app feel). display NOT !important so
     JS row filtering (inline display:none) still hides rows by specificity. */
  .card:has(table) { padding: 8px; background: transparent; border: none; box-shadow: none; overflow: visible; }
  .card table, .card tbody, .card td { display: block; width: auto; white-space: normal; }
  .card thead { display: none; }
  .card tr { display: block; background: #fff; border: 1px solid var(--color-border);
    border-radius: var(--radius-lg); padding: 12px 14px; margin: 0 0 10px; box-shadow: var(--shadow-sm); }
  .card tr[style*="display: none"], .card tr[style*="display:none"] { display: none !important; }
  .card td { border: none !important; padding: 5px 0 !important; }
  .card td:first-child { padding-bottom: 9px !important; border-bottom: 1px solid var(--color-slate-100) !important; margin-bottom: 5px; }
  .card td[data-label]::before { content: attr(data-label); display: block; font-size: 10px;
    text-transform: uppercase; letter-spacing: .05em; color: var(--color-slate-400); font-weight: 600; margin-bottom: 2px; }
  .lead-hero-row { flex-wrap: wrap; }
  .lead-hero-actions { margin-left: 0; flex-wrap: wrap; width: 100%; }
  .lead-hero-actions > .btn { flex: 1 1 calc(50% - 8px); justify-content: center; }
  .verb-bar { flex-wrap: wrap; }
  .tab-bar { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .tab-bar::-webkit-scrollbar { display: none; }
  .tab { flex: 0 0 auto; white-space: nowrap; }
  .filter-bar { flex-wrap: wrap; }
  .filter-spacer { flex-basis: 100%; height: 0; }
}
@media (max-width: 430px) { .kpi-grid { grid-template-columns: minmax(0,1fr); } }

/* ---------- interaction runtime (interact.js) ---------- */
.ep-menu { background:#fff; border:1px solid var(--color-border); border-radius:12px;
  box-shadow:0 12px 32px rgba(15,23,42,.16); padding:6px; min-width:180px; z-index:1200; }
.ep-menu-item { display:block; width:100%; text-align:left; padding:8px 12px; border:0;
  background:transparent; border-radius:8px; font:inherit; font-size:14px;
  color:var(--color-slate-700); cursor:pointer; }
.ep-menu-item:hover { background:var(--color-slate-100); color:var(--color-slate-900); }
.sort-caret { font-size:10px; opacity:.7; }
th[data-nosort] { cursor:default !important; }

/* =====================================================================
   Task detail slide-over — premium sheet (C10 specialisation).
   ALL rules below are scoped to `.tsk-sheet` / `.tsk-*` — they never
   mutate the shared .card/.pill/.prio/.btn/.timeline/.field globals,
   so nothing changes on dashboard, kanban, leads, orders, etc.
   ===================================================================== */
.slideover-panel.tsk-sheet { width: min(600px, 96vw); }
.tsk-sheet .modal-header { padding: 20px 24px 18px; }
.tsk-sheet .modal-title { font-size: 20px; line-height: 1.25; }
.tsk-sheet .modal-body { padding: 20px 24px 28px; }

/* --- header meta ribbon --- */
.tsk-hero { display: flex; align-items: center; gap: 10px; padding-bottom: 4px; }
.tsk-hero-flags { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tsk-hero-id { margin-left: auto; align-self: center; font-family: var(--font-mono);
  font-size: 11.5px; font-weight: 600; color: var(--color-slate-400); letter-spacing: .02em; }
.tsk-flag { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px;
  font-size: 11.5px; font-weight: 700; letter-spacing: .02em; }
.tsk-flag-overdue { background: var(--color-red-100); color: var(--color-red-600); }
.tsk-flag-today { background: var(--color-amber-100); color: var(--color-amber-700); }

/* --- section rhythm: one composed sheet, hairline-separated --- */
.tsk-sec { padding: 18px 0; border-top: 1px solid var(--color-border); }
.tsk-sec:first-of-type { margin-top: 16px; }
.tsk-sec:last-child { padding-bottom: 2px; }
.tsk-sec-label { font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  color: var(--color-slate-400); margin-bottom: 12px; }

/* --- facts spec list --- */
.tsk-facts { display: grid; grid-template-columns: 118px 1fr; margin: 0; font-size: 13px; }
.tsk-facts dt { display: flex; align-items: center; padding: 10px 0;
  border-bottom: 1px solid var(--color-slate-100); font-size: 11px; font-weight: 600;
  letter-spacing: .04em; text-transform: uppercase; color: var(--color-slate-500); }
.tsk-facts dd { display: flex; align-items: center; margin: 0; padding: 10px 0;
  border-bottom: 1px solid var(--color-slate-100); color: var(--color-slate-800); font-weight: 500; }
.tsk-facts dt:nth-last-of-type(1), .tsk-facts dd:last-of-type { border-bottom: 0; }

/* --- description callout (refined amber) --- */
.tsk-desc { position: relative; background: var(--color-amber-50); border: 1px solid var(--color-amber-100);
  border-radius: var(--radius); padding: 15px 16px 15px 18px; font-size: 13.5px; line-height: 1.7;
  color: var(--color-slate-800); white-space: pre-wrap; overflow: hidden; }
.tsk-desc::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--gold-grad); }

/* --- comments feed --- */
.tsk-sheet .tsk-comment { display: flex; gap: 12px; padding: 14px 0;
  border-bottom: 1px solid var(--color-slate-100); }
.tsk-sheet .tsk-comment:last-child { border-bottom: 0; padding-bottom: 2px; }
.tsk-comment-main { flex: 1; min-width: 0; }
.tsk-comment-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 3px; }
.tsk-comment-who { font-size: 13px; font-weight: 700; color: var(--color-slate-800); }
.tsk-comment-when { font-size: 11px; color: var(--color-slate-400); font-family: var(--font-mono); }
.tsk-comment-text { font-size: 13px; color: var(--color-slate-600); line-height: 1.6; }

/* --- composer --- */
.tsk-composer { display: flex; gap: 8px; align-items: center; margin-top: 14px;
  padding-top: 14px; border-top: 1px solid var(--color-slate-100); }
.tsk-comment-input { flex: 1; height: 40px; padding: 0 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--color-border); background: var(--color-card); color: var(--color-slate-800);
  font-family: var(--font-sans); font-size: 13.5px; transition: border-color .15s, box-shadow .15s; }
.tsk-comment-input::placeholder { color: var(--color-slate-400); }
.tsk-comment-input:focus { outline: none; border-color: var(--focus-border);
  box-shadow: 0 0 0 3px var(--focus-ring); }

/* --- time log table --- */
.tsk-log { width: 100%; border-collapse: collapse; font-size: 13px; }
.tsk-log th { text-align: left; padding: 0 4px 8px; border-bottom: 1px solid var(--color-border);
  font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--color-slate-400); }
.tsk-log th:last-child { text-align: right; }
.tsk-log td { padding: 9px 4px; border-bottom: 1px solid var(--color-slate-100); color: var(--color-slate-600); }
.tsk-log tr:last-child td { border-bottom: 0; }
.tsk-log td:nth-child(2) { font-family: var(--font-mono); font-size: 12px; color: var(--color-slate-400); }
.tsk-log td:last-child { text-align: right; font-family: var(--font-mono); font-weight: 600; color: var(--color-slate-800); }
.tsk-log .tsk-log-empty { text-align: left; font-style: italic; color: var(--color-slate-400); }

/* ── Shared pagination footer (EP.renderPager) ───────────────
   Generic pager used across every list page. Promoted from the
   original tasks.html-local .tsk-pager block so all tables share
   one look. Sits inside a .card, below the table. */
.ep-pager { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px; flex-wrap: wrap; border-top: 1px solid var(--color-border); }
.ep-pager-info { font-size: 12.5px; color: var(--color-slate-500); }
.ep-pager-mid { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.ep-pg-btn { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 34px;
  padding: 0 8px; border-radius: var(--radius-sm); background: var(--color-card); border: 1px solid var(--color-border);
  color: var(--color-slate-600); font-size: 13px; font-weight: 600; cursor: pointer; transition: all .12s; }
.ep-pg-btn:hover:not(:disabled) { background: var(--color-slate-50); }
.ep-pg-btn.is-active { background: var(--color-navy-800); color: #fff; border-color: var(--color-navy-800); }
.ep-pg-btn:disabled { opacity: .4; cursor: not-allowed; }
.ep-pg-btn svg { width: 15px; height: 15px; }
.ep-pg-gap { min-width: 22px; text-align: center; color: var(--color-slate-400); user-select: none; }
.ep-pagesize select { height: 34px; border-radius: var(--radius-sm); border: 1px solid var(--color-border);
  background-color: var(--color-card); background-image: var(--select-caret);
  background-repeat: no-repeat; background-position: right 9px center; background-size: 15px;
  color: var(--color-slate-600); font-size: 13px; font-weight: 600;
  padding: 0 28px 0 10px; cursor: pointer; font-family: var(--font-sans); }
