/* MailSieve — design system neutro. Sem dependências externas (fontes do
   sistema, ícones SVG inline). Cores de status usam texto escuro sobre fundo
   claro (contraste AA), nunca cor sozinha: sempre acompanhada de rótulo. */

:root {
  color-scheme: light;
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #fafbfc;
  --border: #e4e7ec;
  --border-strong: #d0d5dd;
  --text: #101828;
  --text-2: #475467;
  --text-3: #667085;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-soft: #eff4ff;
  --focus: #2563eb;

  --ok-fg: #0f6b48;   --ok-bg: #e6f5ed;   --ok-solid: #22a06b;
  --warn-fg: #7a5200; --warn-bg: #fdf3d8; --warn-solid: #e0a300;
  --risk-fg: #9a4200; --risk-bg: #ffeddc; --risk-solid: #f28c1e;
  --bad-fg: #b42318;  --bad-bg: #fde8e6;  --bad-solid: #d92d20;
  --info-fg: #1d4ed8; --info-bg: #e8f0ff; --info-solid: #3b82f6;
  --muted-fg: #475467; --muted-bg: #eef0f3; --muted-solid: #98a2b3;

  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
  --shadow-md: 0 8px 24px rgba(16, 24, 40, 0.12);
  --sidebar-w: 256px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
}
h1, h2, h3, p { margin: 0; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: -999px; top: 8px; z-index: 100;
  background: var(--surface); padding: 8px 12px; border-radius: 8px; border: 1px solid var(--border);
}
.skip-link:focus { left: 8px; }
.muted { color: var(--text-3); }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }

/* ---------- Layout ---------- */
.app { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  background: var(--surface); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; padding: 16px 12px;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 6px 10px 18px; font-weight: 700; font-size: 17px; letter-spacing: -0.01em; }
.brand-mark { width: 30px; height: 30px; flex: none; }
.icon-btn.sidebar-close { margin-left: auto; display: none; }
.nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav-label {
  margin: 18px 10px 6px; font-size: 11px; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--text-3);
}
.nav-item {
  display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: var(--radius-sm);
  color: var(--text-2); font-weight: 500; text-decoration: none;
}
.nav-item svg { width: 19px; height: 19px; flex: none; stroke: currentColor; }
.nav-item:hover { background: var(--muted-bg); color: var(--text); text-decoration: none; }
.nav-item.active { background: var(--primary-soft); color: var(--primary); }
.sidebar-foot { border-top: 1px solid var(--border); padding-top: 12px; margin-top: 12px; display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%; background: var(--muted-bg); color: var(--text-2);
  display: grid; place-items: center; font-weight: 600; text-transform: uppercase; flex: none;
}
.sidebar-user { min-width: 0; flex: 1; }
.sidebar-user b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user span { font-size: 12px; color: var(--text-3); }
.scrim { display: none; }

.main-col { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px;
  padding: 12px 28px; background: rgba(255, 255, 255, 0.92); backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
}
.topbar-title { font-weight: 600; font-size: 15px; }
.icon-btn.menu-btn { display: none; }
.chips { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px; border-radius: 999px;
  background: var(--muted-bg); color: var(--muted-fg); font-size: 12.5px; font-weight: 500; white-space: nowrap;
}
.chip .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.chip.ok { background: var(--ok-bg); color: var(--ok-fg); }
.chip.warn { background: var(--warn-bg); color: var(--warn-fg); }
.chip.bad { background: var(--bad-bg); color: var(--bad-fg); }
.content { width: 100%; max-width: 1280px; margin: 0 auto; padding: 28px; }
.page-head { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-title { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; }
.page-lead { color: var(--text-2); margin-top: 4px; max-width: 70ch; }
.page-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Cards / grid ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--border); background: var(--surface-2); border-radius: var(--radius) var(--radius) 0 0; }
.card-title { font-weight: 600; font-size: 14.5px; }
.card-sub { color: var(--text-3); font-size: 12.5px; margin-left: auto; }
.card-body { padding: 18px; }
.card-flush { padding: 0; }
.grid { display: grid; gap: 16px; }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cols-main { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.mt { margin-top: 16px; }
.mt-lg { margin-top: 24px; }

.kpi { padding: 16px 18px; }
.kpi-label { font-size: 12.5px; color: var(--text-3); font-weight: 500; }
.kpi-value { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.kpi-sub { font-size: 12.5px; color: var(--text-3); margin-top: 2px; }
.kpi-ok .kpi-value { color: var(--ok-fg); }
.kpi-bad .kpi-value { color: var(--bad-fg); }
.kpi-warn .kpi-value { color: var(--warn-fg); }
.kpi-info .kpi-value { color: var(--info-fg); }

/* ---------- Botões / formulários ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 38px;
  padding: 8px 14px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text); font-weight: 600; cursor: pointer; text-decoration: none;
}
.btn:hover { background: var(--muted-bg); text-decoration: none; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; }
.btn svg { width: 16px; height: 16px; stroke: currentColor; flex: none; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-danger { color: var(--bad-fg); border-color: #f4b6b0; }
.btn-danger:hover { background: var(--bad-bg); }
.btn-sm { min-height: 30px; padding: 4px 10px; font-size: 13px; }
.btn-block { width: 100%; }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface); cursor: pointer; }
.icon-btn:hover { background: var(--muted-bg); }
.icon-btn svg { width: 19px; height: 19px; stroke: currentColor; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field > label, .label { font-weight: 600; font-size: 13px; }
.input, .select, .textarea {
  width: 100%; min-height: 40px; padding: 8px 12px; border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); background: var(--surface);
}
.input:focus, .select:focus, .textarea:focus { outline: 2px solid var(--focus); outline-offset: 0; border-color: var(--focus); }
.hint { font-size: 12.5px; color: var(--text-3); }
.check { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 12px; }
.check input { width: 17px; height: 17px; margin-top: 2px; flex: none; accent-color: var(--primary); }
.check label { font-weight: 500; }
.check .hint { display: block; }
.inline-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end; }
.inline-form .input { width: auto; flex: 1; min-width: 140px; }

/* ---------- Tabelas ---------- */
.table-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; }
.tbl th {
  text-align: left; font-size: 11.5px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--text-3); padding: 10px 14px; background: var(--surface-2); border-bottom: 1px solid var(--border); white-space: nowrap;
}
.tbl th.num { text-align: right; }
.tbl td { padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover { background: var(--surface-2); }
.tbl tr.clickable { cursor: pointer; }
.tbl td.wrap { white-space: normal; min-width: 220px; }
/* Tabela de lotes: cabe na largura da página, sem rolagem horizontal. */
.tbl-runs th, .tbl-runs td { padding-left: 10px; padding-right: 10px; }
.tbl-runs th { white-space: normal; }
.tbl-runs .col-name { min-width: 150px; max-width: 240px; overflow-wrap: anywhere; }
.tbl-runs .col-progress { min-width: 130px; }
.tbl-runs .col-date { white-space: nowrap; }
.tbl-runs td.num { white-space: nowrap; }
.cell-strong { font-weight: 600; }
.cell-mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.tbl tr.row-warn td { color: var(--warn-fg); }
.tbl tr.row-ok td { color: var(--ok-fg); }
.tbl tr.row-bad td { color: var(--bad-fg); }

/* ---------- Pílulas / alertas ---------- */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill-ok { background: var(--ok-bg); color: var(--ok-fg); }
.pill-warn { background: var(--warn-bg); color: var(--warn-fg); }
.pill-risk { background: var(--risk-bg); color: var(--risk-fg); }
.pill-bad { background: var(--bad-bg); color: var(--bad-fg); }
.pill-info { background: var(--info-bg); color: var(--info-fg); }
.pill-muted { background: var(--muted-bg); color: var(--muted-fg); }
.alert { display: flex; gap: 12px; padding: 12px 16px; border-radius: var(--radius-sm); border: 1px solid; font-size: 13.5px; }
.alert b { font-weight: 600; }
.alert-ok { background: var(--ok-bg); border-color: #bfe5d1; color: var(--ok-fg); }
.alert-warn { background: var(--warn-bg); border-color: #f3dd9d; color: var(--warn-fg); }
.alert-bad { background: var(--bad-bg); border-color: #f4b6b0; color: var(--bad-fg); }
.alert-info { background: var(--info-bg); border-color: #bcd3fb; color: var(--info-fg); }
.alerts { display: flex; flex-direction: column; gap: 10px; }

/* ---------- Progresso / gráficos ---------- */
.progress { height: 8px; background: var(--muted-bg); border-radius: 999px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--primary); border-radius: 999px; transition: width 0.4s ease; }
.progress.thin { height: 5px; }
.donut-box { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.donut { width: 190px; height: 190px; flex: none; }
.donut text { fill: var(--text); }
.donut .center-num { font-size: 26px; font-weight: 700; }
.donut .center-lbl { font-size: 11px; fill: var(--text-3); }
.legend { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; min-width: 200px; flex: 1; }
.legend li { display: flex; align-items: center; gap: 10px; }
.swatch { width: 12px; height: 12px; border-radius: 3px; flex: none; }
.legend .legend-n { margin-left: auto; font-variant-numeric: tabular-nums; font-weight: 600; }
.legend .legend-p { color: var(--text-3); width: 56px; text-align: right; font-variant-numeric: tabular-nums; }
.hbars { display: flex; flex-direction: column; gap: 12px; }
.hbar-row { display: grid; grid-template-columns: minmax(120px, 230px) minmax(0, 1fr) 70px; align-items: center; gap: 12px; }
.hbar-row .hbar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar-track { height: 10px; background: var(--muted-bg); border-radius: 999px; overflow: hidden; }
.hbar-fill { height: 100%; border-radius: 999px; background: var(--primary); }
.hbar-val { text-align: right; font-variant-numeric: tabular-nums; color: var(--text-2); }
.bar-cell { width: 140px; }
.stacked { display: flex; height: 26px; border-radius: 8px; overflow: hidden; background: var(--muted-bg); }
.stacked > div { display: grid; place-items: center; font-size: 12px; font-weight: 600; color: #fff; min-width: 0; }

/* ---------- Abas / paginação ---------- */
.tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.tab { padding: 6px 12px; border-radius: 999px; border: 1px solid transparent; background: transparent; cursor: pointer; font-weight: 600; color: var(--text-2); }
.tab:hover { background: var(--muted-bg); }
.tab[aria-selected="true"] { background: var(--primary-soft); color: var(--primary); border-color: #c7d7fb; }
.tab .tab-n { font-weight: 500; opacity: 0.8; margin-left: 4px; }
.toolbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.toolbar .search { margin-left: auto; width: 260px; max-width: 100%; }
.pager { display: flex; align-items: center; gap: 10px; justify-content: flex-end; padding: 12px 18px; border-top: 1px solid var(--border); color: var(--text-3); font-size: 13px; }

/* ---------- Modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 60; background: rgba(16, 24, 40, 0.55); display: flex;
  align-items: flex-start; justify-content: center; padding: 5vh 16px; overflow-y: auto;
}
.modal { width: 100%; max-width: 760px; background: var(--surface); border-radius: 16px; box-shadow: var(--shadow-md); }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.modal-head h2 { font-size: 17px; }
.modal-body { padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.modal-foot { padding: 14px 20px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 8px; }
.info-block { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.info-block > h3 { font-size: 13px; padding: 10px 14px; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.info-cell { padding: 12px 14px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); min-width: 0; }
.info-cell .k { font-size: 12px; color: var(--text-3); }
.info-cell .v { font-weight: 600; margin-top: 2px; overflow-wrap: anywhere; }

/* ---------- Toast / vazio / esqueleto ---------- */
.toast-region { position: fixed; right: 16px; bottom: 16px; z-index: 90; display: flex; flex-direction: column; gap: 8px; max-width: min(420px, calc(100vw - 32px)); }
.toast { background: var(--text); color: #fff; padding: 11px 16px; border-radius: 10px; box-shadow: var(--shadow-md); font-size: 13.5px; }
.toast.error { background: var(--bad-fg); }
.empty { text-align: center; padding: 40px 20px; color: var(--text-3); }
.empty svg { width: 40px; height: 40px; stroke: var(--muted-solid); margin-bottom: 8px; }
.skeleton { background: linear-gradient(90deg, var(--muted-bg) 25%, #f4f5f7 37%, var(--muted-bg) 63%); background-size: 400% 100%; animation: shimmer 1.4s ease infinite; border-radius: 8px; min-height: 18px; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

/* ---------- Dropzone ---------- */
.dropzone {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center;
  min-height: 210px; border: 2px dashed var(--border-strong); border-radius: var(--radius); background: var(--surface-2);
  padding: 24px; cursor: pointer; transition: border-color 0.15s, background 0.15s;
}
.dropzone:hover, .dropzone.drag, .dropzone:focus-within { border-color: var(--primary); background: var(--primary-soft); }
.dropzone svg { width: 40px; height: 40px; stroke: var(--text-3); }
.dropzone strong { font-size: 16px; }
.dropzone input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.file-chip { display: inline-flex; gap: 8px; align-items: center; padding: 6px 12px; background: var(--primary-soft); color: var(--primary); border-radius: 999px; font-weight: 600; }

/* ---------- Login ---------- */
.login { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; background: var(--surface); }
.login-side { background: #0f172a; color: #e2e8f0; padding: 48px; display: flex; flex-direction: column; justify-content: center; gap: 28px; }
.login-side .brand { color: #fff; padding: 0; position: absolute; top: 40px; left: 48px; }
.login-side h1 { font-size: 34px; line-height: 1.15; letter-spacing: -0.02em; color: #fff; }
.login-side h1 span { color: #8fb2ff; }
.login-side p { color: #94a3b8; max-width: 46ch; }
.login-points { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.login-points li { display: flex; gap: 12px; align-items: center; color: #cbd5e1; }
.login-points svg { width: 20px; height: 20px; stroke: #8fb2ff; flex: none; }
.login-main { display: grid; place-items: center; padding: 32px; position: relative; }
.login-card { width: 100%; max-width: 380px; }
.login-card h2 { font-size: 26px; letter-spacing: -0.02em; }
.login-card .lead { color: var(--text-2); margin: 6px 0 24px; }
.login-card .pw-wrap { position: relative; }
.login-card .pw-wrap .input { padding-right: 44px; }
.login-card .pw-toggle { position: absolute; right: 4px; top: 2px; }
.login-note { margin-top: 18px; font-size: 12.5px; color: var(--text-3); display: flex; gap: 8px; }
.login-mobile-brand { display: none; }

/* ---------- Responsivo ---------- */
@media (max-width: 1100px) {
  .cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cols-main { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 960px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar {
    position: fixed; inset: 0 auto 0 0; width: min(290px, 86vw); z-index: 50;
    transform: translateX(-100%); transition: transform 0.2s ease; box-shadow: var(--shadow-md);
  }
  .app.nav-open .sidebar { transform: none; }
  .app.nav-open .scrim { display: block; position: fixed; inset: 0; z-index: 40; background: rgba(16, 24, 40, 0.45); }
  .icon-btn.sidebar-close, .icon-btn.menu-btn { display: inline-grid; }
  .topbar { padding: 10px 16px; }
  .content { padding: 18px 16px; }
  .cols-2, .cols-3 { grid-template-columns: minmax(0, 1fr); }
  .login { grid-template-columns: 1fr; }
  .login-side { display: none; }
  .login-mobile-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; margin-bottom: 28px; }
}
@media (max-width: 560px) {
  .cols-4 { grid-template-columns: minmax(0, 1fr); }
  .hbar-row { grid-template-columns: 110px minmax(0, 1fr) 70px; }
  .toolbar .search { margin-left: 0; width: 100%; }
  .page-title { font-size: 21px; }
  .chips .chip:nth-child(n + 3) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ---------- Impressão (relatório em PDF pelo navegador) ---------- */
@media print {
  body { background: #fff; }
  .sidebar, .topbar, .no-print, .toast-region, .scrim, .pager, .toolbar { display: none !important; }
  .app { display: block; }
  .content { max-width: none; padding: 0; }
  .card { box-shadow: none; break-inside: avoid; }
  .cols-main { grid-template-columns: minmax(0, 1fr); }
  .table-wrap { overflow: visible; }
}

/* Ícones do sprite SVG (ver base.html): traço herdado da cor do texto. */
svg.i { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; width: 19px; height: 19px; flex: none; }
.btn svg.i, .icon-btn svg.i { width: 17px; height: 17px; }

.donut-row { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.donut-row .donut { width: 190px; height: 190px; flex: none; }
.donut-row .legend { flex: 1; min-width: 180px; }
.export-checks { display: flex; gap: 8px 28px; flex-wrap: wrap; margin-bottom: 12px; }
.export-checks .check { margin-bottom: 0; }
.tbl .swatch { display: inline-block; vertical-align: -1px; margin-right: 6px; }

.code { background: #0f172a; color: #e2e8f0; padding: 12px 14px; border-radius: var(--radius-sm); overflow-x: auto; font: 12.5px/1.55 ui-monospace, SFMono-Regular, Menlo, monospace; margin-top: 6px; white-space: pre; }
code { background: var(--muted-bg); padding: 1px 6px; border-radius: 4px; font: 12.5px ui-monospace, SFMono-Regular, Menlo, monospace; }
.tbl tr.row-muted td { opacity: 0.55; }
.vchip { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; margin: 1px 2px 1px 0; }
.vchip-ok { background: var(--ok-bg); color: var(--ok-fg); }
.vchip-bad { background: var(--bad-bg); color: var(--bad-fg); }
.vchip-warn { background: var(--warn-bg); color: var(--warn-fg); }
.vchip-info { background: var(--info-bg); color: var(--info-fg); }
.vchip-muted { background: var(--muted-bg); color: var(--text-2); }
.daybars { display: flex; gap: 6px; align-items: flex-end; height: 170px; }
.daybar { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; }
.daybar-col { flex: 1; width: 100%; max-width: 34px; display: flex; flex-direction: column; justify-content: flex-end; background: var(--muted-bg); border-radius: 6px 6px 0 0; overflow: hidden; }
.daybar-n { font-size: 11px; color: var(--text-3); min-height: 14px; font-variant-numeric: tabular-nums; }
.daybar-l { font-size: 11px; color: var(--text-3); }
@media (max-width: 560px) { .daybar-l { font-size: 9px; } .daybars { gap: 3px; } }

.cause { border: 1px solid var(--border); border-left-width: 4px; border-radius: var(--radius-sm); padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.cause-bad { border-left-color: var(--bad-solid); }
.cause-warn { border-left-color: var(--warn-solid); }
.cause-info { border-left-color: var(--info-solid); }
.cause-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.cause-n { margin-left: auto; color: var(--text-2); font-size: 13px; }
.cause-ex { list-style: none; display: flex; flex-direction: column; gap: 3px; font-size: 12.5px; }
.cause-ex code { margin-right: 6px; }

.row-actions { display: flex; flex-direction: column; gap: 6px; align-items: stretch; min-width: 120px; }
.row-actions .btn { justify-content: center; }
