:root {
  --bg: #f6f8fc;
  --panel: #07111f;
  --card: #ffffff;
  --line: #e5eaf1;
  --text: #0f1d35;
  --muted: #64748b;
  --accent: #2563eb;
  --accent-soft: #3b82f6;
  --ok: #059669;
  --warn: #d97706;
  --bad: #dc2626;
  --info: #2563eb;
  --sidebar: #07111f;
  --sidebar-text: #e8eef6;
  --sidebar-muted: #94a3b8;
  --shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font: 14px/1.45 "Segoe UI", system-ui, sans-serif; }
button, input, select { font: inherit; }
.login-wrap { min-height: 100%; display: grid; place-items: center; background: #000; color: #f4f6f8; }
.login-card { width: min(460px, 92vw); text-align: center; }
.login-card .muted { color: #9aa7b5; }
.login-card input { background: #121a24; border-color: #1e2a38; color: #f4f6f8; }
.logo-lg { width: min(420px, 88vw); height: auto; display: block; }
.logo { width: 210px; max-width: 100%; height: auto; display: block; }
.brand-lockup {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  min-width: 0;
  text-align: center;
}
.brand-sub {
  margin: 14px 0 0;
  padding: 0;
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1.2;
}
.brand-lockup-lg { margin: 0 auto 28px; }
.brand-lockup-lg .brand-sub { margin-top: 18px; font-size: 14px; }
label { display: block; text-align: left; margin: 10px 0; color: var(--muted); }
input, select { width: 100%; margin-top: 4px; padding: 10px 12px; background: var(--card); border: 1px solid var(--line); color: var(--text); border-radius: 8px; }
button { cursor: pointer; border: 0; border-radius: 8px; padding: 10px 14px; background: var(--accent); color: #fff; }
button.ghost { background: transparent; color: var(--muted); border: 1px solid var(--line); }
button.primary { width: 100%; margin: 12px 0; }
.muted { color: var(--muted); }
.error { color: var(--bad); }

#app-view {
  display: grid;
  grid-template-columns: 268px 1fr;
  min-height: 100%;
  background: var(--bg);
  transition: grid-template-columns .2s ease;
}
#app-view.collapsed { grid-template-columns: 76px 1fr; }

#sidebar {
  background: var(--sidebar);
  color: var(--sidebar-text);
  padding: 14px 12px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 100vh;
  position: sticky;
  top: 0;
}
.sidebar-brand {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 0 8px;
  min-height: 52px;
}
.sidebar-brand .brand-lockup {
  align-items: flex-start;
  text-align: left;
  min-width: 0;
}
.sidebar-brand .brand-sub {
  grid-column: 1 / -1;
  margin-top: 16px;
  text-align: center;
  width: 100%;
}
.icon-btn {
  background: transparent;
  color: var(--sidebar-text);
  padding: 8px;
  border-radius: 8px;
  display: inline-flex;
}
.icon-btn:hover { background: rgba(255,255,255,.08); }
.side-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #0d1a2c;
  border: 1px solid #1e334d;
  border-radius: 10px;
  padding: 0 10px;
  color: var(--sidebar-muted);
  margin: 0;
}
.side-search input {
  margin: 0;
  background: transparent;
  border: 0;
  color: var(--sidebar-text);
  padding: 10px 0;
}
.side-search input::placeholder { color: #6b7c90; }
.side-nav { display: flex; flex-direction: column; gap: 6px; flex: 1; margin-top: 28px; }
.side-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  background: transparent;
  color: var(--sidebar-text);
  padding: 11px 12px;
  border-radius: 10px;
}
.side-item.active { background: var(--accent-soft); color: #fff; }

.workspace { display: flex; flex-direction: column; min-width: 0; min-height: 100vh; overflow-x: hidden; }
.workspace-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 22px 8px;
}
.head-actions { display: flex; align-items: center; gap: 8px; }
.notif-wrap { position: relative; }
.bell-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  background: #fff;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.bell-btn:hover { background: #f8fafc; }
.notif-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: #dc2626;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.notif-badge[hidden] { display: none !important; }
.notif-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: min(420px, 92vw);
  max-height: 70vh;
  overflow: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  z-index: 30;
}
.notif-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: #fff;
}
.notif-head .ghost { margin: 0; padding: 6px 10px; font-size: 12px; }
.notif-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  text-align: left;
  background: transparent;
  color: var(--text);
  padding: 10px 12px;
  border-radius: 0;
  border-bottom: 1px solid var(--line);
}
.notif-item.unread { background: #eff6ff; }
.notif-item:hover { background: #f1f5f9; }
.notif-item strong { font-size: 13px; }
.notif-product {
  font-size: 11px;
  font-weight: 650;
  color: var(--accent);
  letter-spacing: 0.01em;
}
.product-pill {
  background: #0f172a;
  color: #fff;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: 13px;
  padding: 9px 16px;
  border-radius: 12px;
  white-space: nowrap;
}
.user-menu { position: relative; }
.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  color: var(--text);
  font-weight: 600;
}
.user-dropdown {
  position: absolute;
  right: 0;
  top: 110%;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
  min-width: 140px;
  padding: 6px;
  z-index: 20;
}
.user-dropdown button {
  width: 100%;
  background: transparent;
  color: var(--text);
  text-align: left;
}
.user-dropdown button:hover { background: #f1f5f9; }

.subnav {
  display: flex;
  gap: 4px;
  padding: 0 18px 10px;
  flex-wrap: nowrap;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
}
.subnav[hidden],
#legal-footer[hidden],
#app-view:not([data-product="radar"]) .subnav,
#app-view:not([data-product="radar"]) .legal {
  display: none !important;
}
.subnav button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--muted);
  font-weight: 600;
  padding: 10px 14px;
  border-radius: 10px 10px 0 0;
  white-space: nowrap;
  flex-shrink: 0;
}
.subnav button.active {
  background: #fff;
  color: var(--accent);
  box-shadow: inset 0 -2px 0 var(--accent);
}

.source-form { margin: 0 0 16px; max-width: 640px; }
.company-unions-select { min-height: 140px; }
.source-form h3 { margin-top: 0; }
.source-form label.inline { display: flex; align-items: center; gap: 8px; }
.source-form label.inline input { width: auto; margin: 0; }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.union-cct-status { text-align: center; white-space: nowrap; }
.status-ico { width: 22px; height: 22px; display: inline-block; vertical-align: middle; }
.src-refresh { padding: 8px 12px; font-size: 13px; }
.refresh-bar {
  width: 100%;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  background: var(--accent-soft);
  font-weight: 650;
  border-radius: 10px;
  padding: 12px;
}
.job-box {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
  background: #fff;
  padding: 8px 12px;
  border-radius: 8px;
  margin-top: 8px;
  border: 1px solid var(--line);
  word-break: break-word;
}
.update-error-log {
  margin-top: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
}
.update-error-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.update-error-head h4 { margin: 0; font-size: 16px; }
.update-error-list { margin: 10px 0 0; padding-left: 20px; }
.update-error-list li { margin: 0 0 12px; }
.update-error-list .erro-msg { font-weight: 650; margin-bottom: 4px; }
.update-error-list a { word-break: break-all; font-size: 12px; }
.job-mark {
  width: 30px;
  height: 32px;
  flex: 0 0 auto;
  overflow: visible;
}
.job-mark path {
  fill: none;
  stroke: #4d93d8;
  stroke-width: 1.7;
  stroke-linecap: butt;
  stroke-linejoin: miter;
  stroke-miterlimit: 2;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  shape-rendering: geometricPrecision;
}
.job-mark .job-mark-a { animation: job-mark-draw 1.8s ease-in-out infinite; }
.job-mark .job-mark-b { animation: job-mark-draw 1.8s ease-in-out infinite 0.22s; }
@keyframes job-mark-draw {
  0% { stroke-dashoffset: 100; opacity: 1; }
  40% { stroke-dashoffset: 0; opacity: 1; }
  58% { stroke-dashoffset: 0; opacity: 1; }
  100% { stroke-dashoffset: -100; opacity: 0.18; }
}
th.sortable {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
th.sortable:hover { color: var(--accent); }
th.sortable .sort-ind { color: var(--muted); font-size: 11px; margin-left: 4px; }
th.sortable.active { color: var(--accent); }
th.sortable.active .sort-ind { color: var(--accent); }
.search-bar[hidden] { display: none !important; }
.suggest-wrap { position: relative; }
.suggest-list {
  position: absolute;
  left: 0; right: 0; top: calc(100% - 2px);
  z-index: 20;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  max-height: 220px;
  overflow: auto;
  margin: 0;
  padding: 4px 0;
  list-style: none;
  box-shadow: var(--shadow);
}
.suggest-list li {
  padding: 8px 12px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text);
}
.suggest-list li:hover, .suggest-list li.active { background: #eff6ff; }
.suggest-list .muted { display: block; font-size: 11px; }
.compare-pick {
  display: grid;
  gap: 12px;
  margin: 12px 0;
}
.compare-pick-grid {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 12px;
  align-items: end;
}
.compare-pick label { margin: 0; }
.compare-pick select { min-height: 220px; }
.compare-pick.collapsed select { min-height: 0; height: 40px; }
.compare-pick.collapsed .pick-search { display: none; }
.compare-summary {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
}
.compare-pick.collapsed .compare-summary { display: flex; }
.cmp-meta { display: flex; flex-direction: column; gap: 8px; min-width: 0; flex: 1; }
.cmp-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  font-size: 13px;
  color: var(--text);
}
.cmp-meta-row strong {
  display: block;
  font-size: 11px;
  color: var(--muted);
  font-weight: 650;
  margin-bottom: 2px;
}
.cmp-meta-row span { min-width: 140px; }
.compare-pick.collapsed .compare-pick-grid { grid-template-columns: 1fr 1fr auto; }
.compare-pick .run-cmp { height: 42px; }
@media (max-width: 900px) {
  .compare-pick-grid { grid-template-columns: 1fr; }
}

.search-bar {
  margin: 14px 22px 0;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #0f172a;
  color: #cbd5e1;
  border-radius: 12px;
  padding: 4px 16px;
}
.search-bar input {
  margin: 0;
  background: transparent;
  border: 0;
  color: #fff;
  padding: 12px 0;
}
.search-bar input::placeholder { color: #94a3b8; }
.search-user { color: #e2e8f0; font-weight: 600; white-space: nowrap; }

main { display: flex; flex-direction: column; min-width: 0; flex: 1; overflow: auto; }
.view { padding: 20px 22px; min-width: 0; }
.view h2 { margin: 0 0 14px; font-size: 22px; }
.product-placeholder {
  max-width: 720px;
  margin: 56px auto 0;
  text-align: center;
  padding: 12px 8px 40px;
}
.product-placeholder h2 {
  margin: 0 0 20px;
  font-size: clamp(32px, 5vw, 44px);
  font-weight: 750;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--text);
}
.product-placeholder p {
  margin: 0 auto;
  max-width: 62ch;
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
}
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  box-shadow: var(--shadow);
}
.card h3 { margin: 0 0 6px; font-size: 12px; color: var(--muted); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.card .n { font-size: 28px; font-weight: 650; }
.dash-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
  min-width: 0;
}
.dash-span-6 { grid-column: span 6; min-width: 0; }
.dash-panel { padding: 16px 16px 12px; overflow: hidden; }
.dash-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.dash-title {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  text-transform: none !important;
  letter-spacing: 0 !important;
  font-size: 15px !important;
  color: var(--text) !important;
  font-weight: 650 !important;
}
.dash-sub { margin: 4px 0 0; font-size: 12px; color: var(--muted); }
.dash-card-actions { flex: 0 0 auto; }
.dash-select { margin: 0; font-size: 12px; color: var(--muted); }
.dash-select select {
  width: auto;
  min-width: 140px;
  max-width: 220px;
  margin-top: 4px;
  padding: 6px 8px;
  font-size: 13px;
}
.dash-link { padding: 6px 10px; font-size: 12px; margin: 0; }
.dash-card-body { min-height: 120px; overflow: hidden; }
.dash-svg { width: 100%; height: 320px; display: block; overflow: hidden; color: #334155; }
.dash-svg-bars { height: auto; min-height: 140px; max-height: 340px; }
.dash-grid-line, .dash-grid { stroke: #e8eef5; stroke-width: 1; }
.dash-svg text,
.dash-axis,
.dash-axis-y,
.dash-axis-x,
.dash-bar-n {
  fill: #334155 !important;
  color: #334155;
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 11px;
  font-weight: 600;
  stroke: none;
  opacity: 1;
}
.dash-axis-y { text-anchor: end; }
.dash-axis-x { text-anchor: middle; }
.dash-bar.ok { fill: var(--ok); }
.dash-bar.warn { fill: var(--warn); }
.dash-bar.subst { fill: #7c3aed; }
.dash-line { stroke: var(--accent); stroke-width: 2; stroke-linejoin: miter; stroke-linecap: butt; }
.dash-dot { fill: #fff; stroke: var(--accent); stroke-width: 2; cursor: pointer; }
.dash-dot:focus, .dash-bar:focus { outline: 2px solid var(--accent); outline-offset: 2px; }
.dash-bar { cursor: pointer; }
.dash-bar.accent { fill: var(--accent); }
.dash-bar.bad { fill: #ef4444; }
.dash-empty {
  display: grid;
  place-items: center;
  min-height: 220px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
  padding: 24px;
}
.dash-error { color: var(--muted); padding: 20px; }
.dash-section { margin: 22px 0 8px; font-size: 15px; }
.dash-alerts { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 18px; margin: 0 0 14px; }
.dash-ico { flex: 0 0 auto; color: var(--muted); }
table.dash-due { background: transparent; border-radius: 0; }
table.dash-due th, table.dash-due td { padding: 8px 6px; font-size: 13px; }
table.dash-due tbody tr { cursor: pointer; }
.dash-emp-count { margin: 10px 0 0; font-size: 12px; color: var(--muted); }
table.dash-due tbody tr:hover { background: #f8fafc; }
table.dash-due tbody tr:focus { outline: 2px solid var(--accent); outline-offset: -2px; }
.due-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 650;
  border: 1px solid var(--line);
}
.due-crit { color: var(--bad); border-color: #fecaca; background: #fef2f2; }
.due-warn { color: var(--warn); border-color: #fde68a; background: #fffbeb; }
.due-info { color: var(--accent); border-color: #bfdbfe; background: #eff6ff; }
.chart-tip {
  position: fixed;
  z-index: 80;
  background: #0f172a;
  color: #f8fafc;
  font-size: 12px;
  line-height: 1.4;
  padding: 8px 10px;
  border-radius: 8px;
  box-shadow: var(--shadow);
  pointer-events: none;
  max-width: 240px;
}
.chart-tip strong, .chart-tip span { display: block; }
.chart-tip[hidden] { display: none !important; }
.skel { background: linear-gradient(90deg, #eef2f7 25%, #f8fafc 50%, #eef2f7 75%); background-size: 200% 100%; animation: skel 1.2s ease-in-out infinite; border-radius: 6px; }
.skel-h { height: 12px; width: 46%; margin-bottom: 10px; }
.skel-n { height: 26px; width: 32%; }
.skel-chart { height: 220px; width: 100%; margin-top: 8px; }
@keyframes skel { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 12px; }
.list-export { margin-top: 20px; margin-bottom: 28px; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; border: 1px solid var(--line); white-space: nowrap; }
.badge.VIGENTE { color: var(--ok); border-color: var(--ok); }
.badge.PROXIMA { color: var(--warn); border-color: var(--warn); }
.badge.VENCIDA, .badge.VENCIDA_SEM_SUCESSOR { color: var(--bad); border-color: var(--bad); }
.badge.SUBSTITUIDA { color: #7c3aed; border-color: #7c3aed; }
.badge.NOVA { color: var(--ok); }
.badge.ALTERADA { color: var(--info); }
.badge.EXCLUIDA { color: var(--bad); }
.badge.MANTIDA { color: var(--muted); }
table { width: 100%; border-collapse: collapse; background: var(--card); border-radius: 12px; overflow: hidden; }
th, td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: var(--muted); font-size: 12px; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 12px 0; }
.tabs button { background: var(--card); color: var(--text); border: 1px solid var(--line); }
.tabs button.active { border-color: var(--accent); color: var(--accent); }
.card.highlight { border-color: var(--accent); }
button.active-mode { outline: 1px solid var(--accent); }
.filter-drawer {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  margin: 0 0 14px;
}
.filter-drawer > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 14px;
  font-weight: 650;
  color: var(--text);
}
.filter-drawer > summary::-webkit-details-marker { display: none; }
.filter-drawer > summary::after {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform .15s ease;
}
.filter-drawer[open] > summary::after { transform: rotate(225deg); }
.filter-body {
  padding: 0 14px 14px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.filter-body.single { grid-template-columns: 1fr; }
.filter-group {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
}
.filter-group legend {
  font-size: 12px;
  color: var(--muted);
  font-weight: 650;
  padding: 0 4px;
}
.filter-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
}
.filter-checks label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: var(--text);
  font-size: 13px;
}
.filter-body .filter-group input[type="search"] { width: 100%; margin-top: 6px; }
.filter-group.filter-span { grid-column: 1 / -1; }
@media (max-width: 900px) {
  .filter-body { grid-template-columns: 1fr; }
}
a { color: var(--accent); }
.layers { display: grid; gap: 6px; font-size: 12px; color: var(--muted); }
.legal { padding: 12px 22px 20px; color: var(--muted); font-size: 12px; }

#app-view.collapsed .logo,
#app-view.collapsed .brand-sub,
#app-view.collapsed .side-label,
#app-view.collapsed .side-search input { display: none; }
#app-view.collapsed .sidebar-brand { justify-content: center; }
#app-view.collapsed .side-search { justify-content: center; padding: 10px; }
#app-view.collapsed .side-item { justify-content: center; padding: 12px; }

#app-view[hidden], #login-view[hidden], .view[hidden] { display: none !important; }

@media (max-width: 1100px) {
  .dash-span-6 { grid-column: 1 / -1; }
  .dash-svg { height: 280px; }
}
@media (max-width: 900px) {
  #app-view { grid-template-columns: 76px 1fr; }
  #app-view:not(.collapsed) { grid-template-columns: 248px 1fr; }
  .search-user { display: none; }
  .subnav button svg { display: none; }
  table.dash-due { display: block; overflow-x: auto; }
}

.conv-page { max-width: 1120px; margin: 0 auto; }
.conv-bc { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.linkish { background: none; color: var(--accent); padding: 0; border: 0; }
.linkish:hover { text-decoration: underline; }
.conv-head { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; margin-bottom: 16px; }
.conv-head h2 { margin: 0 0 10px; font-size: 26px; font-weight: 700; line-height: 1.25; max-width: 46rem; }
.conv-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip, .muted-chip {
  display: inline-flex; align-items: center; padding: 3px 8px; border-radius: 999px;
  border: 1px solid var(--line); font-size: 12px; color: var(--text); background: #fff;
}
.muted-chip { color: var(--muted); }
.conv-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; align-items: center; }
.conv-actions button, .conv-actions a.ghost {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; font-size: 13px;
}
.seg { display: inline-flex; background: #eef2f7; border-radius: 10px; padding: 3px; }
.seg button { background: transparent; color: var(--muted); padding: 7px 12px; }
.seg button.active { background: #fff; color: var(--accent); box-shadow: 0 1px 2px rgba(15,23,42,.08); }
.conv-notice { background: #eff6ff; border: 1px solid #bfdbfe; color: var(--text); padding: 8px 12px; border-radius: 10px; font-size: 13px; }
.conv-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 8px 0 16px; }
.kpi-mini { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; box-shadow: var(--shadow); }
.kpi-mini span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.kpi-mini strong { font-size: 18px; font-weight: 700; }
.conv-unions { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-bottom: 16px; }
.conv-unions h3 { margin: 0 0 8px; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.conv-unions ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.conv-unions li { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; }
.conv-unions summary { cursor: pointer; color: var(--accent); font-size: 13px; margin-top: 8px; }
.conv-tabs {
  display: flex; gap: 2px; overflow-x: auto; border-bottom: 1px solid var(--line); margin: 4px 0 16px;
}
.conv-tabs button {
  background: transparent; color: var(--muted); border: 0; border-bottom: 2px solid transparent;
  border-radius: 0; padding: 10px 12px; white-space: nowrap; font-size: 13px;
}
.conv-tabs button.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.mode-hint {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 12px;
}
.exec-summary, .clause-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 18px; box-shadow: var(--shadow); }
.exec-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; margin-bottom: 14px; }
.exec-head h3 { margin: 0; font-size: 16px; text-transform: none; letter-spacing: 0; color: var(--text); }
.exec-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.exec-cell { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; background: #fbfcfe; }
.exec-cell h4 { margin: 0 0 6px; font-size: 12px; color: var(--muted); font-weight: 600; }
.exec-cell p { margin: 0; }
.kpi-val { font-size: 24px; font-weight: 700; }
.kpi-val-sm { font-size: 16px; }
.chip-note { font-size: 11px; color: var(--muted); }
.muni-details { margin-top: 8px; }
.muni-details summary { cursor: pointer; color: var(--accent); font-size: 13px; }
.muni-full { margin-top: 8px; max-width: 42rem; line-height: 1.5; }
.attn { margin-top: 14px; }
.attn h4 { margin: 0 0 6px; font-size: 13px; color: var(--muted); }
.clause-card h3 { text-transform: none; letter-spacing: 0; color: var(--text); font-size: 15px; }
.clause-card pre { white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; max-width: 46rem; }
.data-table td { overflow-wrap: break-word; word-break: normal; }
.data-table td:last-child { white-space: nowrap; width: 1%; }
.rag-form { display: grid; gap: 8px; margin-top: 16px; }
.rag-form button { width: max-content; }
@media (max-width: 900px) {
  .conv-head, .exec-head, .conv-actions { flex-direction: column; align-items: stretch; }
  .conv-kpis, .exec-grid { grid-template-columns: 1fr; }
  .conv-head h2 { font-size: 22px; }
}
