/* IBC Focus Analize — design tokens 2026
   Light theme · cyan accent · ink near-black bg surfaces
   Single source of truth for the redesign. Drop into app.css verbatim. */

:root {
  /* Surfaces (cool neutral) */
  --bg: #f4f6fb;
  --bg-grain: #eff2f8;
  --surface: #ffffff;
  --surface-2: #fafbfd;
  --surface-3: #f1f4f9;
  --overlay: rgba(10, 15, 26, .55);

  /* Ink (text) */
  --ink: #0a0f1a;
  --ink-2: #1f2937;
  --ink-soft: #475467;
  --muted: #6b7385;
  --muted-2: #98a2b3;
  --line: #e3e7ef;
  --line-2: #eef1f6;
  --line-strong: #cbd2dd;

  /* Accents */
  --accent: #06b6d4;
  /* cyan-500 */
  --accent-2: #22d3ee;
  /* cyan-400 — bright */
  --accent-ink: #0e7490;
  /* cyan-700 — text on tints */
  --accent-tint: #ecfeff;
  --accent-tint-2: #cffafe;

  /* State */
  --ok: #16a34a;
  --ok-tint: #dcfce7;
  --ok-ink: #166534;
  --warn: #d97706;
  --warn-tint: #fef3c7;
  --warn-ink: #92400e;
  --bad: #dc2626;
  --bad-tint: #fee2e2;
  --bad-ink: #991b1b;
  --info: #2563eb;
  --info-tint: #dbeafe;
  --info-ink: #1d4ed8;
  --neutral: #64748b;
  --neutral-tint: #e2e8f0;

  /* Top families (kept distinct, but tuned to palette) */
  --ag: #6366f1;
  /* indigo */
  --ag-2: #818cf8;
  --ag-tint: #eef2ff;
  --p: #f97316;
  /* orange */
  --p-2: #fb923c;
  --p-tint: #fff7ed;

  /* Radius */
  --r-xs: 8px;
  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-pill: 999px;

  /* Shadows — soft, layered */
  --sh-1: 0 1px 2px rgba(10, 15, 26, .04), 0 1px 1px rgba(10, 15, 26, .03);
  --sh-2: 0 4px 12px rgba(10, 15, 26, .05), 0 1px 2px rgba(10, 15, 26, .04);
  --sh-3: 0 12px 32px rgba(10, 15, 26, .07), 0 2px 6px rgba(10, 15, 26, .04);
  --sh-4: 0 24px 60px rgba(10, 15, 26, .10), 0 4px 12px rgba(10, 15, 26, .06);
  --sh-focus: 0 0 0 4px rgba(6, 182, 212, .18);

  /* Type scale */
  --font-sans: "Geist", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --font-display: "Geist", "Inter", system-ui, sans-serif;

  /* Motion */
  --ease: cubic-bezier(.2, .7, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --dur-1: 120ms;
  --dur-2: 200ms;
  --dur-3: 380ms;

  /* Layout */
  --sidebar-w: 248px;
  --sidebar-w-collapsed: 72px;
  --topbar-h: 64px;
  --page-max: 1480px;
}

/* Geist + Geist Mono via Google Fonts (CSS2) */
@import url("https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600;700;800&family=Geist+Mono:wght@400;500;600&display=swap");

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv11", "cv09";
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
}

::selection {
  background: var(--accent-tint-2);
  color: var(--accent-ink);
}

/* Utility primitives */
.mono {
  font-family: var(--font-mono);
  font-feature-settings: "tnum", "zero";
}

.tnum {
  font-variant-numeric: tabular-nums;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}

.eyebrow svg {
  width: 13px;
  height: 13px;
}

.kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-soft);
  background: var(--surface);
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 5px;
}

/* Scrollbar */
*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

*::-webkit-scrollbar-track {
  background: transparent;
}

*::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: 999px;
  border: 2px solid var(--bg);
}

*::-webkit-scrollbar-thumb:hover {
  background: var(--muted-2);
}


/* IBC Focus — shared component styles
   Built on tokens.css. */

/* ============ APP SHELL ============ */
.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-w);
  position: sticky;
  top: 0;
  height: 100vh;
  background: var(--surface);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 16px 12px;
  z-index: 20;
  transition: width var(--dur-2) var(--ease);
}

.sidebar.collapsed {
  width: var(--sidebar-w-collapsed);
}

.sidebar.collapsed .nav-label,
.sidebar.collapsed .brand-name,
.sidebar.collapsed .nav-section-label,
.sidebar.collapsed .sidebar-foot-text {
  display: none;
}

.sidebar.collapsed .nav-item {
  justify-content: center;
  padding: 10px;
}

.sidebar.collapsed .nav-count {
  display: none;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 8px 16px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--line-2);
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--accent-2);
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: -.02em;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 30%, rgba(34, 211, 238, .4), transparent 60%);
}

.brand-mark span {
  position: relative;
  z-index: 1;
}

.brand-name {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  min-width: 0;
}

.brand-name strong {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -.01em;
  color: var(--ink);
}

.brand-name small {
  font-size: 11px;
  color: var(--muted);
}

.nav-section {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 0;
}

.nav-section+.nav-section {
  border-top: 1px solid var(--line-2);
  margin-top: 4px;
  padding-top: 12px;
}

.nav-section-label {
  padding: 4px 10px 6px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--muted-2);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 500;
  transition: background var(--dur-1) var(--ease), color var(--dur-1) var(--ease);
  position: relative;
}

.nav-item:hover {
  background: var(--surface-3);
  color: var(--ink);
}

.nav-item.active {
  background: var(--ink);
  color: #fff;
}

.nav-item.active .nav-count {
  background: rgba(255, 255, 255, .14);
  color: #fff;
}

.nav-item svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.nav-label {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-count {
  margin-left: auto;
  padding: 1px 6px;
  background: var(--surface-3);
  color: var(--muted);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  font-family: var(--font-mono);
}

.nav-item.active .nav-dot {
  background: var(--accent-2);
}

.sidebar-foot {
  margin-top: auto;
  padding: 12px 10px 4px;
  border-top: 1px solid var(--line-2);
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-foot-avatar {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--ag));
  color: #fff;
  font-weight: 600;
  font-size: 12px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.sidebar-foot-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.2;
}

.sidebar-foot-text strong {
  font-size: 12px;
  color: var(--ink);
}

.sidebar-foot-text small {
  font-size: 11px;
  color: var(--muted);
}

.collapse-btn {
  position: absolute;
  top: 24px;
  right: -10px;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--muted);
  cursor: pointer;
  box-shadow: var(--sh-1);
  z-index: 21;
}

.collapse-btn:hover {
  color: var(--ink);
}

.collapse-btn svg {
  width: 12px;
  height: 12px;
}

/* ============ MAIN ============ */
.main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 24px;
  background: rgba(255, 255, 255, .78);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px) saturate(140%);
  position: sticky;
  top: 0;
  z-index: 15;
}

.crumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  min-width: 0;
}

.crumbs a {
  color: var(--muted);
}

.crumbs a:hover {
  color: var(--ink);
}

.crumbs .sep {
  color: var(--line-strong);
}

.crumbs strong {
  color: var(--ink);
  font-weight: 600;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px 7px 12px;
  background: var(--surface-3);
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  min-width: 240px;
  transition: border-color var(--dur-1) var(--ease), background var(--dur-1) var(--ease);
}

.search-trigger:hover {
  border-color: var(--line);
  background: var(--surface);
}

.search-trigger svg {
  width: 14px;
  height: 14px;
}

.search-trigger .spacer {
  flex: 1;
}

.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: transparent;
  border: 1px solid transparent;
  display: grid;
  place-items: center;
  color: var(--ink-soft);
  cursor: pointer;
  position: relative;
  transition: background var(--dur-1) var(--ease), color var(--dur-1) var(--ease);
}

.icon-btn:hover {
  background: var(--surface-3);
  color: var(--ink);
}

.icon-btn svg {
  width: 16px;
  height: 16px;
}

.icon-btn .pip {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--bad);
  box-shadow: 0 0 0 2px var(--surface);
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 4px;
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.user-chip:hover {
  background: var(--line-2);
}

.user-chip .avatar {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--ag));
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  display: grid;
  place-items: center;
}

.page {
  padding: 28px 32px 64px;
  max-width: var(--page-max);
  width: 100%;
  margin: 0 auto;
}

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: all var(--dur-1) var(--ease);
  box-shadow: var(--sh-1);
  white-space: nowrap;
}

.btn:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
  box-shadow: var(--sh-2);
}

.btn:active {
  transform: translateY(0);
  box-shadow: var(--sh-1);
}

.btn svg {
  width: 14px;
  height: 14px;
}

.btn.primary {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.btn.primary:hover {
  background: var(--ink-2);
  border-color: var(--ink-2);
}

.btn.accent {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 6px 16px -4px rgba(6, 182, 212, .5), inset 0 1px 0 rgba(255, 255, 255, .2);
}

.btn.accent:hover {
  background: var(--accent-ink);
  border-color: var(--accent-ink);
}

.btn.ghost {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.btn.ghost:hover {
  background: var(--surface-3);
}

.btn.danger {
  color: var(--bad);
  border-color: var(--bad-tint);
  background: #fff;
}

.btn.danger:hover {
  background: var(--bad-tint);
}

.btn.sm {
  padding: 5px 10px;
  font-size: 12px;
  gap: 4px;
}

.btn.sm svg {
  width: 12px;
  height: 12px;
}

.btn.lg {
  padding: 11px 18px;
  font-size: 14px;
}

.btn.icon-only {
  padding: 8px;
  aspect-ratio: 1;
}

/* ============ CARDS / PANELS ============ */
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 20px;
}

.panel+.panel {
  margin-top: 16px;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.panel-head h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -.01em;
  color: var(--ink);
}

.panel-head p {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.panel-head .actions {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-shrink: 0;
}

/* ============ STATUS DOTS ============ */
.dot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-soft);
  white-space: nowrap;
}

.dot::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--neutral);
  flex-shrink: 0;
}

.dot.ok::before {
  background: var(--ok);
  box-shadow: 0 0 0 3px rgba(22, 163, 74, .14);
}

.dot.warn::before,
.dot.review::before,
.dot.pending::before {
  background: var(--warn);
  box-shadow: 0 0 0 3px rgba(217, 119, 6, .14);
}

.dot.bad::before,
.dot.nu::before,
.dot.failed::before {
  background: var(--bad);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, .14);
}

.dot.info::before,
.dot.queued::before {
  background: var(--info);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .14);
}

.dot.running::before {
  background: var(--ag);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, .14);
  animation: pulse 1.6s var(--ease) infinite;
}

.dot.done::before,
.dot.lockedin::before {
  background: var(--ok);
  box-shadow: 0 0 0 3px rgba(22, 163, 74, .14);
}

.dot.skipped::before,
.dot.notset::before {
  background: var(--neutral);
  box-shadow: 0 0 0 3px rgba(100, 116, 139, .14);
}

@keyframes pulse {

  0%,
  100% {
    box-shadow: 0 0 0 3px rgba(99, 102, 241, .14);
  }

  50% {
    box-shadow: 0 0 0 6px rgba(99, 102, 241, .06);
  }
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .02em;
  border-radius: 6px;
  background: var(--surface-3);
  color: var(--ink-soft);
  border: 1px solid var(--line-2);
}

.tag.ag {
  background: var(--ag-tint);
  color: var(--ag);
  border-color: transparent;
}

.tag.p {
  background: var(--p-tint);
  color: var(--p);
  border-color: transparent;
}

.tag.ok {
  background: var(--ok-tint);
  color: var(--ok-ink);
}

.tag.warn {
  background: var(--warn-tint);
  color: var(--warn-ink);
}

.tag.bad {
  background: var(--bad-tint);
  color: var(--bad-ink);
}

.tag.info {
  background: var(--info-tint);
  color: var(--info-ink);
}

.tag.accent {
  background: var(--accent-tint-2);
  color: var(--accent-ink);
}

/* ============ TABLE ============ */
.tbl-wrap {
  overflow: auto;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--surface);
}

.tbl {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
  min-width: 720px;
}

.tbl th,
.tbl td {
  padding: 12px 14px;
  text-align: left;
  vertical-align: middle;
}

.tbl thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--surface-2);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--muted);
  text-transform: uppercase;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.tbl tbody tr {
  transition: background var(--dur-1) var(--ease);
}

.tbl tbody tr:hover {
  background: var(--surface-2);
}

.tbl tbody td {
  border-bottom: 1px solid var(--line-2);
}

.tbl tbody tr:last-child td {
  border-bottom: 0;
}

.tbl td.num {
  text-align: right;
  font-family: var(--font-mono);
  font-feature-settings: "tnum";
}

.tbl th.num {
  text-align: right;
}

/* ============ FORM ============ */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field>label,
.field-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}

.input,
input[type="text"].input,
input[type="email"].input,
input[type="password"].input,
input[type="search"].input,
input[type="number"].input,
select.input,
textarea.input {
  width: 100%;
  padding: 10px 12px;
  font: 500 13px/1.4 var(--font-sans);
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
  transition: border-color var(--dur-1) var(--ease), box-shadow var(--dur-1) var(--ease);
}

.input:hover {
  border-color: var(--line-strong);
}

.input:focus {
  border-color: var(--accent);
  box-shadow: var(--sh-focus);
}

textarea.input {
  resize: vertical;
  min-height: 64px;
}

/* ============ COMMAND PALETTE ============ */
.cmdk-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--overlay);
  backdrop-filter: blur(4px);
  display: grid;
  place-items: start center;
  padding-top: 12vh;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-2) var(--ease);
}

.cmdk-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.cmdk {
  width: min(640px, 92vw);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--sh-4);
  overflow: hidden;
  transform: translateY(-8px);
  transition: transform var(--dur-2) var(--ease-out);
}

.cmdk-overlay.open .cmdk {
  transform: translateY(0);
}

.cmdk-input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line-2);
}

.cmdk-input-wrap svg {
  width: 16px;
  height: 16px;
  color: var(--muted);
}

.cmdk-input {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  font: 500 14px/1.5 var(--font-sans);
  color: var(--ink);
}

.cmdk-list {
  max-height: 50vh;
  overflow-y: auto;
  padding: 6px;
}

.cmdk-group-label {
  padding: 8px 10px 4px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.cmdk-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--ink);
  cursor: pointer;
}

.cmdk-item:hover,
.cmdk-item.active {
  background: var(--surface-3);
}

.cmdk-item svg {
  width: 14px;
  height: 14px;
  color: var(--muted);
}

.cmdk-item .cmdk-meta {
  margin-left: auto;
  font-size: 11px;
  color: var(--muted);
  font-family: var(--font-mono);
}

.cmdk-foot {
  display: flex;
  gap: 16px;
  padding: 8px 16px;
  border-top: 1px solid var(--line-2);
  background: var(--surface-2);
  font-size: 11px;
  color: var(--muted);
}

.cmdk-foot span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* ============ TOAST ============ */
.toast-stack {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--ink);
  color: #fff;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--sh-4);
  min-width: 280px;
  max-width: 380px;
  animation: toast-in .3s var(--ease-out);
}

.toast svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.toast.ok svg {
  color: #4ade80;
}

.toast.bad svg {
  color: #fca5a5;
}

.toast.info svg {
  color: var(--accent-2);
}

.toast .x {
  margin-left: auto;
  opacity: .5;
  cursor: pointer;
}

.toast .x:hover {
  opacity: 1;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(.97);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ============ EMPTY STATES ============ */
.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
  color: var(--muted);
}

.empty-art {
  width: 96px;
  height: 96px;
  margin-bottom: 16px;
  border-radius: 24px;
  background: radial-gradient(circle at 30% 30%, var(--accent-tint), var(--surface-3));
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
}

.empty-art::before {
  content: "";
  position: absolute;
  inset: -20%;
  background: repeating-linear-gradient(45deg, transparent 0, transparent 8px, rgba(6, 182, 212, .07) 8px, rgba(6, 182, 212, .07) 9px);
}

.empty-art svg {
  width: 36px;
  height: 36px;
  color: var(--accent-ink);
  position: relative;
  z-index: 1;
}

.empty h3 {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.empty p {
  margin: 0;
  font-size: 13px;
  max-width: 320px;
}

/* ============ SKELETON ============ */
.skel {
  background: linear-gradient(90deg, var(--surface-3) 0%, var(--line-2) 50%, var(--surface-3) 100%);
  background-size: 200% 100%;
  animation: skel 1.4s ease-in-out infinite;
  border-radius: 6px;
}

@keyframes skel {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

/* ============ HELPERS ============ */
.row {
  display: flex;
  gap: 12px;
  align-items: center;
}

.row.between {
  justify-content: space-between;
}

.row.wrap {
  flex-wrap: wrap;
}

.col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.divider {
  height: 1px;
  background: var(--line-2);
  margin: 16px 0;
}

.muted {
  color: var(--muted);
}

.danger {
  color: var(--bad);
}

.ink-soft {
  color: var(--ink-soft);
}

.spacer {
  flex: 1;
}



/* ===== dashboard.html ===== */
/* === Dashboard A — editorial / spotlight === */
.hero {
  position: relative;
  border-radius: var(--r-xl);
  overflow: hidden;
  padding: 36px 40px 32px;
  background: var(--ink);
  color: #fff;
  margin-bottom: 24px;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.hero::before {
  inset: 0;
  background:
    radial-gradient(ellipse at 90% 20%, rgba(34, 211, 238, .32), transparent 50%),
    radial-gradient(ellipse at 10% 110%, rgba(99, 102, 241, .22), transparent 60%);
}

.hero::after {
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px);
  background-size: 32px 32px;
  mask: linear-gradient(180deg, rgba(0, 0, 0, .6), transparent 70%);
}

.hero>* {
  position: relative;
  z-index: 1;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: end;
}

.hero h1 {
  margin: 8px 0 4px;
  font-size: 36px;
  line-height: 1.05;
  letter-spacing: -.025em;
  font-weight: 600;
}

.hero h1 em {
  font-style: normal;
  color: var(--accent-2);
}

.hero p {
  margin: 8px 0 0;
  max-width: 560px;
  color: rgba(255, 255, 255, .65);
  font-size: 14px;
}

.hero .eyebrow {
  color: var(--accent-2);
}

.hero-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.hero-actions .btn {
  background: rgba(255, 255, 255, .08);
  border-color: rgba(255, 255, 255, .12);
  color: #fff;
  backdrop-filter: blur(8px);
}

.hero-actions .btn:hover {
  background: rgba(255, 255, 255, .14);
}

.hero-actions .btn.accent {
  background: var(--accent-2);
  color: var(--ink);
  border-color: var(--accent-2);
}

.hero-actions .btn.accent:hover {
  background: #fff;
}

.hero-meta {
  display: flex;
  gap: 28px;
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, .08);
}

.hero-meta-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hero-meta-item small {
  font-size: 11px;
  color: rgba(255, 255, 255, .5);
  text-transform: uppercase;
  letter-spacing: .12em;
  font-weight: 600;
}

.hero-meta-item strong {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -.02em;
  font-feature-settings: "tnum";
}

.hero-meta-item .delta {
  font-size: 12px;
  color: #4ade80;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.hero-meta-item .delta svg {
  width: 12px;
  height: 12px;
}

/* KPI tiles */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.kpi {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 16px 18px 18px;
  position: relative;
  overflow: hidden;
  transition: transform var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease);
}

.kpi:hover {
  transform: translateY(-2px);
  box-shadow: var(--sh-3);
}

.kpi-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
}

.kpi-label svg {
  width: 13px;
  height: 13px;
}

.kpi-val {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -.025em;
  line-height: 1;
  color: var(--ink);
  font-feature-settings: "tnum";
}

.kpi-val small {
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  margin-left: 4px;
  letter-spacing: 0;
}

.kpi-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  font-size: 12px;
}

.kpi-foot .delta {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  border-radius: 6px;
  font-weight: 600;
}

.kpi-foot .delta.up {
  background: var(--ok-tint);
  color: var(--ok-ink);
}

.kpi-foot .delta.down {
  background: var(--bad-tint);
  color: var(--bad-ink);
}

.kpi-foot .delta.flat {
  background: var(--surface-3);
  color: var(--muted);
}

.kpi-foot .delta svg {
  width: 11px;
  height: 11px;
}

.kpi-foot small {
  color: var(--muted);
}

.kpi-spark {
  position: absolute;
  right: 12px;
  bottom: 12px;
  opacity: .55;
}

.kpi-spark svg {
  width: 90px;
  height: 32px;
}

/* Working edition section */
.editions {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

.edition-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 22px 24px;
  position: relative;
  overflow: hidden;
}

.edition-card.working {
  background: linear-gradient(135deg, var(--ink) 0%, #111827 100%);
  color: #fff;
  border-color: transparent;
}

.edition-card.working::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 100% 0%, rgba(34, 211, 238, .2), transparent 50%);
  pointer-events: none;
}

.edition-card.working>* {
  position: relative;
  z-index: 1;
}

.edition-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.edition-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.edition-title h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -.01em;
}

.edition-title .pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  font-size: 10px;
  font-weight: 600;
  background: var(--accent-tint-2);
  color: var(--accent-ink);
  border-radius: 6px;
  letter-spacing: .04em;
}

.edition-card.working .edition-title .pill {
  background: rgba(34, 211, 238, .15);
  color: var(--accent-2);
}

.progress-rings {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  padding: 12px 0;
}

.ring-item {
  display: flex;
  align-items: center;
  gap: 16px;
}

.ring {
  width: 72px;
  height: 72px;
  position: relative;
  flex-shrink: 0;
}

.ring svg {
  transform: rotate(-90deg);
}

.ring-bg {
  fill: none;
  stroke: rgba(255, 255, 255, .1);
  stroke-width: 7;
}

.ring-fg {
  fill: none;
  stroke-width: 7;
  stroke-linecap: round;
  transition: stroke-dashoffset 1s var(--ease-out);
}

.ring-fg.ag {
  stroke: url(#g-ag);
}

.ring-fg.p {
  stroke: url(#g-p);
}

.ring-pct {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -.02em;
}

.ring-info {
  min-width: 0;
}

.ring-info strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 2px;
}

.ring-info small {
  font-size: 11px;
  color: rgba(255, 255, 255, .55);
  display: block;
  line-height: 1.4;
}

.ed-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, .08);
}

.ed-stat {
  padding: 0 12px;
  border-right: 1px solid rgba(255, 255, 255, .08);
}

.ed-stat:first-child {
  padding-left: 0;
}

.ed-stat:last-child {
  border-right: 0;
}

.ed-stat small {
  display: block;
  font-size: 10px;
  color: rgba(255, 255, 255, .5);
  text-transform: uppercase;
  letter-spacing: .1em;
  font-weight: 600;
  margin-bottom: 4px;
}

.ed-stat strong {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -.02em;
}

.ed-actions {
  display: flex;
  gap: 8px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, .08);
}

.ed-actions .btn {
  background: rgba(255, 255, 255, .06);
  border-color: rgba(255, 255, 255, .1);
  color: #fff;
}

.ed-actions .btn:hover {
  background: rgba(255, 255, 255, .12);
}

.ed-actions .btn.accent {
  background: var(--accent-2);
  color: var(--ink);
  border-color: var(--accent-2);
}

/* Live activity */
.activity-card {
  padding: 22px 24px;
}

.activity-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.activity-head h2 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
}

.activity-head .live {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--ok-ink);
  font-weight: 600;
}

.activity-head .live::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--ok);
  animation: pulse-dot 1.6s var(--ease) infinite;
}

@keyframes pulse-dot {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(22, 163, 74, .4);
  }

  50% {
    box-shadow: 0 0 0 5px rgba(22, 163, 74, 0);
  }
}

.activity-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.activity-row {
  display: grid;
  grid-template-columns: 14px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line-2);
  font-size: 13px;
}

.activity-row:last-child {
  border-bottom: 0;
}

.activity-row .marker {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  margin-left: 3px;
}

.activity-row .marker.ok {
  background: var(--ok);
}

.activity-row .marker.bad {
  background: var(--bad);
}

.activity-row .marker.run {
  background: var(--ag);
  animation: pulse 1.6s infinite;
}

.activity-row .marker.queue {
  background: var(--info);
}

.activity-row .desc {
  color: var(--ink);
}

.activity-row .desc small {
  color: var(--muted);
  display: block;
  font-size: 11px;
  margin-top: 1px;
}

.activity-row .time {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
}

/* Sync status grid */
.sync-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin: 0 0 20px;
}

.sync-tile {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 14px 16px;
  transition: all var(--dur-2) var(--ease);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sync-tile:hover {
  transform: translateY(-1px);
  box-shadow: var(--sh-2);
  border-color: var(--line-strong);
}

.sync-tile .row1 {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sync-tile .row1 .dot {
  font-size: 11px;
}

.sync-tile .row1 .icon-small {
  color: var(--muted);
}

.sync-tile .row1 .icon-small svg {
  width: 14px;
  height: 14px;
}

.sync-tile strong {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -.02em;
  font-feature-settings: "tnum";
}

.sync-tile small {
  color: var(--muted);
  font-size: 11px;
}

.sync-tile.danger {
  border-color: rgba(220, 38, 38, .3);
  background: linear-gradient(180deg, var(--surface), rgba(254, 226, 226, .4));
}

/* Two-col bottom */
.bottom-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 16px;
}

/* Errors mini list */
.err-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.err-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface);
  transition: all var(--dur-2) var(--ease);
}

.err-row:hover {
  border-color: var(--line-strong);
  transform: translateX(2px);
}

.err-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--bad-tint);
  color: var(--bad-ink);
  flex-shrink: 0;
}

.err-icon svg {
  width: 16px;
  height: 16px;
}

.err-meta strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

.err-meta small {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 1px;
}

.err-meta .err-msg {
  color: var(--bad-ink);
  font-family: var(--font-mono);
  font-size: 11px;
}

.err-row .time {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}

/* Top contributors / "Top movers" preview */
.movers {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.mover-row {
  display: grid;
  grid-template-columns: 22px 1fr auto auto;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line-2);
  font-size: 13px;
}

.mover-row:last-child {
  border-bottom: 0;
}

.mover-rank {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-align: right;
}

.mover-name {
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mover-name small {
  display: block;
  color: var(--muted);
  font-weight: 400;
  font-size: 11px;
}

.mover-spark {
  width: 60px;
  height: 22px;
}

.mover-val {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink);
  text-align: right;
  min-width: 70px;
}

/* SVG defs */
.svg-defs {
  width: 0;
  height: 0;
  position: absolute;
}

@media (max-width: 1240px) {
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .editions,
  .bottom-grid {
    grid-template-columns: 1fr;
  }

  .sync-row {
    grid-template-columns: repeat(3, 1fr);
  }
}



/* ===== top-list.html ===== */
/* ============ TOP LIST ============ */
.topl-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: end;
  margin-bottom: 16px;
}

.topl-title h1 {
  margin: 6px 0 6px;
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -.025em;
}

.topl-title h1 .pill {
  display: inline-flex;
  vertical-align: middle;
  margin-left: 8px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-mono);
  background: var(--ag-tint);
  color: var(--ag);
  border-radius: 6px;
  letter-spacing: 0;
  line-height: 1;
}

.topl-title p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  max-width: 700px;
}

.topl-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* Year tabs */
.year-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--surface-3);
  border-radius: 10px;
  width: fit-content;
  margin-bottom: 16px;
}

.year-tab {
  padding: 7px 14px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  transition: all var(--dur-1) var(--ease);
}

.year-tab:hover {
  color: var(--ink);
}

.year-tab.active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--sh-1);
  font-weight: 600;
}

.year-tab .new {
  font-size: 9px;
  font-weight: 600;
  padding: 1px 5px;
  background: var(--accent-2);
  color: var(--ink);
  border-radius: 3px;
  margin-left: 6px;
  vertical-align: middle;
}

/* Summary strip */
.topl-strip {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  margin-bottom: 16px;
}

.topl-strip>div {
  padding: 14px 16px;
  border-right: 1px solid var(--line-2);
}

.topl-strip>div:last-child {
  border-right: 0;
}

.topl-strip small {
  font-size: 11px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 5px;
}

.topl-strip strong {
  display: block;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -.02em;
  margin-top: 4px;
  font-feature-settings: "tnum";
}

.topl-strip .delta {
  font-size: 11px;
  color: var(--muted);
}

.topl-strip .delta b {
  color: var(--ink);
  font-weight: 600;
}

/* Layout: minimap + table */
.topl-body {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 12px;
}

/* Minimap */
.minimap {
  position: sticky;
  top: 80px;
  height: calc(100vh - 100px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  gap: 1px;
  align-self: start;
  overflow: hidden;
}

.minimap .label {
  font-size: 9px;
  font-weight: 700;
  color: var(--muted);
  text-align: center;
  letter-spacing: .14em;
  text-transform: uppercase;
  padding: 4px 0 6px;
  border-bottom: 1px solid var(--line-2);
  margin-bottom: 4px;
}

.minimap-cells {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1px;
  overflow: hidden;
}

.mm-cell {
  flex: 1;
  min-height: 4px;
  max-height: 8px;
  border-radius: 1px;
  cursor: pointer;
  position: relative;
  transition: transform .12s var(--ease), opacity .12s var(--ease);
}

.mm-cell:hover {
  transform: scaleX(1.4);
  z-index: 2;
}

.mm-cell.locked {
  background: var(--ok);
}

.mm-cell.pending {
  background: var(--warn);
}

.mm-cell.notset {
  background: var(--line-strong);
}

.mm-cell.viewport-marker {
  border: 1px solid var(--accent);
  background: var(--accent-tint-2);
  height: 80px;
  max-height: 80px;
  min-height: 80px;
  border-radius: 4px;
  margin: 1px 0;
}

.mm-cell .num {
  position: absolute;
  left: 100%;
  top: 0;
  transform: translateX(4px);
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--muted);
  background: var(--surface);
  padding: 1px 4px;
  border-radius: 3px;
  border: 1px solid var(--line);
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
  z-index: 3;
}

.mm-cell:hover .num {
  opacity: 1;
}

/* Filter / toolbar */
.topl-toolbar {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 10px 12px;
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.topl-toolbar .search {
  flex: 1;
  min-width: 240px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: var(--surface-3);
  border-radius: 8px;
  color: var(--muted);
}

.topl-toolbar .search svg {
  width: 14px;
  height: 14px;
}

.topl-toolbar .search input {
  flex: 1;
  border: 0;
  background: transparent;
  outline: 0;
  font: inherit;
  color: var(--ink);
}

.filter-chip-group {
  display: flex;
  gap: 4px;
  padding: 3px;
  background: var(--surface-3);
  border-radius: 8px;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  border-radius: 6px;
  transition: all var(--dur-1) var(--ease);
}

.filter-chip:hover {
  color: var(--ink);
}

.filter-chip.active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--sh-1);
  font-weight: 600;
}

.filter-chip .count {
  font-family: var(--font-mono);
  color: var(--muted);
  font-size: 10px;
  padding: 1px 5px;
  background: var(--surface);
  border-radius: 4px;
}

.filter-chip.active .count {
  background: var(--surface-3);
}

/* TABLE — top list specific */
.topl-table-wrap {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
}

.topl-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
  min-width: 1200px;
}

.topl-table thead tr.group-row th {
  padding: 10px 14px 4px;
  background: var(--surface-2);
  border-bottom: 0;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--muted-2);
  text-transform: uppercase;
  text-align: left;
}

.topl-table thead tr.group-row th.bdr-l {
  border-left: 1px solid var(--line);
}

.topl-table thead tr.head-row th {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--surface-2);
  padding: 8px 14px 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--muted);
  text-transform: uppercase;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

.topl-table thead tr.head-row th.num {
  text-align: right;
}

.topl-table thead tr.head-row th.bdr-l {
  border-left: 1px solid var(--line);
}

.topl-table tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line-2);
  vertical-align: middle;
}

.topl-table tbody tr:hover td {
  background: var(--surface-2);
}

.topl-table tbody tr:last-child td {
  border-bottom: 0;
}

.topl-table tbody td.bdr-l {
  border-left: 1px solid var(--line);
}

.topl-table .num {
  text-align: right;
  font-family: var(--font-mono);
  font-feature-settings: "tnum";
  font-size: 12px;
}

.topl-ca-head,
.preview-ca-head {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  line-height: 1.05;
}

.topl-ca-head strong,
.preview-ca-head strong {
  font: inherit;
  font-weight: 800;
}

.topl-ca-head small,
.preview-ca-head small {
  color: var(--muted-2);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .03em;
}

.topl-ca-values,
.preview-ca-values {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  line-height: 1.08;
  font-variant-numeric: tabular-nums;
}

.topl-ca-values strong,
.preview-ca-values strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.topl-ca-values small,
.preview-ca-values small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
}

/* Sticky first cols */
.topl-table th.sticky-l,
.topl-table td.sticky-l {
  position: sticky;
  left: 0;
  z-index: 4;
  background: var(--surface);
}

.topl-table thead th.sticky-l {
  background: var(--surface-2);
  z-index: 6;
}

.topl-table tr:hover td.sticky-l {
  background: var(--surface-2);
}

.topl-table th.sticky-l.col-name,
.topl-table td.sticky-l.col-name {
  left: 100px;
}

.topl-table th.sticky-l.shadow,
.topl-table td.sticky-l.shadow {
  box-shadow: 4px 0 8px -4px rgba(10, 15, 26, .06);
}

/* Rank cell */
.rank-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}

.rank-num {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -.02em;
  color: var(--ink);
  min-width: 28px;
}

.rank-num.top1 {
  color: var(--p);
}

.rank-num.top3 {
  color: var(--ag);
}

.rank-move {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  padding: 1px 4px;
  border-radius: 4px;
}

.rank-move.up {
  background: var(--ok-tint);
  color: var(--ok-ink);
}

.rank-move.down {
  background: var(--bad-tint);
  color: var(--bad-ink);
}

.rank-move.flat {
  background: var(--surface-3);
  color: var(--muted);
}

/* Company cell */
.co-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 240px;
}

.co-logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--surface-3), var(--bg-grain));
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 12px;
  flex-shrink: 0;
  border: 1px solid var(--line-2);
}

.co-meta {
  min-width: 0;
}

.co-meta strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

.co-meta strong:hover {
  color: var(--accent-ink);
  cursor: pointer;
}

.co-meta small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  font-family: var(--font-mono);
}

/* Sparkline cell */
.spark-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: flex-end;
  min-width: 80px;
}

.spark-cell svg {
  width: 70px;
  height: 22px;
}

.spark-cell small {
  font-size: 10px;
  color: var(--muted);
  font-family: var(--font-mono);
}

/* Status select (inline) */
.status-select {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  background: var(--surface-3);
  color: var(--ink-soft);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--dur-1) var(--ease);
}

.status-select:hover {
  border-color: var(--line-strong);
}

.status-select.ok {
  background: var(--ok-tint);
  color: var(--ok-ink);
}

.status-select.nu {
  background: var(--bad-tint);
  color: var(--bad-ink);
}

.status-select.missing-reason {
  box-shadow: 0 0 0 2px rgba(220, 38, 38, .16);
}

.status-reason-alert {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 17px;
  height: 17px;
  margin-left: 5px;
  border-radius: 999px;
  background: #f59e0b;
  color: #fff;
  font-size: 11px;
  line-height: 1;
  font-weight: 900;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, .16);
  vertical-align: middle;
}

.status-reason-alert[hidden] {
  display: none !important;
}

.status-select.review {
  background: var(--warn-tint);
  color: var(--warn-ink);
}

.status-select::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: currentColor;
  flex-shrink: 0;
}

.status-select::after {
  content: "";
  width: 0;
  height: 0;
  border-left: 3px solid transparent;
  border-right: 3px solid transparent;
  border-top: 4px solid currentColor;
  opacity: .6;
  margin-left: 2px;
}

.lock-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.lock-pill.lockedin {
  background: var(--ok-tint);
  color: var(--ok-ink);
}

.lock-pill.pending {
  background: var(--warn-tint);
  color: var(--warn-ink);
}

.lock-pill.notset {
  background: var(--surface-3);
  color: var(--muted);
}

.lock-pill svg {
  width: 10px;
  height: 10px;
}

/* Ranking heat indicator */
.rev-bar {
  width: 56px;
  height: 4px;
  border-radius: 999px;
  background: var(--surface-3);
  position: relative;
  overflow: hidden;
  display: inline-block;
  vertical-align: middle;
  margin-left: 6px;
}

.rev-bar i {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  background: linear-gradient(90deg, var(--accent), var(--ag));
  border-radius: 999px;
}

@media (max-width:1240px) {
  .topl-strip {
    grid-template-columns: repeat(3, 1fr);
  }

  .topl-body {
    grid-template-columns: 1fr;
  }

  .minimap {
    display: none;
  }
}



/* ===== company-detail.html ===== */
/* ============ COMPANY DETAIL ============ */
.co-hero {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 0;
  margin-bottom: 16px;
  overflow: hidden;
}

.co-hero-top {
  padding: 28px 32px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: start;
  border-bottom: 1px solid var(--line);
}

.co-id {
  display: flex;
  gap: 18px;
  align-items: flex-start;
}

.co-id .lg {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--ink), #1f293a);
  color: var(--accent-2);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -.02em;
  flex-shrink: 0;
  box-shadow: var(--sh-1);
}

.co-id .info {
  min-width: 0;
}

.co-id .info>div:first-child {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 6px;
}

.co-id h1 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 600;
  letter-spacing: -.025em;
  line-height: 1.1;
}

.co-id .legal {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.co-id .legal span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.co-id .legal strong {
  color: var(--ink);
  font-family: var(--font-mono);
  font-weight: 500;
}

.co-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.co-actions .btn {
  white-space: nowrap;
}

.co-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.co-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  background: var(--surface-3);
  color: var(--ink-soft);
}

.co-pill.live {
  background: var(--ok-tint);
  color: var(--ok-ink);
}

.co-pill.live::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--ok);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: .4;
  }
}

.co-pill.ag {
  background: var(--ag-tint);
  color: var(--ag);
}

.co-pill.p {
  background: var(--p-tint);
  color: var(--p);
}

.co-hero-tabs {
  display: flex;
  gap: 0;
  padding: 0 32px;
  background: var(--surface);
}

.co-tab {
  padding: 14px 18px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all var(--dur-1) var(--ease);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  position: relative;
}

.co-tab:hover {
  color: var(--ink);
}

.co-tab.active {
  color: var(--ink);
  border-bottom-color: var(--ink);
  font-weight: 600;
}

.co-tab svg {
  width: 14px;
  height: 14px;
  opacity: .7;
}

.co-tab .badge {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--surface-3);
  color: var(--muted);
}

.co-tab.active .badge {
  background: var(--ag-tint);
  color: var(--ag);
}

/* TOP RANKING STRIPE */
.rank-strip {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.rank-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 18px 20px;
  position: relative;
  overflow: hidden;
}

.rank-card .rk-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.rank-card .rk-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.rank-card .rk-state {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .04em;
}

.rank-card .rk-state.locked {
  background: var(--ok-tint);
  color: var(--ok-ink);
}

.rank-card .rk-state.pending {
  background: var(--warn-tint);
  color: var(--warn-ink);
}

.rank-card .rk-state.notset {
  background: var(--surface-3);
  color: var(--muted);
}

.rank-card .rk-state svg {
  width: 10px;
  height: 10px;
}

.rank-card .pos {
  font-family: var(--font-display);
  font-size: 56px;
  font-weight: 600;
  letter-spacing: -.04em;
  line-height: 1;
  color: var(--ink);
}

.rank-card .pos small {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--muted);
  font-weight: 500;
  margin-left: 4px;
  letter-spacing: 0;
}

.rank-card .move {
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
}

.rank-card .move.up {
  color: var(--ok-ink);
}

.rank-card .move.down {
  color: var(--bad-ink);
}

.rank-card .move.flat {
  color: var(--muted);
}

.rank-card.empty .pos {
  color: var(--muted);
  font-size: 36px;
  line-height: 56px;
}

/* MAIN GRID */
.co-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 16px;
}

/* Section block */
.section-block {
  margin-bottom: 16px;
}

.section-block:last-child {
  margin-bottom: 0;
}

.section-block .panel {
  margin: 0;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}

.stat-grid>div {
  padding: 18px 20px;
  border-right: 1px solid var(--line-2);
  border-bottom: 1px solid var(--line-2);
}

.stat-grid>div:nth-child(4n) {
  border-right: 0;
}

.stat-grid>div:nth-last-child(-n+4) {
  border-bottom: 0;
}

.stat-grid small {
  font-size: 11px;
  color: var(--muted);
  display: block;
  margin-bottom: 4px;
}

.stat-grid strong {
  display: block;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -.02em;
  font-feature-settings: "tnum";
}

.stat-grid .delta {
  font-size: 11px;
}

.stat-grid .delta.up {
  color: var(--ok-ink);
}

.stat-grid .delta.down {
  color: var(--bad-ink);
}

/* Financial chart */
.fin-chart {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 22px 24px;
}

.fin-chart-svg {
  width: 100%;
  height: 280px;
  display: block;
  margin-top: 18px;
}

.fin-legend {
  display: flex;
  gap: 20px;
  align-items: center;
}

.fin-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}

.fin-legend i {
  width: 10px;
  height: 10px;
  border-radius: 2px;
}

/* Side panel */
.side-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.side-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 18px 20px;
}

.side-card h3 {
  margin: 0 0 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.side-card .row {
  display: flex;
  justify-content: space-between;
  padding: 7px 0;
  font-size: 13px;
  border-bottom: 1px dashed var(--line-2);
}

.side-card .row:last-child {
  border-bottom: 0;
}

.side-card .row .lbl {
  color: var(--muted);
}

.side-card .row .val {
  font-weight: 500;
  color: var(--ink);
  text-align: right;
}

.side-card .row .val.mono {
  font-family: var(--font-mono);
  font-size: 12px;
}

/* People list */
.person-row {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line-2);
}

.person-row:last-child {
  border-bottom: 0;
}

.person-row .av {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: var(--surface-3);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-soft);
  border: 1px solid var(--line-2);
}

.person-row .nm {
  font-size: 13px;
  font-weight: 600;
}

.person-row small {
  font-size: 11px;
  color: var(--muted);
  display: block;
}

.person-row .rl {
  font-size: 11px;
  padding: 2px 7px;
  background: var(--surface-3);
  color: var(--ink-soft);
  border-radius: 4px;
  font-weight: 500;
}

/* Notes / status edit */
.review-form {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 22px 24px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: .04em;
  text-transform: uppercase;
}

.field .ctrl {
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  font: inherit;
  font-size: 13px;
  color: var(--ink);
  transition: border-color var(--dur-1) var(--ease), box-shadow var(--dur-1) var(--ease);
}

.field .ctrl:focus {
  outline: 0;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-tint);
}

.field textarea.ctrl {
  resize: vertical;
  min-height: 80px;
  font-family: inherit;
}

.field .help {
  font-size: 11px;
  color: var(--muted);
}

.field-radio {
  display: flex;
  gap: 8px;
}

.field-radio label {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  background: var(--surface);
  transition: all var(--dur-1) var(--ease);
  text-transform: none;
  letter-spacing: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.field-radio label:hover {
  border-color: var(--line-strong);
  color: var(--ink);
}

.field-radio input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.field-radio label.is-active,
.field-radio label:has(input:checked) {
  border-color: transparent;
  font-weight: 700;
}

.field-radio label.is-active::before,
.field-radio label:has(input:checked)::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  flex: 0 0 7px;
}

.field-radio label.status-ok.is-active,
.field-radio label.status-ok:has(input:checked) {
  background: var(--ok-tint);
  color: var(--ok-ink);
}

.field-radio label.status-ok.is-active::before,
.field-radio label.status-ok:has(input:checked)::before {
  background: var(--ok);
}

.field-radio label.status-nu.is-active,
.field-radio label.status-nu:has(input:checked) {
  background: var(--bad-tint);
  color: var(--bad-ink);
}

.field-radio label.status-nu.is-active::before,
.field-radio label.status-nu:has(input:checked)::before {
  background: var(--bad);
}

.field-radio label.status-review.is-active,
.field-radio label.status-review:has(input:checked) {
  background: var(--warn-tint);
  color: var(--warn-ink);
}

.field-radio label.status-review.is-active::before,
.field-radio label.status-review:has(input:checked)::before {
  background: var(--warn);
}

.toggle-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 12px 14px;
  background: var(--surface-2);
  border-radius: 10px;
  margin-bottom: 10px;
}

.toggle-row strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
}

.toggle-row small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

/* Switch */
.sw {
  display: inline-block;
  width: 36px;
  height: 20px;
  background: var(--line-strong);
  border-radius: 999px;
  position: relative;
  cursor: pointer;
  transition: background var(--dur-1) var(--ease);
}

.sw::after {
  content: "";
  position: absolute;
  left: 2px;
  top: 2px;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #fff;
  box-shadow: var(--sh-1);
  transition: transform var(--dur-1) var(--ease);
}

.sw.on {
  background: var(--accent);
}

.sw.on::after {
  transform: translateX(16px);
}

@media (max-width:1100px) {
  .co-grid {
    grid-template-columns: 1fr;
  }

  .rank-strip {
    grid-template-columns: repeat(2, 1fr);
  }

  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}



/* ===== import.html ===== */
/* Drop zone */
.upload-zone {
  background: var(--surface);
  border: 2px dashed var(--line-strong);
  border-radius: var(--r-lg);
  padding: 48px 32px;
  text-align: center;
  transition: all var(--dur-1) var(--ease);
  cursor: pointer;
  margin-bottom: 24px;
}

.upload-zone:hover {
  border-color: var(--accent);
  background: var(--accent-tint);
}

.upload-zone .ic {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--accent-tint);
  color: var(--accent-ink);
  display: grid;
  place-items: center;
  margin: 0 auto 16px;
}

.upload-zone .ic svg {
  width: 28px;
  height: 28px;
}

.upload-zone h2 {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -.01em;
}

.upload-zone p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.upload-zone .browse {
  color: var(--accent-ink);
  font-weight: 600;
}

/* Wizard */
.wizard-steps {
  display: flex;
  gap: 0;
  align-items: center;
  margin-bottom: 24px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}

.wstep {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
}

.wstep .num {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--muted);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
}

.wstep.done .num {
  background: var(--ok);
  color: #fff;
}

.wstep.active .num {
  background: var(--ink);
  color: #fff;
}

.wstep small {
  display: block;
  font-size: 10px;
  color: var(--muted);
  letter-spacing: .1em;
  text-transform: uppercase;
  font-weight: 600;
}

.wstep strong {
  font-size: 13px;
  font-weight: 600;
}

.wstep.active strong {
  color: var(--ink);
}

.wstep:not(:last-child)::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
  margin: 0 14px;
}

/* History list */
.history-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
}

.imp-row {
  display: grid;
  grid-template-columns: 8px 36px 1fr 100px 110px 110px 110px 90px;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line-2);
  transition: background var(--dur-1) var(--ease);
}

.imp-row:last-child {
  border-bottom: 0;
}

.imp-row:hover {
  background: var(--surface-2);
}

.imp-row .stripe {
  width: 4px;
  align-self: stretch;
}

.imp-row.ok .stripe {
  background: var(--ok);
}

.imp-row.warn .stripe {
  background: var(--warn);
}

.imp-row.bad .stripe {
  background: var(--bad);
}

.imp-row.run .stripe {
  background: var(--accent);
  animation: runPulse 1.4s ease-in-out infinite;
}

@keyframes runPulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: .35;
  }
}

.imp-row .file-ic {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #ecfdf5;
  color: #065f46;
  display: grid;
  place-items: center;
}

.imp-row .file-ic svg {
  width: 18px;
  height: 18px;
}

.imp-row .meta strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
}

.imp-row .meta small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
  font-family: var(--font-mono);
}

.imp-row .target {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 600;
  background: var(--surface-3);
  color: var(--ink-soft);
}

.imp-row .target.ag {
  background: var(--ag-tint);
  color: var(--ag);
}

.imp-row .target.p {
  background: var(--p-tint);
  color: var(--p);
}

.imp-row .num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-soft);
}

.imp-row .num strong {
  color: var(--ink);
  display: block;
  font-size: 13px;
}

.imp-row .status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}

.imp-row .status-pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: currentColor;
}

.imp-row .status-pill.ok {
  background: var(--ok-tint);
  color: var(--ok-ink);
}

.imp-row .status-pill.bad {
  background: var(--bad-tint);
  color: var(--bad-ink);
}

.imp-row .status-pill.warn {
  background: var(--warn-tint);
  color: var(--warn-ink);
}

.imp-row .status-pill.run {
  background: var(--accent-tint);
  color: var(--accent-ink);
}

/* Help card */
.help-card {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 18px 20px;
  margin-bottom: 16px;
}

.help-card h3 {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.help-card ul {
  margin: 0;
  padding-left: 18px;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.8;
}

.help-card code {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 1px 5px;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: 4px;
}

/* Header layout */
.imp-head {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 16px;
  margin-bottom: 18px;
}

.imp-head h1 {
  margin: 4px 0 6px;
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -.025em;
}

.imp-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  max-width: 600px;
}

/* Two col layout */
.imp-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 16px;
}



/* ===== import-detail.html ===== */
/* Wizard reused */
.wizard-steps {
  display: flex;
  gap: 0;
  align-items: center;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  margin-bottom: 16px;
}

.wstep {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
}

.wstep .num {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--muted);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
}

.wstep.done .num {
  background: var(--ok);
  color: #fff;
}

.wstep.active .num {
  background: var(--ink);
  color: #fff;
}

.wstep small {
  display: block;
  font-size: 10px;
  color: var(--muted);
  letter-spacing: .1em;
  text-transform: uppercase;
  font-weight: 600;
}

.wstep strong {
  font-size: 13px;
  font-weight: 600;
}

.wstep:not(:last-child)::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
  margin: 0 14px;
}

.wstep.done strong {
  color: var(--ok-ink);
}

.wstep.active strong {
  color: var(--ink);
}

/* File summary */
.file-summary {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 16px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 18px 20px;
  margin-bottom: 16px;
}

.file-summary .ic {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: linear-gradient(135deg, #d1fae5, #a7f3d0);
  color: #065f46;
  display: grid;
  place-items: center;
}

.file-summary .ic svg {
  width: 28px;
  height: 28px;
}

.file-summary h2 {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 600;
}

.file-summary p {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.file-summary p span {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}

.file-summary p strong {
  color: var(--ink);
  font-family: var(--font-mono);
}

/* Validation strip */
.val-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  margin-bottom: 16px;
}

.val-strip>div {
  padding: 18px 20px;
  border-right: 1px solid var(--line-2);
}

.val-strip>div:last-child {
  border-right: 0;
}

.val-strip small {
  font-size: 11px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 5px;
}

.val-strip strong {
  display: block;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -.02em;
  margin-top: 4px;
}

.val-strip .delta {
  font-size: 11px;
}

.val-strip strong.ok {
  color: var(--ok-ink);
}

.val-strip strong.warn {
  color: var(--warn-ink);
}

.val-strip strong.bad {
  color: var(--bad-ink);
}

/* Diff bar / progress */
.diff-bar {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 18px 22px;
  margin-bottom: 16px;
}

.diff-bar h3 {
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.diff-bar h3 small {
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
}

.bar {
  height: 28px;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  background: var(--surface-3);
}

.bar>div {
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  transition: flex var(--dur-2) var(--ease);
}

.bar .ok-seg {
  background: var(--ok);
  flex: 60;
}

.bar .upd-seg {
  background: var(--accent);
  flex: 26;
}

.bar .new-seg {
  background: var(--p);
  flex: 8;
}

.bar .warn-seg {
  background: var(--warn);
  color: var(--warn-ink);
  flex: 4;
}

.bar .bad-seg {
  background: var(--bad);
  flex: 2;
}

.bar-legend {
  display: flex;
  gap: 16px;
  margin-top: 12px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--muted);
}

.bar-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.bar-legend i {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  display: inline-block;
}

.bar-legend strong {
  color: var(--ink);
  font-family: var(--font-mono);
}

/* Filter chips */
.imp-filters {
  display: flex;
  gap: 4px;
  padding: 3px;
  background: var(--surface-3);
  border-radius: 8px;
  width: fit-content;
  margin-bottom: 12px;
}

.imp-filter {
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.imp-filter:hover {
  color: var(--ink);
}

.imp-filter.active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--sh-1);
  font-weight: 600;
}

.imp-filter .count {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 1px 5px;
  background: var(--surface);
  border-radius: 4px;
  color: var(--muted);
}

.imp-filter.active .count {
  background: var(--surface-3);
}

.imp-filter.warn-active.active {
  background: var(--warn-tint);
  color: var(--warn-ink);
}

.imp-filter.bad-active.active {
  background: var(--bad-tint);
  color: var(--bad-ink);
}

/* Diff table */
.diff-table-wrap {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
}

.diff-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}

.diff-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--surface-2);
  padding: 10px 14px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .14em;
  color: var(--muted-2);
  text-transform: uppercase;
  text-align: left;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.diff-table thead th.num {
  text-align: right;
}

.diff-table tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line-2);
  vertical-align: middle;
}

.diff-table tbody tr:last-child td {
  border-bottom: 0;
}

.diff-table tbody tr.warn {
  background: linear-gradient(90deg, var(--warn-tint), transparent 30%);
}

.diff-table tbody tr.bad {
  background: linear-gradient(90deg, var(--bad-tint), transparent 30%);
}

.diff-table .num {
  text-align: right;
  font-family: var(--font-mono);
  font-size: 12px;
}

.diff-table .row-state {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.row-state.add {
  background: var(--p-tint);
  color: var(--p);
}

.row-state.upd {
  background: var(--accent-tint);
  color: var(--accent-ink);
}

.row-state.same {
  background: var(--surface-3);
  color: var(--muted);
}

.row-state.warn {
  background: var(--warn-tint);
  color: var(--warn-ink);
}

.row-state.err {
  background: var(--bad-tint);
  color: var(--bad-ink);
}

.diff-row-num {
  font-family: var(--font-mono);
  color: var(--muted);
  font-size: 11px;
}

/* Inline diff */
.val-pair {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.val-pair .from {
  font-size: 11px;
  color: var(--muted);
  text-decoration: line-through;
  font-family: var(--font-mono);
}

.val-pair .to {
  font-size: 12px;
  color: var(--ink);
  font-family: var(--font-mono);
  font-weight: 500;
}

.val-pair .to.up {
  color: var(--ok-ink);
}

.val-pair .to.down {
  color: var(--bad-ink);
}

/* Error / warning marker */
.err-mark {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--bad-ink);
  margin-top: 4px;
  background: var(--bad-tint);
  padding: 3px 7px;
  border-radius: 4px;
  font-weight: 500;
}

.err-mark.warn {
  color: var(--warn-ink);
  background: var(--warn-tint);
}

.err-mark svg {
  width: 11px;
  height: 11px;
}

/* Sticky bottom action bar */
.action-bar {
  position: sticky;
  bottom: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 14px 20px;
  margin-top: 16px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 16px;
  box-shadow: 0 -4px 12px rgba(10, 15, 26, .04);
}

.action-bar .summary {
  font-size: 13px;
  color: var(--ink-soft);
}

.action-bar .summary strong {
  color: var(--ink);
  font-weight: 600;
}

.action-bar .summary .ok {
  color: var(--ok-ink);
}

.action-bar .summary .warn {
  color: var(--warn-ink);
}

.action-bar .actions {
  display: flex;
  gap: 8px;
}

/* Confirmation checkbox */
.confirm-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--ink-soft);
  cursor: pointer;
}

.confirm-row input {
  display: none;
}

.confirm-row .check {
  width: 16px;
  height: 16px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  display: grid;
  place-items: center;
  background: var(--surface);
  transition: all var(--dur-1) var(--ease);
}

.confirm-row input:checked+.check {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.confirm-row input:checked+.check::after {
  content: "✓";
  font-size: 11px;
  line-height: 1;
  font-weight: 700;
}

.id-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: end;
  margin-bottom: 18px;
}

.id-head h1 {
  margin: 4px 0;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -.02em;
}

.id-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}



/* ===== sync.html ===== */
/* ============ SYNC PAGE ============ */
.sync-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  margin-bottom: 16px;
}

.sync-strip>div {
  padding: 18px 20px;
  border-right: 1px solid var(--line-2);
}

.sync-strip>div:last-child {
  border-right: 0;
}

.sync-strip small {
  font-size: 11px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 5px;
}

.sync-strip strong {
  display: block;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -.02em;
  margin-top: 4px;
  font-feature-settings: "tnum";
}

.sync-strip .delta {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

.sync-strip .delta.bad {
  color: var(--bad-ink);
}

.sync-strip .delta.ok {
  color: var(--ok-ink);
}

.sync-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 16px;
}

/* Filters bar */
.filters-bar {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.filters-bar .search {
  flex: 1;
  min-width: 220px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: var(--surface-3);
  border-radius: 8px;
  color: var(--muted);
}

.filters-bar .search svg {
  width: 14px;
  height: 14px;
}

.filters-bar .search input {
  flex: 1;
  border: 0;
  background: transparent;
  outline: 0;
  font: inherit;
  color: var(--ink);
}

.seg-group {
  display: flex;
  gap: 4px;
  padding: 3px;
  background: var(--surface-3);
  border-radius: 8px;
}

.seg {
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.seg:hover {
  color: var(--ink);
}

.seg.active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--sh-1);
  font-weight: 600;
}

.seg .count {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 1px 5px;
  background: var(--surface);
  border-radius: 4px;
  color: var(--muted);
}

.seg.active .count {
  background: var(--surface-3);
}

.seg.bad-active.active {
  background: var(--bad-tint);
  color: var(--bad-ink);
}

.seg.ok-active.active {
  background: var(--ok-tint);
  color: var(--ok-ink);
}

.seg.warn-active.active {
  background: var(--warn-tint);
  color: var(--warn-ink);
}

/* Joblist table */
.joblist {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
}

.job-row {
  display: grid;
  grid-template-columns: 8px 110px 1fr 130px 110px 90px 110px 36px;
  align-items: center;
  padding: 0;
  border-bottom: 1px solid var(--line-2);
  cursor: pointer;
  transition: background var(--dur-1) var(--ease);
  font-size: 13px;
}

.job-row:last-child {
  border-bottom: 0;
}

.job-row:hover {
  background: var(--surface-2);
}

.job-row.active {
  background: var(--accent-tint);
}

.job-row.active .left-stripe {
  background: var(--accent);
}

.job-row>* {
  padding: 12px 10px;
}

.job-row .left-stripe {
  align-self: stretch;
  width: 4px;
  padding: 0;
  margin-right: 6px;
}

.job-row.failed .left-stripe {
  background: var(--bad);
}

.job-row.success .left-stripe {
  background: var(--ok);
}

.job-row.running .left-stripe {
  background: var(--accent);
  animation: runPulse 1.4s ease-in-out infinite;
}

.job-row.queued .left-stripe {
  background: var(--warn);
}

.job-row.skipped .left-stripe {
  background: var(--neutral);
}

@keyframes runPulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: .35;
  }
}

.job-row .ts {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.job-row .ts strong {
  color: var(--ink);
  font-size: 12px;
  font-weight: 500;
}

.job-row .meta strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
}

.job-row .meta small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
  font-family: var(--font-mono);
}

.job-row .meta .tag {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  background: var(--surface-3);
  color: var(--ink-soft);
  margin-right: 4px;
}

.job-row .meta .tag.anaf {
  background: #e0f2fe;
  color: #075985;
}

.job-row .meta .tag.onrc {
  background: #fef3c7;
  color: #92400e;
}

.job-row .meta .tag.import {
  background: #ede9fe;
  color: #5b21b6;
}

.job-row .meta .tag.cron {
  background: #f1f5f9;
  color: #334155;
}

.job-row .target {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-soft);
}

.job-row .target small {
  display: block;
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 10px;
}

.job-row .duration {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
}

.job-row .duration strong {
  display: block;
  color: var(--ink);
  font-size: 12px;
  font-weight: 500;
}

.job-row .attempts {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
}

.job-row .attempts strong {
  color: var(--ink);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .02em;
}

.status-pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: currentColor;
}

.status-pill.success {
  background: var(--ok-tint);
  color: var(--ok-ink);
}

.status-pill.failed {
  background: var(--bad-tint);
  color: var(--bad-ink);
}

.status-pill.running {
  background: var(--accent-tint);
  color: var(--accent-ink);
}

.status-pill.queued {
  background: var(--warn-tint);
  color: var(--warn-ink);
}

.status-pill.skipped {
  background: var(--surface-3);
  color: var(--muted);
}

.job-row .more {
  color: var(--muted);
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
}

.job-row .more svg {
  width: 14px;
  height: 14px;
}

/* Right: detail drawer */
.detail-drawer {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  position: sticky;
  top: 80px;
  align-self: start;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.detail-head {
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 1;
}

.detail-head .lbl {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 4px;
  font-weight: 500;
}

.detail-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -.02em;
  line-height: 1.2;
}

.detail-head .close {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface);
  display: grid;
  place-items: center;
  cursor: pointer;
  color: var(--muted);
}

.detail-head .close:hover {
  color: var(--ink);
  border-color: var(--line-strong);
}

.detail-body {
  padding: 18px 20px;
  flex: 1;
}

.detail-body h3 {
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.detail-body h3:not(:first-child) {
  margin-top: 22px;
}

.kv {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.kv>div {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px dashed var(--line-2);
  font-size: 12px;
}

.kv>div:last-child {
  border-bottom: 0;
}

.kv .lbl {
  color: var(--muted);
}

.kv .val {
  font-weight: 500;
  color: var(--ink);
}

.kv .val.mono {
  font-family: var(--font-mono);
}

.kv .val.bad {
  color: var(--bad-ink);
  font-weight: 600;
}

.kv .val.ok {
  color: var(--ok-ink);
  font-weight: 600;
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-left: 4px;
  border-left: 1px solid var(--line);
}

.timeline-item {
  padding: 8px 0 8px 18px;
  position: relative;
  font-size: 12px;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 13px;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--surface);
  border: 2px solid var(--neutral);
}

.timeline-item.ok::before {
  border-color: var(--ok);
  background: var(--ok);
}

.timeline-item.bad::before {
  border-color: var(--bad);
  background: var(--bad);
}

.timeline-item.run::before {
  border-color: var(--accent);
}

.timeline-item .ts {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted);
  display: block;
  margin-bottom: 2px;
}

.timeline-item strong {
  display: block;
  font-size: 12px;
  font-weight: 600;
}

.timeline-item small {
  display: block;
  color: var(--muted);
  margin-top: 2px;
}

.code-block {
  background: var(--ink);
  color: #cbd5e1;
  border-radius: 8px;
  padding: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.6;
  overflow-x: auto;
  white-space: pre;
  border: 1px solid #1f293a;
}

.code-block .key {
  color: var(--accent-2);
}

.code-block .str {
  color: #fca5a5;
}

.code-block .num-tok {
  color: #a7f3d0;
}

.code-block .err {
  color: #fda4af;
  font-weight: 600;
}

.err-banner {
  background: var(--bad-tint);
  border: 1px solid var(--bad);
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 14px;
  display: grid;
  grid-template-columns: 16px 1fr;
  gap: 10px;
  align-items: start;
  color: var(--bad-ink);
}

.err-banner svg {
  width: 16px;
  height: 16px;
  margin-top: 1px;
}

.err-banner strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 2px;
}

.err-banner small {
  font-size: 12px;
  line-height: 1.5;
}

.detail-actions {
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  background: var(--surface);
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  position: sticky;
  bottom: 0;
  z-index: 1;
}

/* Health summary card */
.health-card {
  background: var(--ink);
  color: #fff;
  border-radius: var(--r-md);
  padding: 18px 20px;
  margin-bottom: 16px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.health-card::after {
  content: "";
  position: absolute;
  right: -40px;
  top: -40px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(34, 211, 238, .18), transparent 60%);
}

.health-card>* {
  position: relative;
}

.health-card .h-text {
  display: flex;
  align-items: center;
  gap: 14px;
}

.health-card .h-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .08);
  display: grid;
  place-items: center;
  color: var(--accent-2);
}

.health-card .h-icon svg {
  width: 22px;
  height: 22px;
}

.health-card h2 {
  margin: 0 0 2px;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -.01em;
}

.health-card p {
  margin: 0;
  font-size: 12px;
  color: rgba(255, 255, 255, .6);
}

.health-card .h-meter {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 600;
  letter-spacing: -.03em;
  line-height: 1;
  color: var(--accent-2);
}

.health-card .h-meter small {
  display: block;
  font-size: 11px;
  color: rgba(255, 255, 255, .5);
  font-weight: 400;
  letter-spacing: .04em;
  margin-top: 2px;
}

@media (max-width:1100px) {
  .sync-layout {
    grid-template-columns: 1fr;
  }

  .sync-strip {
    grid-template-columns: repeat(2, 1fr);
  }

  .job-row {
    grid-template-columns: 4px 1fr 100px 36px;
    gap: 8px;
  }

  .job-row .ts,
  .job-row .target,
  .job-row .duration {
    display: none;
  }
}



/* ===== schema.html ===== */
.sch-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: end;
  margin-bottom: 18px;
}

.sch-head h1 {
  margin: 4px 0 6px;
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -.025em;
}

.sch-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  max-width: 600px;
}

.sch-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  margin-bottom: 16px;
}

.sch-strip>div {
  padding: 16px 18px;
  border-right: 1px solid var(--line-2);
}

.sch-strip>div:last-child {
  border-right: 0;
}

.sch-strip small {
  font-size: 11px;
  color: var(--muted);
}

.sch-strip strong {
  display: block;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  margin-top: 2px;
  font-feature-settings: "tnum";
}

/* Layout: sidebar tables + main content */
.sch-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 16px;
}

/* Tables list (left) */
.tables-list {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 8px;
  position: sticky;
  top: 80px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  align-self: start;
}

.tables-list h3 {
  margin: 8px 10px 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.tables-list .search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  margin: 4px 0 8px;
  background: var(--surface-3);
  border-radius: 8px;
  color: var(--muted);
}

.tables-list .search svg {
  width: 13px;
  height: 13px;
}

.tables-list .search input {
  flex: 1;
  border: 0;
  background: transparent;
  outline: 0;
  font: inherit;
  font-size: 12px;
  color: var(--ink);
}

.tbl-link {
  display: grid;
  grid-template-columns: 16px 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 7px 10px;
  border-radius: 7px;
  cursor: pointer;
  font-size: 13px;
  transition: background var(--dur-1) var(--ease);
}

.tbl-link:hover {
  background: var(--surface-2);
}

.tbl-link.active {
  background: var(--accent-tint);
  color: var(--accent-ink);
  font-weight: 600;
}

.tbl-link .ic {
  color: var(--muted);
}

.tbl-link.active .ic {
  color: var(--accent-ink);
}

.tbl-link .ic svg {
  width: 13px;
  height: 13px;
}

.tbl-link .nm {
  font-family: var(--font-mono);
  font-size: 12px;
}

.tbl-link .cnt {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted);
}

/* Main content */
.sch-main {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ER diagram canvas */
.erd {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 22px;
  position: relative;
}

.erd-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.erd-head h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}

.erd-head .legend {
  display: flex;
  gap: 14px;
  font-size: 11px;
  color: var(--muted);
}

.erd-head .legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.erd-head .legend i {
  width: 8px;
  height: 8px;
  border-radius: 2px;
}

.erd-canvas {
  position: relative;
  width: 100%;
  height: 480px;
  background:
    radial-gradient(circle at 1px 1px, rgba(10, 15, 26, .05) 1px, transparent 1px) 0 0/16px 16px,
    var(--bg);
  border: 1px solid var(--line-2);
  border-radius: 10px;
  overflow: hidden;
}

.er-table {
  position: absolute;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  min-width: 180px;
  box-shadow: var(--sh-1);
  transition: transform var(--dur-1) var(--ease), box-shadow var(--dur-1) var(--ease);
  overflow: hidden;
  z-index: 2;
}

.er-table:hover {
  transform: translateY(-2px);
  box-shadow: var(--sh-2);
  z-index: 3;
}

.er-table.primary {
  border-color: var(--accent);
  border-width: 2px;
}

.er-table.primary .er-name {
  background: var(--ink);
  color: var(--accent-2);
}

.er-name {
  padding: 8px 12px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.er-name .cnt {
  font-size: 10px;
  color: var(--muted);
  font-weight: 400;
}

.er-table.primary .er-name .cnt {
  color: rgba(255, 255, 255, .6);
}

.er-cols {
  padding: 4px 0;
}

.er-cols .col {
  display: grid;
  grid-template-columns: 14px 1fr auto;
  gap: 8px;
  padding: 4px 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  align-items: center;
}

.er-cols .col .key {
  font-size: 9px;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 3px;
  letter-spacing: .04em;
}

.er-cols .col .key.pk {
  background: var(--p-tint);
  color: var(--p);
}

.er-cols .col .key.fk {
  background: var(--accent-tint);
  color: var(--accent-ink);
}

.er-cols .col .nm {
  color: var(--ink);
}

.er-cols .col .ty {
  color: var(--muted);
  font-size: 10px;
}

.er-svg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.er-svg path {
  fill: none;
  stroke: var(--line-strong);
  stroke-width: 1.5;
}

.er-svg path.fk {
  stroke: var(--accent);
  stroke-dasharray: none;
}

.er-svg circle {
  fill: var(--accent);
}

/* Detail card */
.sch-detail {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
}

.sch-detail-head {
  padding: 22px 24px;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  background: var(--surface);
}

.sch-detail-head .ti {
  display: flex;
  align-items: center;
  gap: 14px;
}

.sch-detail-head .ti .ic {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--accent-2);
  display: grid;
  place-items: center;
}

.sch-detail-head .ti .ic svg {
  width: 22px;
  height: 22px;
}

.sch-detail-head h2 {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -.01em;
}

.sch-detail-head p {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.sch-detail-head .meta {
  display: flex;
  gap: 14px;
}

.sch-detail-head .meta div small {
  display: block;
  font-size: 10px;
  color: var(--muted);
  letter-spacing: .1em;
  text-transform: uppercase;
  font-weight: 600;
}

.sch-detail-head .meta div strong {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
}

.col-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}

.col-table thead th {
  text-align: left;
  padding: 10px 18px;
  background: var(--surface-2);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted-2);
  border-bottom: 1px solid var(--line);
}

.col-table tbody td {
  padding: 10px 18px;
  border-bottom: 1px solid var(--line-2);
}

.col-table tbody tr:last-child td {
  border-bottom: 0;
}

.col-table tbody tr:hover {
  background: var(--surface-2);
}

.col-table .col-name {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
}

.col-table .col-ty {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-soft);
}

.col-table .key-pill {
  display: inline-flex;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .05em;
}

.col-table .key-pill.pk {
  background: var(--p-tint);
  color: var(--p);
}

.col-table .key-pill.fk {
  background: var(--accent-tint);
  color: var(--accent-ink);
}

.col-table .key-pill.uk {
  background: var(--ag-tint);
  color: var(--ag);
}

.col-table .key-pill.idx {
  background: var(--surface-3);
  color: var(--muted);
}

.col-table .nullable {
  font-size: 11px;
  color: var(--muted);
}

.col-table .nullable.no {
  color: var(--ink);
}

.col-table .desc {
  font-size: 12px;
  color: var(--ink-soft);
}

/* Indexes / FK panels */
.sch-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.info-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 20px 22px;
}

.info-card h3 {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 600;
}

.info-card p {
  margin: 0 0 12px;
  font-size: 12px;
  color: var(--muted);
}

.info-row {
  display: flex;
  justify-content: space-between;
  padding: 7px 0;
  border-bottom: 1px dashed var(--line-2);
  font-size: 12px;
}

.info-row:last-child {
  border-bottom: 0;
}

.info-row .lbl {
  color: var(--muted);
  font-family: var(--font-mono);
}

.info-row .val {
  font-family: var(--font-mono);
  font-weight: 500;
}

/* SQL block */
.sql-block {
  background: var(--ink);
  color: #cbd5e1;
  border-radius: 10px;
  padding: 18px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.7;
  overflow-x: auto;
  white-space: pre;
  border: 1px solid #1f293a;
}

.sql-block .kw {
  color: #60a5fa;
  font-weight: 600;
}

.sql-block .ty {
  color: #fcd34d;
}

.sql-block .str {
  color: #fca5a5;
}

.sql-block .com {
  color: #64748b;
  font-style: italic;
}

@media (max-width:1100px) {
  .sch-layout {
    grid-template-columns: 1fr;
  }

  .tables-list {
    position: static;
  }

  .sch-row-2 {
    grid-template-columns: 1fr;
  }
}



/* ===== auth.html ===== */
body.auth-body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font: 400 14px/1.5 var(--font-sans);
  display: grid;
  place-items: center;
  padding: 20px;
}

.login {
  width: 100%;
  max-width: 960px;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--sh-2);
}

.left {
  background: var(--ink);
  color: #fff;
  padding: 48px 44px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 540px;
}

.left::after {
  content: "";
  position: absolute;
  right: -120px;
  bottom: -120px;
  width: 360px;
  height: 360px;
  background: radial-gradient(circle, rgba(34, 211, 238, .18), transparent 60%);
  pointer-events: none;
}

.left>* {
  position: relative;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand .glyph {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--accent-2);
  color: var(--ink);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
}

.brand strong {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -.01em;
}

.brand small {
  display: block;
  font-size: 10px;
  color: rgba(255, 255, 255, .5);
  letter-spacing: .12em;
  text-transform: uppercase;
  font-weight: 600;
}

.left h1 {
  font-family: var(--font-display);
  font-size: 42px;
  font-weight: 600;
  letter-spacing: -.03em;
  margin: 0 0 14px;
  line-height: 1.05;
}

.left h1 em {
  font-style: italic;
  color: var(--accent-2);
}

.left p {
  color: rgba(255, 255, 255, .65);
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
  max-width: 360px;
}

.left .meta {
  display: flex;
  gap: 24px;
  font-size: 11px;
  color: rgba(255, 255, 255, .5);
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, .1);
  font-family: var(--font-mono);
}

.right {
  padding: 48px 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.right h2 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -.02em;
}

.right p {
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 13px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.field label {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: .04em;
  text-transform: uppercase;
}

.field .ctrl {
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  font: inherit;
  font-size: 13px;
  color: var(--ink);
  transition: border-color var(--dur-1) var(--ease), box-shadow var(--dur-1) var(--ease);
}

.field .ctrl:focus {
  outline: 0;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-tint);
}

.field-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  margin-bottom: 18px;
}

.field-row a {
  color: var(--accent-ink);
  text-decoration: none;
  font-weight: 500;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.check-row input {
  display: none;
}

.check-row .ck {
  width: 16px;
  height: 16px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  display: grid;
  place-items: center;
  font-size: 11px;
  line-height: 1;
  transition: all var(--dur-1) var(--ease);
}

.check-row input:checked+.ck {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.check-row input:checked+.ck::after {
  content: "✓";
  font-weight: 700;
}

.submit {
  width: 100%;
  padding: 12px;
  border: 0;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font: 600 14px var(--font-sans);
  cursor: pointer;
  transition: opacity var(--dur-1) var(--ease);
}

.submit:hover {
  opacity: .9;
}

.footer {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  margin-top: 22px;
}

.err-msg {
  background: var(--bad-tint);
  color: var(--bad-ink);
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 12px;
  margin-bottom: 16px;
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.err-msg svg {
  width: 14px;
  height: 14px;
  margin-top: 1px;
  flex-shrink: 0;
}

/* Tabs at top */
.demo-tabs {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 10;
  display: flex;
  gap: 4px;
  padding: 3px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--sh-1);
}

.demo-tab {
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  border-radius: 7px;
}

.demo-tab:hover {
  color: var(--ink);
}

.demo-tab.active {
  background: var(--ink);
  color: #fff;
  font-weight: 600;
}

/* INSTALL */
.install {
  width: 100%;
  max-width: 720px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--sh-2);
  display: none;
}

.install.show {
  display: block;
}

.ins-head {
  padding: 32px 36px 16px;
  border-bottom: 1px solid var(--line);
}

.ins-head h1 {
  margin: 12px 0 6px;
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -.025em;
}

.ins-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.ins-steps {
  display: flex;
  padding: 18px 36px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}

.ins-step {
  flex: 1;
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
}

.ins-step .n {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--muted);
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 600;
}

.ins-step.done .n {
  background: var(--ok);
  color: #fff;
}

.ins-step.active .n {
  background: var(--ink);
  color: #fff;
}

.ins-step.active {
  color: var(--ink);
  font-weight: 600;
}

.ins-step:not(:last-child)::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
  margin: 0 10px;
}

.ins-body {
  padding: 30px 36px;
}

.ins-checks {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 24px;
}

.ins-check {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px dashed var(--line-2);
}

.ins-check:last-child {
  border-bottom: 0;
}

.ins-check .ic {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--ok);
  color: #fff;
  display: grid;
  place-items: center;
}

.ins-check.bad .ic {
  background: var(--bad);
}

.ins-check.warn .ic {
  background: var(--warn);
  color: var(--warn-ink);
}

.ins-check .ic svg {
  width: 14px;
  height: 14px;
}

.ins-check strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
}

.ins-check small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
  font-family: var(--font-mono);
}

.ins-check .v {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-soft);
}

.btn-row {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.btn-pri {
  padding: 10px 18px;
  border: 0;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font: 600 13px var(--font-sans);
  cursor: pointer;
}

.btn-gh {
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font: 500 13px var(--font-sans);
  cursor: pointer;
}

/* ERROR */
.errpage {
  display: none;
  text-align: center;
  max-width: 520px;
}

.errpage.show {
  display: block;
}

.errpage .num {
  font-family: var(--font-display);
  font-size: 180px;
  font-weight: 600;
  letter-spacing: -.06em;
  color: var(--ink);
  line-height: .85;
  margin-bottom: 8px;
  background: linear-gradient(180deg, var(--ink), #475569);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.errpage h2 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -.02em;
  margin: 0 0 12px;
}

.errpage p {
  color: var(--muted);
  margin: 0 0 24px;
  font-size: 14px;
}

.err-meta {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-soft);
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-bottom: 24px;
}

.err-meta strong {
  color: var(--ink);
  font-weight: 500;
}



/* ===== charts.html ===== */
.page {
  padding: 32px clamp(20px, 4vw, 56px) 80px;
  max-width: 1640px;
  margin: 0 auto;
}

.ph {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: end;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 28px;
}

.ph .crumbs {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 10px;
  font-family: var(--font-mono);
}

.ph .crumbs span {
  color: var(--ink);
}

.ph h1 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 38px;
  font-weight: 600;
  letter-spacing: -.03em;
  line-height: 1.05;
}

.ph h1 em {
  font-style: italic;
  color: var(--accent-ink);
  font-weight: 500;
}

.ph p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  max-width: 640px;
  line-height: 1.5;
}

.ph .meta {
  display: flex;
  gap: 28px;
  align-items: center;
}

.ph .meta .stat {
  text-align: right;
}

.ph .meta .stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -.02em;
  line-height: 1;
}

.ph .meta .stat small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: .08em;
}

/* Theme toggle bar */
.theme-bar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--sh-1);
  margin-bottom: 28px;
}

.theme-bar .lbl {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.theme-bar .picks {
  display: flex;
  gap: 18px;
}

.theme-bar .pick {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.theme-bar .pick>span {
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--muted);
}

.theme-bar .swatches {
  display: flex;
  gap: 6px;
}

.swatch {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease);
  position: relative;
}

.swatch:hover {
  transform: translateY(-1px);
}

.swatch.active {
  border-color: var(--ink);
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--ink);
}

.filterbar {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-left: auto;
}

.fb-chip {
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-soft);
  cursor: pointer;
  transition: background var(--dur-1) var(--ease);
}

.fb-chip:hover {
  background: var(--surface-3);
}

.fb-chip.active {
  background: var(--ink);
  color: #fff;
  font-weight: 600;
}

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

@media (max-width: 1100px) {
  .grid {
    grid-template-columns: 1fr;
  }
}

.ch-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: var(--sh-1);
  display: flex;
  flex-direction: column;
  transition: box-shadow var(--dur-2) var(--ease);
}

.ch-card:hover {
  box-shadow: var(--sh-2);
}

.ch-card.full {
  grid-column: 1 / -1;
}

.ch-head {
  padding: 18px 22px 14px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: start;
  border-bottom: 1px solid var(--line-2);
}

.ch-head .lbl {
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--accent-ink);
  background: var(--accent-tint);
  padding: 3px 7px;
  border-radius: 4px;
  letter-spacing: .04em;
  display: inline-block;
  margin-bottom: 8px;
  font-weight: 600;
}

.ch-head .lbl.ag {
  background: var(--ag-tint);
  color: var(--ag);
}

.ch-head .lbl.p {
  background: var(--p-tint);
  color: var(--p);
}

.ch-head h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -.015em;
}

.ch-head p {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
  max-width: 480px;
}

.ch-actions {
  display: flex;
  gap: 4px;
}

.ch-act {
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-soft);
  cursor: pointer;
  border: 1px solid var(--line);
  background: var(--surface);
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all var(--dur-1) var(--ease);
  font-family: var(--font-mono);
}

.ch-act:hover {
  background: var(--surface-3);
  color: var(--ink);
}

.ch-body {
  padding: 14px 18px 18px;
  flex: 1;
}

.ch-canvas {
  width: 100%;
  height: 320px;
}

.ch-canvas.tall {
  height: 380px;
}

.ch-foot {
  padding: 10px 22px;
  display: flex;
  gap: 18px;
  align-items: center;
  border-top: 1px solid var(--line-2);
  background: var(--surface-2);
  font-size: 11px;
  color: var(--muted);
}

.ch-foot .swatches-fl {
  display: flex;
  gap: 14px;
}

.ch-foot .sw-fl {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
}

.ch-foot .sw-fl i {
  width: 10px;
  height: 10px;
  border-radius: 3px;
}

.ch-foot .meta-fl {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 10px;
}

.section-h {
  margin: 36px 0 18px;
  padding-top: 8px;
  display: flex;
  align-items: baseline;
  gap: 14px;
}

.section-h h2 {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  margin: 0;
  color: var(--ink);
}

.section-h .rule {
  flex: 1;
  height: 1px;
  background: var(--line);
}

.section-h .count {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
}




/* ===== IBC FOCUS PHP INTEGRATION OVERRIDES ===== */
.flash {
  margin: 0 0 18px;
  padding: 12px 14px;
  border: 1px solid var(--ok);
  background: var(--ok-tint);
  color: var(--ok-ink);
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.flash svg {
  width: 16px;
  height: 16px;
}

.empty-state {
  padding: 24px;
  text-align: center;
  color: var(--muted);
}

.debug {
  background: var(--ink);
  color: #e2e8f0;
  padding: 18px;
  border-radius: var(--r-md);
  overflow: auto;
}

.form-card {
  max-width: 520px;
  margin: 70px auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-4);
  padding: 30px;
}

.form-card h1 {
  font-family: var(--font-display);
  font-size: 32px;
  line-height: 1.05;
  letter-spacing: -.03em;
  margin: 10px 0 10px;
}

.form-stack {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}

.form-stack label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
}

input,
select,
textarea {
  font: inherit;
  color: var(--ink);
}

input:not([type=file]):not([type=hidden]),
select,
textarea {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 8px;
  padding: 9px 11px;
  min-height: 38px;
}

input:focus,
select:focus,
textarea:focus {
  outline: 0;
  border-color: var(--accent);
  box-shadow: var(--sh-focus);
}

input[type=file] {
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  padding: 14px;
  background: var(--surface-3);
  width: 100%;
}

textarea {
  min-height: 86px;
  resize: vertical;
}

.alert {
  padding: 12px 14px;
  border-radius: var(--r-sm);
  background: var(--bad-tint);
  color: var(--bad-ink);
  border: 1px solid rgba(220, 38, 38, .22);
}

.muted {
  color: var(--muted);
}

.small-muted {
  font-size: 12px;
  color: var(--muted);
}

.code-inline,
code {
  font-family: var(--font-mono);
  background: var(--surface-3);
  border: 1px solid var(--line-2);
  padding: 2px 5px;
  border-radius: 5px;
  font-size: .92em;
}

.nowrap {
  white-space: nowrap;
}

.link {
  color: var(--accent-ink);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Top table integration */
.topl-table-wrap {
  overflow: auto;
  max-height: none;
}

.topl-table td form {
  margin: 0;
}

.status-select select {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 600;
  padding: 0 14px 0 0;
  min-height: 0;
  box-shadow: none;
  cursor: pointer;
}

.status-select select:focus {
  outline: 0;
  box-shadow: none;
}

.status-select.ok {
  background: var(--ok-tint);
  color: var(--ok-ink);
}

.status-select.nu {
  background: var(--bad-tint);
  color: var(--bad-ink);
}

.status-select.missing-reason {
  box-shadow: 0 0 0 2px rgba(220, 38, 38, .16);
}

.status-reason-alert {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 17px;
  height: 17px;
  margin-left: 5px;
  border-radius: 999px;
  background: #f59e0b;
  color: #fff;
  font-size: 11px;
  line-height: 1;
  font-weight: 900;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, .16);
  vertical-align: middle;
}

.status-reason-alert[hidden] {
  display: none !important;
}

.status-select.review {
  background: var(--warn-tint);
  color: var(--warn-ink);
}

.lock-pill.lockedin {
  background: var(--ok-tint);
  color: var(--ok-ink);
}

.lock-pill.pending {
  background: var(--warn-tint);
  color: var(--warn-ink);
}

.lock-pill.notset {
  background: var(--surface-3);
  color: var(--muted);
}

/* Dashboard stat cards based on delivered design */
.hero .hero-grid {
  align-items: center;
}

.edition-card:not(.working) .ed-stat small,
.edition-card:not(.working) .ed-stat strong {
  color: var(--ink);
}

.edition-card:not(.working) .ed-stat {
  border-right: 1px solid var(--line-2);
}

.edition-card:not(.working) .ed-actions {
  border-top: 1px solid var(--line-2);
}

.dashboard-topcards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.dashboard-topcards .edition-card {
  min-height: 260px;
}

/* Company integration */
.co-edit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.co-edit-grid .field.full {
  grid-column: 1 / -1;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}

.fin-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.fin-table th,
.fin-table td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--line-2);
  text-align: right;
  font-family: var(--font-mono);
  font-size: 12px;
}

.fin-table th:first-child,
.fin-table td:first-child {
  text-align: left;
}

.fin-table th {
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.audit-wrap {
  max-height: 680px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
}

.audit-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12px;
}

.audit-table th,
.audit-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line-2);
  vertical-align: top;
}

.audit-table th {
  position: sticky;
  top: 0;
  background: var(--surface-2);
  color: var(--muted);
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: .08em;
  z-index: 1;
}

.position-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.position-cloud .mini {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border-radius: 6px;
  background: var(--surface-3);
  font-family: var(--font-mono);
  font-size: 11px;
}

.position-cloud .mini.lockedin {
  background: var(--ok-tint);
  color: var(--ok-ink);
}

.position-cloud .mini.pending {
  background: var(--warn-tint);
  color: var(--warn-ink);
}

/* Import/schema/sync utility */
.upload-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.upload-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 22px;
  box-shadow: var(--sh-1);
}

.upload-card h2 {
  margin: 0 0 6px;
  font-size: 18px;
  letter-spacing: -.02em;
}

.upload-card p {
  color: var(--muted);
  margin: 0 0 16px;
}

.import-steps {
  display: grid;
  gap: 8px;
  margin: 14px 0;
}

.import-step {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.import-step .n {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--surface-3);
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--ink);
}

.schema-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.schema-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 16px;
}

.schema-card strong {
  display: block;
  font-size: 18px;
  margin-bottom: 4px;
}

.schema-card small {
  color: var(--muted);
}

/* Real sync list adapter */
.joblist.php-jobs .job-row {
  grid-template-columns: 8px 110px 1.25fr 140px 90px 70px 96px 1.5fr;
}

.joblist.php-jobs .job-row>* {
  min-width: 0;
}

.joblist.php-jobs .error-text {
  color: var(--bad-ink);
  font-size: 12px;
  line-height: 1.35;
}

.joblist.php-jobs .skipped-note {
  color: var(--muted);
}

@media (max-width: 1160px) {
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .editions,
  .dashboard-topcards,
  .sync-layout,
  .co-grid {
    grid-template-columns: 1fr;
  }

  .topl-body {
    grid-template-columns: 1fr;
  }

  .minimap {
    display: none;
  }

  .upload-grid,
  .schema-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .sidebar {
    position: static;
    width: 100%;
    height: auto;
  }

  .app-shell {
    display: block;
  }

  .topbar {
    position: static;
  }

  .page {
    padding: 20px 16px 48px;
  }

  .hero-grid,
  .co-hero-top {
    grid-template-columns: 1fr;
  }

  .co-edit-grid,
  .rank-strip,
  .stat-grid {
    grid-template-columns: 1fr;
  }

  .kpi-grid {
    grid-template-columns: 1fr;
  }
}


/* ===== profile/app-shell fixes ===== */
html,
body {
  width: 100%;
  min-height: 100%;
}

body[data-route],
body.app-body {
  display: block !important;
  place-items: initial !important;
  padding: 0 !important;
  margin: 0 !important;
  width: 100% !important;
  max-width: none !important;
  min-height: 100vh;
  overflow-x: hidden;
}

body[data-route] .app-shell,
body.app-body .app-shell {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  display: flex;
  min-height: 100vh;
}

body[data-route] .main,
body.app-body .main,
body[data-route] .app-main,
body.app-body .app-main {
  flex: 1 1 auto;
  width: 100%;
  max-width: none;
  min-width: 0;
}

body[data-route] .page,
body.app-body .page {
  width: 100%;
  max-width: none;
  margin: 0;
}

.co-grid {
  width: 100%;
  max-width: none;
}

.fin-chart {
  min-height: 430px;
}

.fin-chart-svg {
  width: 100%;
  height: 340px;
  min-height: 340px;
  display: block;
  margin-top: 22px;
}

.people-breakdown {
  display: grid;
  gap: 10px;
}

.people-card {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px dashed var(--line-2);
}

.people-card:last-child {
  border-bottom: 0;
}

.people-card .people-ico {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--surface-2, #f1f5f9);
  color: var(--ink-soft, #334155);
}

.people-card .people-ico svg {
  width: 20px;
  height: 20px;
}

.people-card h4 {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 650;
  letter-spacing: -.01em;
}

.people-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.people-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-size: 11px;
  color: var(--muted);
  line-height: 1;
}

.people-chip svg {
  width: 13px;
  height: 13px;
}

.people-chip strong {
  color: var(--ink);
  font-weight: 700;
}

.people-nat {
  margin-top: 6px;
  font-size: 11px;
  color: var(--muted);
}

/* ===== Company drawers: compact one-line sections, expand full width on click ===== */
.co-drawers {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
  align-items: start;
}

.co-drawer {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--sh-1);
  overflow: hidden;
  min-width: 0;
}

.co-drawer[open] {
  grid-column: 1 / -1;
  box-shadow: var(--sh-3);
}

.co-drawer>summary {
  list-style: none;
  cursor: pointer;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 74px;
  padding: 16px 18px;
  user-select: none;
}

.co-drawer>summary::-webkit-details-marker {
  display: none;
}

.co-drawer>summary:hover {
  background: var(--surface-2);
}

.drawer-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--surface-3);
  color: var(--ink-soft);
}

.drawer-icon svg {
  width: 19px;
  height: 19px;
}

.drawer-title {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.drawer-title strong {
  font-size: 14px;
  font-weight: 750;
  letter-spacing: -.01em;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.drawer-title small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.drawer-meta {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  background: var(--surface-3);
  border-radius: 999px;
  padding: 6px 8px;
}

.co-drawer[open] .drawer-meta {
  background: var(--accent-tint);
  color: var(--accent-ink);
}

.drawer-body {
  border-top: 1px solid var(--line-2);
  padding: 16px 18px 18px;
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%);
}

.drawer-note {
  margin: 0 0 12px;
  font-size: 11px;
  color: var(--muted);
}

.compact-form .compact-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.compact-form .compact-grid.people-compact-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.compact-field.full {
  grid-column: 1 / -1;
}

.compact-field label {
  display: block;
  margin: 0 0 5px;
  font-size: 9.5px;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  font-weight: 750;
}

.compact-field .ctrl,
.compact-field input.ctrl,
.compact-field textarea.ctrl,
.compact-field select.ctrl {
  width: 100%;
  min-height: 34px;
  height: 34px;
  border-radius: 9px;
  padding: 7px 9px;
  font-size: 12px;
  background: #fff;
}

.compact-field textarea.ctrl {
  height: 58px;
  min-height: 58px;
}

.drawer-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
}

.drawer-actions .btn {
  min-height: 36px;
  padding: 8px 13px;
}

.compact-audit {
  max-height: 460px;
  overflow: auto;
  border-radius: 14px;
}

.compact-audit .audit-table th,
.compact-audit .audit-table td {
  padding: 7px 9px;
  font-size: 11px;
}

.compact-audit .audit-table th {
  font-size: 9.5px;
}

@media (max-width: 1180px) {
  .co-drawers {
    grid-template-columns: 1fr;
  }

  .co-drawer[open] {
    grid-column: auto;
  }

  .compact-form .compact-grid,
  .compact-form .compact-grid.people-compact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {

  .compact-form .compact-grid,
  .compact-form .compact-grid.people-compact-grid {
    grid-template-columns: 1fr;
  }

  .co-drawer>summary {
    grid-template-columns: 38px 1fr;
  }

  .drawer-meta {
    display: none;
  }
}

/* Project details on company profile */
.project-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px
}

.project-panel-head h2 {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 700
}

.project-panel-head p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5
}

.project-group-list {
  display: grid;
  gap: 10px
}

.project-group {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  overflow: hidden
}

.project-group summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  font-weight: 700
}

.project-group summary::-webkit-details-marker {
  display: none
}

.project-group summary small {
  color: var(--muted);
  font-weight: 600
}

.project-list {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line)
}

.project-item {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line-2)
}

.project-item:last-child {
  border-bottom: 0
}

.project-index {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  background: var(--soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--muted)
}

.project-main strong {
  display: block;
  font-size: 13px;
  line-height: 1.35
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px
}

.project-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px
}

.project-meta i {
  width: 13px;
  height: 13px
}

/* Communications module */
.inline-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap
}

.input-sm,
.select-sm {
  height: 42px;
  border: 1px solid var(--line, #dbe3ef);
  border-radius: 12px;
  background: #fff;
  padding: 0 12px;
  color: var(--ink, #0f172a)
}

.btn.mini {
  min-height: 32px;
  padding: 7px 10px;
  font-size: 12px;
  border-radius: 10px
}

.actions-inline {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap
}

.actions-inline form {
  margin: 0
}

.card-grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr))
}

.card-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr))
}

.data-table.compact th,
.data-table.compact td {
  padding: 12px 14px
}

.row-active {
  background: #f8fbff
}

.pipeline-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 12px 0 18px
}

.pipeline-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line, #dbe3ef);
  background: #fff;
  border-radius: 999px;
  padding: 9px 13px;
  text-decoration: none;
  color: var(--ink, #0f172a)
}

.pipeline-chip span {
  font-size: 12px;
  color: var(--muted, #64748b)
}

.pipeline-chip strong {
  font-size: 17px
}

.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 10px;
  background: #eef2ff;
  color: #3730a3;
  font-weight: 700;
  font-size: 11px
}

.pill.ok {
  background: #dcfce7;
  color: #166534
}

.pill.warn {
  background: #fef3c7;
  color: #92400e
}

.pill.muted-pill {
  background: #f1f5f9;
  color: #64748b
}

.status-responded,
.status-implemented {
  background: #dcfce7;
  color: #166534
}

.status-phone_reminder {
  background: #fef3c7;
  color: #92400e
}

.status-failed {
  background: #fee2e2;
  color: #991b1b
}

.status-final {
  background: #e0e7ff;
  color: #3730a3
}

.section-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px
}

.filters {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin: 14px 0 18px
}

.public-review-shell textarea {
  font-family: inherit
}

.public-review-shell input {
  font-family: inherit
}

@media(max-width:1100px) {

  .card-grid.four,
  .card-grid.three {
    grid-template-columns: 1fr 1fr
  }
}

@media(max-width:720px) {

  .card-grid.four,
  .card-grid.three {
    grid-template-columns: 1fr
  }

  .section-title-row {
    align-items: flex-start;
    flex-direction: column
  }
}

/* ===== communications.php — campaign workspace ===== */
.comm-hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-xl);
  background: var(--ink);
  color: #fff;
  padding: 28px;
  margin-bottom: 18px;
  box-shadow: var(--sh-2);
}

.comm-hero::before,
.comm-hero::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.comm-hero::before {
  inset: 0;
  background:
    radial-gradient(ellipse at 88% 12%, rgba(34, 211, 238, .34), transparent 48%),
    radial-gradient(ellipse at 8% 100%, rgba(99, 102, 241, .28), transparent 58%);
}

.comm-hero::after {
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
  background-size: 30px 30px;
  mask: linear-gradient(180deg, rgba(0, 0, 0, .72), transparent 78%);
}

.comm-hero>* {
  position: relative;
  z-index: 1;
}

.comm-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 430px;
  gap: 24px;
  align-items: stretch;
}

.comm-hero-main {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.comm-hero .eyebrow {
  color: var(--accent-2);
}

.comm-hero h1 {
  margin: 10px 0 8px;
  max-width: 720px;
  font-family: var(--font-display);
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.04;
  letter-spacing: -.035em;
  font-weight: 700;
}

.comm-hero p {
  margin: 0;
  max-width: 760px;
  color: rgba(255, 255, 255, .68);
  font-size: 14px;
}

.comm-flow {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 24px;
}

.comm-flow span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .11);
  color: rgba(255, 255, 255, .84);
  font-size: 12px;
  font-weight: 600;
}

.comm-flow svg {
  width: 13px;
  height: 13px;
  color: rgba(255, 255, 255, .32);
}

.comm-safety-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.comm-safety-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .10);
  color: rgba(255, 255, 255, .78);
  font-size: 12px;
  font-weight: 600;
}

.comm-safety-pill svg {
  width: 14px;
  height: 14px;
}

.comm-safety-pill.safe {
  background: rgba(22, 163, 74, .16);
  border-color: rgba(74, 222, 128, .22);
  color: #bbf7d0;
}

.comm-safety-pill.live {
  background: rgba(217, 119, 6, .18);
  border-color: rgba(251, 191, 36, .24);
  color: #fde68a;
}

.comm-create-card {
  background: rgba(255, 255, 255, .96);
  color: var(--ink);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: var(--r-lg);
  padding: 18px;
  box-shadow: var(--sh-3);
  backdrop-filter: blur(12px) saturate(140%);
}

.comm-create-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
  margin-bottom: 14px;
}

.comm-create-head .eyebrow {
  color: var(--muted);
}

.comm-create-head h2 {
  margin: 4px 0 0;
  font-size: 18px;
  line-height: 1.2;
  letter-spacing: -.02em;
}

.comm-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.comm-form-grid .field {
  gap: 6px;
}

.comm-form-grid .field.full {
  grid-column: 1 / -1;
}

.comm-form-grid .field>span {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}

.comm-create-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 14px;
  margin-top: 14px;
  border-top: 1px solid var(--line-2);
}

.comm-create-actions p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.comm-kpis {
  margin-bottom: 18px;
}

.comm-safe-banner {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  margin: 0 0 18px;
  padding: 16px 18px;
  background: var(--ok-tint);
  color: var(--ok-ink);
  border: 1px solid rgba(22, 163, 74, .20);
  border-radius: var(--r-md);
  box-shadow: var(--sh-1);
}

.comm-safe-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, .58);
}

.comm-safe-icon svg {
  width: 20px;
  height: 20px;
}

.comm-safe-banner strong {
  display: block;
  font-size: 14px;
  color: var(--ok-ink);
}

.comm-safe-banner p {
  margin: 4px 0 0;
  color: #1f6f3a;
}

.comm-safe-banner code {
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, .68);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 12px;
}

.comm-source-panel {
  overflow: hidden;
}

.comm-source-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
  margin-top: 4px;
}

.comm-source-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 126px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  box-shadow: var(--sh-1);
}

.comm-source-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.comm-source-name {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border-radius: var(--r-pill);
  background: var(--accent-tint);
  color: var(--accent-ink);
  font-size: 12px;
  font-weight: 800;
}

.comm-source-top strong {
  font-family: var(--font-mono);
  font-size: 20px;
  color: var(--ink);
  letter-spacing: -.04em;
}

.comm-source-bar {
  height: 8px;
  overflow: hidden;
  border-radius: var(--r-pill);
  background: var(--line-2);
}

.comm-source-bar span {
  display: block;
  height: 100%;
  min-width: 2px;
  border-radius: inherit;
  background: var(--accent);
}

.comm-source-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  color: var(--muted);
  font-size: 12px;
}

.comm-source-meta b {
  color: var(--ink);
  font-family: var(--font-mono);
}

.comm-source-table-wrap {
  margin-top: 14px;
}

.comm-source-table {
  min-width: 680px;
}

.comm-panel {
  margin-bottom: 18px;
  box-shadow: var(--sh-1);
}

.comm-panel .panel-head h2 {
  font-size: 20px;
}

.comm-table-wrap {
  border-radius: var(--r-md);
}

.comm-table {
  min-width: 960px;
}

.comm-table.recipients {
  min-width: 1080px;
}

.comm-table .num {
  font-family: var(--font-mono);
  font-feature-settings: "tnum";
  text-align: right;
}

.comm-campaign-title:hover,
.comm-company:hover {
  color: var(--accent-ink);
}

.row-active td {
  background: var(--accent-tint);
}

/* Communications table action cells: keep table layout, center content, and preserve active row background. */
.comm-table tr.row-active > td {
  background: var(--accent-tint) !important;
}

.comm-table td.actions-cell {
  text-align: center;
  vertical-align: middle;
  white-space: normal;
}

.comm-table td.actions-cell > .actions-inline {
  justify-content: center;
  align-items: center;
  min-height: 42px;
}

.comm-table .actions-inline .btn,
.comm-table .actions-inline .pill {
  white-space: nowrap;
}


.comm-filters {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 190px 190px 190px auto;
  gap: 10px;
  align-items: center;
  margin: 14px 0 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface-2);
}

.comm-filters .search {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.comm-filters .search svg {
  width: 14px;
  height: 14px;
  color: var(--muted);
}

.comm-filters .search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font: 500 13px/1.4 var(--font-sans);
}

.comm-pipeline {
  margin: 4px 0 16px;
}

.comm-empty {
  border: 1px dashed var(--line);
  border-radius: var(--r-md);
  background: var(--surface-2);
}

.actions-inline {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.actions-inline form {
  margin: 0;
}

.btn.mini {
  min-height: 32px;
  padding: 7px 10px;
  font-size: 12px;
  border-radius: 10px;
}

.btn:disabled,
.btn[disabled] {
  opacity: .48;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.pill.ag {
  background: var(--ag-tint);
  color: var(--ag);
}

.pill.p {
  background: var(--p-tint);
  color: var(--p);
}

.pill.status-listed {
  background: var(--surface-3);
  color: var(--ink-soft);
}

.pill.status-contacted {
  background: var(--accent-tint);
  color: var(--accent-ink);
}

.pill.status-email1_sent,
.pill.status-email2_sent,
.pill.status-email3_sent {
  background: var(--info-tint);
  color: var(--info-ink);
}

.pill.status-responded,
.pill.status-implemented {
  background: var(--ok-tint);
  color: var(--ok-ink);
}

.pill.status-phone_reminder {
  background: var(--warn-tint);
  color: var(--warn-ink);
}

.pill.status-failed {
  background: var(--bad-tint);
  color: var(--bad-ink);
}

.pill.status-final {
  background: var(--ag-tint);
  color: var(--ag);
}

.pill.status-unsubscribed {
  background: var(--neutral-tint);
  color: var(--neutral);
}

@media (max-width: 1180px) {
  .comm-hero-grid {
    grid-template-columns: 1fr;
  }

  .comm-create-card {
    max-width: none;
  }

  .comm-filters {
    grid-template-columns: 1fr 1fr;
  }

  .comm-filters .search {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .comm-hero {
    padding: 22px;
    border-radius: var(--r-lg);
  }

  .comm-form-grid,
  .comm-filters {
    grid-template-columns: 1fr;
  }

  .comm-filters .search {
    grid-column: auto;
  }

  .comm-create-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .comm-create-actions .btn {
    width: 100%;
  }

  .comm-safe-banner {
    grid-template-columns: 1fr;
  }
}


/* v14 top details + CUI quick import */
.topl-table tr.js-expand-top-row {
  cursor: pointer;
}

.topl-table tr.js-expand-top-row.is-open td {
  background: var(--surface-2);
}

.topl-table tr.top-row-detail[hidden] {
  display: none !important;
}

.topl-table tr.top-row-detail td {
  padding: 0;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.top-row-detail-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr);
  gap: 14px;
  padding: 14px 18px 16px 124px;
}

.detail-box {
  border: 1px solid var(--line-2);
  background: var(--surface-2);
  border-radius: 14px;
  padding: 12px 14px;
}

.detail-box strong {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
}

.detail-box p {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink);
}

.detail-box small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
}

.history-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.history-chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 6px 9px;
  font-size: 11px;
  color: var(--ink-soft);
}

.comment-cell {
  max-width: 320px;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.45;
}

.eligibility-explain {
  margin-top: 16px;
}

.ineligible-drawer>summary {
  cursor: pointer;
  font-weight: 700;
  padding: 8px 0;
}

.cui-add-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.cui-add-form textarea {
  width: 100%;
  min-height: 74px;
}

@media (max-width:900px) {
  .top-row-detail-inner {
    grid-template-columns: 1fr;
    padding-left: 14px;
  }

  .cui-add-form {
    grid-template-columns: 1fr;
  }
}

/* v15 top list: unified candidates table, compact filters and richer row drawer */
.topl-toolbar-compact {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
  padding: 10px 12px;
}

.topl-toolbar-compact .compact-years {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  white-space: nowrap;
  overflow-x: auto;
  max-width: 42%;
}

.topl-filter-form {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) 150px 150px auto auto;
  gap: 8px;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
}

.topl-filter-form .compact-search {
  min-height: 38px;
  padding: 0 11px;
}

.topl-filter-form select {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  padding: 0 10px;
  font-size: 12px;
}

.topl-filter-form .compact-btn {
  min-height: 38px;
  padding: 8px 12px;
  white-space: nowrap;
}

.topl-table tr.js-expand-top-row.is-open td {
  background: #f8fbff;
}

.top-row-detail-grid {
  grid-template-columns: minmax(280px, 1.1fr) minmax(280px, 1fr) minmax(280px, 1fr) minmax(260px, .9fr);
  padding-left: 118px;
  align-items: stretch;
}

.detail-box-wide {
  min-width: 0;
}

.history-rank-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  gap: 8px;
  margin-top: 9px;
}

.history-rank-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, #fff, #f8fbff);
  padding: 10px 11px;
  display: grid;
  gap: 3px;
  min-height: 82px;
}

.history-rank-card small {
  font-size: 10px;
  letter-spacing: .11em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}

.history-rank-card b {
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 1;
  color: var(--ink);
}

.history-rank-card span {
  font-size: 11px;
  color: var(--ink-soft);
}

.detail-kv {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 8px 10px;
  margin: 10px 0 0;
  font-size: 12px;
}

.detail-kv.compact {
  grid-template-columns: 104px 1fr;
}

.detail-kv dt {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 10px;
  font-weight: 800;
}

.detail-kv dd {
  margin: 0;
  color: var(--ink);
  line-height: 1.45;
}

.comm-stage-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.comm-stage {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 9px 10px;
  background: #fff;
  font-size: 11px;
  color: var(--muted);
  display: grid;
  gap: 2px;
}

.comm-stage b {
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}

.comm-stage.done {
  background: var(--ok-tint);
  border-color: rgba(22, 163, 74, .22);
}

.comm-stage.todo {
  background: #f8fafc;
}

.delivery-state {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  margin: 10px 0 8px;
  font-size: 12px;
  font-weight: 800;
}

.delivery-state.ok {
  background: var(--ok-tint);
  color: var(--ok-ink);
}

.delivery-state.review {
  background: var(--warn-tint);
  color: var(--warn-ink);
}

@media (max-width: 1240px) {
  .topl-toolbar-compact {
    flex-wrap: wrap;
  }

  .topl-toolbar-compact .compact-years {
    max-width: 100%;
  }

  .topl-filter-form {
    grid-template-columns: minmax(220px, 1fr) repeat(2, 150px) auto auto;
    width: 100%;
  }

  .top-row-detail-grid {
    grid-template-columns: 1fr 1fr;
    padding-left: 18px;
  }
}

@media (max-width: 760px) {
  .topl-filter-form {
    grid-template-columns: 1fr;
  }

  .top-row-detail-grid {
    grid-template-columns: 1fr;
    padding-left: 14px;
  }

  .comm-stage-grid {
    grid-template-columns: 1fr;
  }

  .detail-kv,
  .detail-kv.compact {
    grid-template-columns: 1fr;
  }
}

/* ===== Charts data module v16 ===== */
.chart-ph .meta {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.chart-filterbar {
  display: flex;
  align-items: end;
  gap: 10px;
  flex-wrap: wrap;
  margin: -8px 0 22px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--sh-1);
}

.chart-filterbar label {
  display: grid;
  gap: 5px;
  min-width: 210px;
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 600;
}

.chart-filterbar select {
  min-height: 38px;
  text-transform: none;
  letter-spacing: normal;
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--ink);
  font-weight: 500;
}

.chart-filterbar .btn {
  margin-left: auto;
}

.chart-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.chart-kpis .kpi {
  min-height: 134px;
}

.chart-grid {
  margin-bottom: 10px;
}

.chart-table-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}

.chart-table-grid .ch-card.full {
  grid-column: 1 / -1;
}

.chart-table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.chart-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12px;
}

.chart-table th,
.chart-table td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--line-2);
  vertical-align: top;
}

.chart-table tr:last-child td {
  border-bottom: 0;
}

.chart-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--surface-2);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 10px;
  font-family: var(--font-mono);
  text-align: left;
  white-space: nowrap;
}

.chart-table td.num {
  text-align: right;
  font-family: var(--font-mono);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.chart-table td:first-child,
.chart-table th:first-child {
  padding-left: 12px;
}

.chart-empty {
  min-height: 120px;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: var(--surface-3);
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  padding: 18px;
  text-align: center;
}

.ch-card .chart-empty {
  height: 100%;
  min-height: 260px;
}

.ch-card .ch-body .chart-table-wrap {
  max-height: 390px;
}

.ch-card.full .ch-body .chart-table-wrap {
  max-height: 520px;
}

@media (max-width: 1180px) {
  .chart-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .chart-table-grid {
    grid-template-columns: 1fr;
  }

  .chart-filterbar .btn {
    margin-left: 0;
  }
}

@media (max-width: 720px) {
  .chart-kpis {
    grid-template-columns: 1fr;
  }

  .chart-filterbar {
    display: grid;
  }

  .chart-filterbar label {
    min-width: 0;
  }
}

/* ===== Charts diagnostics v19 ===== */
.chart-debug {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: -10px 0 18px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: linear-gradient(135deg, rgba(6, 182, 212, .08), rgba(99, 102, 241, .06));
  color: var(--ink);
  font-size: 12px;
}

.chart-debug strong {
  font-weight: 800;
}

.chart-debug-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.chart-debug-pills span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
}

.chart-debug-pills b {
  color: var(--ink);
  font-weight: 800;
}

/* v27 top list: one-line KPI strip, aligned filters and Operations mode */
@media (min-width: 1241px) {
  .topl-strip {
    grid-template-columns: repeat(7, minmax(0, 1fr));
  }

  .topl-strip>div {
    min-width: 0;
  }
}

.topl-toolbar-compact {
  align-items: stretch;
}

.topl-toolbar-compact .compact-years {
  margin: 0;
  min-height: 44px;
  align-self: stretch;
}

.topl-toolbar-compact .compact-years .year-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.topl-filter-form {
  grid-template-columns: minmax(260px, 1fr) 150px 150px auto auto auto;
  align-items: stretch;
}

.topl-filter-form .compact-search,
.topl-filter-form select,
.topl-filter-form .compact-btn,
.ops-switch {
  min-height: 44px;
  height: 44px;
  box-sizing: border-box;
}

.topl-filter-form .compact-search {
  align-items: center;
}

.topl-filter-form .compact-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ops-switch {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-soft);
  border-radius: 999px;
  padding: 0 12px 0 8px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color var(--dur-1) var(--ease), box-shadow var(--dur-1) var(--ease), background var(--dur-1) var(--ease);
}

.ops-switch:hover {
  border-color: var(--line-strong);
  box-shadow: var(--sh-1);
}

.ops-switch-track {
  width: 38px;
  height: 22px;
  border-radius: 999px;
  background: var(--surface-3);
  position: relative;
  border: 1px solid var(--line);
  flex: 0 0 auto;
}

.ops-switch-track span {
  position: absolute;
  left: 2px;
  top: 2px;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 1px 4px rgba(15, 23, 42, .2);
  transition: transform var(--dur-1) var(--ease), background var(--dur-1) var(--ease);
}

.ops-switch[aria-pressed="true"] {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.ops-switch[aria-pressed="true"] .ops-switch-track {
  background: var(--accent);
  border-color: var(--accent);
}

.ops-switch[aria-pressed="true"] .ops-switch-track span {
  transform: translateX(16px);
}

.topl-ops-bar[hidden] {
  display: none !important;
}

.topl-ops-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: -4px 0 12px;
  padding: 10px 14px;
  border: 1px solid rgba(14, 165, 233, .25);
  background: #eef9ff;
  border-radius: var(--r-md);
}

.topl-ops-bar .ops-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.topl-ops-bar .ops-copy strong {
  font-size: 13px;
  color: var(--ink);
}

.topl-ops-bar .ops-copy small {
  font-size: 11px;
  color: var(--muted);
}

.topl-ops-bar .ops-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.topl-ops-bar [data-bulk-csrf] {
  display: none;
}

.btn.danger-lite {
  color: var(--bad-ink);
  background: var(--bad-tint);
  border-color: rgba(239, 68, 68, .2);
}

.ops-only {
  display: none;
}

body.topl-ops-mode .topl-table .ops-only {
  display: table-cell;
}

.ops-col {
  width: 42px;
  min-width: 42px;
  text-align: center !important;
  padding-left: 8px !important;
  padding-right: 8px !important;
}

.ops-col input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--accent);
}

body.topl-ops-mode .topl-table tr.js-expand-top-row.is-selected td {
  background: #eef9ff;
}

body.topl-ops-mode .topl-table tr.js-expand-top-row.is-selected td.sticky-l {
  background: #eef9ff;
}

body.topl-ops-mode .topl-table tr.js-expand-top-row:hover td {
  background: #e8f6ff;
}

body.topl-ops-mode .topl-table tr.js-expand-top-row:hover td.sticky-l {
  background: #e8f6ff;
}

body.topl-ops-mode .minimap {
  opacity: .55;
}

body.topl-ops-mode .status-select select {
  cursor: default;
}

@media (max-width: 1240px) {
  .topl-filter-form {
    grid-template-columns: minmax(220px, 1fr) repeat(2, 150px) auto auto auto;
    width: 100%;
  }
}

@media (max-width: 760px) {
  .topl-filter-form {
    grid-template-columns: 1fr;
  }

  .topl-ops-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .topl-ops-bar .ops-actions {
    justify-content: stretch;
  }

  .topl-ops-bar .ops-actions .btn {
    flex: 1 1 auto;
  }
}

/* v28 sync import target + top methodology indicator */
.cui-add-form .cui-add-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 12px;
  align-items: stretch;
  width: 100%;
}

.cui-add-form .cui-add-controls textarea {
  width: 100%;
  min-height: 86px;
}

.cui-target-box {
  display: grid;
  gap: 8px;
  align-content: start;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-2);
}

.cui-target-box label {
  font: 800 10px var(--font-mono);
  letter-spacing: .11em;
  text-transform: uppercase;
  color: var(--muted);
}

.cui-target-box select {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  padding: 0 10px;
  font-size: 13px;
}

.cui-target-box small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.co-logo.method-ok {
  background: var(--ok-tint);
  color: var(--ok-ink);
  border: 1px solid rgba(22, 163, 74, .25);
  box-shadow: 0 0 0 3px rgba(22, 163, 74, .08);
}

.co-logo.method-bad {
  background: var(--bad-tint);
  color: var(--bad-ink);
  border: 1px solid rgba(239, 68, 68, .25);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, .08);
}

.co-logo.method-ok::after,
.co-logo.method-bad::after {
  content: "";
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  border: 2px solid #fff;
  background: currentColor;
}

@media (max-width: 900px) {
  .cui-add-form .cui-add-controls {
    grid-template-columns: 1fr;
  }
}

.co-logo.method-ok,
.co-logo.method-bad {
  position: relative;
}

.retry-note {
  display: block;
  margin-top: 6px;
  font-size: 10px;
  line-height: 1.35;
  color: #64748b;
  font-family: var(--mono)
}

.job-row.failed .retry-note {
  color: #991b1b
}

/* v22 drawer utility UX + user management */
.top-row-detail-grid-v2 {
  grid-template-columns: minmax(300px, 1.15fr) minmax(280px, .95fr) minmax(280px, .9fr);
  padding: 14px 18px 18px 96px;
  align-items: stretch;
}

.top-row-detail-grid-v2 .detail-box-history {
  grid-column: 1 / -1;
}

.detail-box-headline {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.detail-box-headline strong {
  margin-bottom: 0;
}

.detail-box-headline small {
  margin-top: 0;
  white-space: nowrap;
}

.history-rank-grid-compact {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(74px, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.history-rank-grid-full {
  grid-template-columns: repeat(var(--history-cols, 1), minmax(0, 1fr));
}

.history-rank-card-compact {
  min-height: 58px;
  padding: 8px 9px;
  border-radius: 12px;
  align-content: center;
}

.history-rank-card-compact small {
  font-size: 9px;
  letter-spacing: .08em;
}

.history-rank-card-compact b {
  font-size: 20px;
}

.history-rank-card-miss {
  border-color: rgba(220, 38, 38, .16);
  background: linear-gradient(180deg, #fff7f8, #fceff1);
}

.history-rank-card-miss small {
  color: #9a6b72;
}

.history-rank-card .history-rank-x {
  display: inline-flex;
  align-items: start;
  justify-content: start;
  min-height: 24px;
  font-size: 22px !important;
  font-weight: 900;
  line-height: 1;
  color: #c98590;
}

.detail-kv-tight {
  grid-template-columns: 132px 1fr;
  gap: 6px 10px;
}

.detail-box-notes {
  grid-column: span 1;
}

.operator-notes-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  max-height: 220px;
  overflow: auto;
  padding-right: 3px;
}

.operator-note {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 9px 10px;
}

.operator-note p {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--ink);
}

.operator-note small {
  margin-top: 6px;
  font: 700 10px var(--font-mono);
  color: var(--muted);
}

.drawer-note-form {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.drawer-note-form textarea,
.drawer-delivery-form textarea {
  resize: vertical;
  min-height: 72px;
}

.drawer-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.drawer-delivery-form {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.drawer-delivery-form label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .07em;
}

.drawer-profile-link {
  margin-top: 8px;
  width: 100%;
  justify-content: center;
}

@media (max-width: 1240px) {
  .top-row-detail-grid-v2 {
    grid-template-columns: 1fr 1fr;
    padding-left: 18px;
  }

  .top-row-detail-grid-v2 .detail-box-history {
    grid-column: 1/-1;
  }

  .history-rank-grid-full {
    min-width: 720px;
  }
}

@media (max-width: 760px) {
  .top-row-detail-grid-v2 {
    grid-template-columns: 1fr;
    padding-left: 14px;
  }

  .detail-kv-tight {
    grid-template-columns: 1fr;
  }

  .detail-box-history {
    overflow-x: auto;
  }

  .history-rank-grid-full {
    min-width: 720px;
  }
}

.users-head {
  margin-bottom: 16px;
}

.users-grid {
  display: grid;
  grid-template-columns: minmax(260px, .75fr) minmax(260px, .75fr);
  gap: 14px;
  margin-bottom: 14px;
}

.card-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  box-shadow: var(--sh-1);
}

.card-panel h2 {
  margin: 4px 0 12px;
  font-size: 18px;
}

.compact-form {
  gap: 10px;
}

.compact-form label {
  display: grid;
  gap: 5px;
  font-weight: 700;
  color: var(--ink-soft);
  font-size: 12px;
}

.reset-link-box {
  border: 1px solid rgba(6, 182, 212, .25);
  background: var(--accent-tint);
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 14px;
  display: grid;
  gap: 8px;
}

.reset-link-box strong {
  color: var(--accent-ink);
}

.reset-link-box small {
  color: var(--muted);
}

.section-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.section-title-row h2 {
  margin: 4px 0 0;
}

.users-table-wrap {
  overflow: auto;
}

.users-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.users-table th {
  text-align: left;
  color: var(--muted);
  text-transform: uppercase;
  font: 800 10px var(--font-mono);
  letter-spacing: .1em;
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
}

.users-table td {
  padding: 12px 8px;
  border-bottom: 1px solid var(--line-2);
  vertical-align: top;
}

.users-table td strong {
  display: block;
}

.users-table td small {
  color: var(--muted);
}

.user-reset-actions {
  display: grid;
  grid-template-columns: auto minmax(220px, 1fr);
  gap: 8px;
  align-items: center;
}

.inline-password-form {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) auto;
  gap: 8px;
  align-items: center;
}

@media (max-width: 980px) {
  .users-grid {
    grid-template-columns: 1fr;
  }

  .user-reset-actions {
    grid-template-columns: 1fr;
  }

  .inline-password-form {
    grid-template-columns: 1fr;
  }
}

/* v sync job rows: cleaner target label + click-through to company profile */
.job-row.js-company-row {
  cursor: pointer;
}

.job-row.js-company-row:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.job-row .job-company-link {
  display: block;
  color: var(--ink);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
}

.job-row .job-company-link:hover {
  color: var(--accent-ink);
}

.job-row .target strong {
  display: block;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-sans);
  line-height: 1.2;
}

.job-row .target small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.25;
}

/* v31 operational columns: call status + data readiness */
.call-status-pill,
.data-ok-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 6px 9px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.call-status-pill.none {
  color: var(--muted);
  background: var(--surface-2);
}

.call-status-pill.de_revenit {
  color: var(--warn-ink);
  background: var(--warn-tint);
  border-color: rgba(245, 158, 11, .22);
}

.call-status-pill.nr {
  color: var(--ink-soft);
  background: #f1f5f9;
}

.call-status-pill.nu_interesat {
  color: var(--bad-ink);
  background: var(--bad-tint);
  border-color: rgba(239, 68, 68, .22);
}

.call-status-pill.a_raspuns {
  color: var(--ok-ink);
  background: var(--ok-tint);
  border-color: rgba(22, 163, 74, .22);
}

.data-ok-pill.ok {
  color: var(--ok-ink);
  background: var(--ok-tint);
  border-color: rgba(22, 163, 74, .22);
}

.data-ok-pill.review {
  color: var(--warn-ink);
  background: var(--warn-tint);
  border-color: rgba(245, 158, 11, .22);
}

.drawer-operator-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
  margin-top: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-2);
}

.drawer-operator-form label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .07em;
}

.drawer-operator-form select {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  padding: 0 10px;
  font-size: 12px;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 700;
}

.drawer-operator-form .operator-last-update {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 11px;
}

@media (min-width: 1241px) {
  .topl-filter-form {
    grid-template-columns: minmax(220px, 1fr) 136px 136px 160px auto auto auto;
  }
}

@media (max-width: 1240px) and (min-width: 761px) {
  .topl-filter-form {
    grid-template-columns: minmax(220px, 1fr) repeat(3, 140px) auto auto auto;
  }
}

@media (max-width: 760px) {
  .drawer-operator-form {
    grid-template-columns: 1fr;
  }
}


/* v32 operational toolbar + data status icons */
.topl-toolbar-compact .compact-years {
  max-width: 28%;
  flex: 0 1 28%;
  scrollbar-width: thin;
}

.topl-toolbar-compact .compact-years .year-tab {
  padding: 7px 10px;
  font-size: 12px;
}

.topl-toolbar-compact .compact-years .year-tab .new {
  margin-left: 4px;
  padding-inline: 4px;
}

.topl-filter-form {
  grid-template-columns: minmax(160px, 1fr) 118px 118px 150px 126px auto auto 48px;
}

.ops-switch.ops-switch-icon {
  width: 48px;
  min-width: 48px;
  padding: 0;
  justify-content: center;
  gap: 0;
}

.ops-switch.ops-switch-icon .ops-switch-track {
  margin: 0;
}

.data-ok-pill {
  display: none;
}

.data-state-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  position: relative;
  vertical-align: middle;
}

.data-state-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  color: #fff;
  box-shadow: 0 4px 12px rgba(15, 23, 42, .16);
}

.data-state-badge.ok .data-state-icon {
  background: #16a34a;
  color: transparent;
}

.data-state-badge.missing .data-state-icon {
  background: #dc2626;
  color: transparent;
}

.data-state-badge.incomplete .data-state-icon {
  width: 0;
  height: 0;
  border-radius: 0;
  background: transparent;
  color: var(--warn-ink);
  border-left: 11px solid transparent;
  border-right: 11px solid transparent;
  border-bottom: 20px solid #f59e0b;
  box-shadow: none;
  font-size: 11px;
}

.data-state-badge.incomplete .data-state-icon::after {
  content: '!';
  position: absolute;
  left: 50%;
  top: 49%;
  transform: translate(-50%, -50%);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

.data-state-text {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.delivery-state.incomplete {
  background: var(--warn-tint);
  color: var(--warn-ink);
}

.delivery-state.missing {
  background: var(--bad-tint);
  color: var(--bad-ink);
}

@media (min-width: 1241px) {
  .topl-filter-form {
    grid-template-columns: minmax(150px, 1fr) 112px 112px 148px 124px auto auto 48px;
  }
}

@media (max-width: 1240px) and (min-width: 761px) {
  .topl-toolbar-compact .compact-years {
    max-width: 100%;
    flex-basis: 100%;
  }

  .topl-filter-form {
    grid-template-columns: minmax(220px, 1fr) repeat(4, 136px) auto auto 48px;
  }
}

@media (max-width: 760px) {
  .topl-toolbar-compact .compact-years {
    max-width: 100%;
    flex-basis: 100%;
  }

  .topl-filter-form {
    grid-template-columns: 1fr;
  }

  .ops-switch.ops-switch-icon {
    width: 100%;
  }
}

.operator-questionnaire-callout {
  display: grid;
  gap: 9px;
  margin: 10px 0 12px;
  padding: 11px;
  border: 1px solid rgba(6, 182, 212, .24);
  border-radius: 14px;
  background: var(--accent-tint);
}

.operator-questionnaire-head {
  display: grid;
  gap: 3px;
}

.operator-questionnaire-head b {
  color: var(--accent-ink);
  font-size: 13px;
}

.operator-questionnaire-head small,
.operator-link-meta {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.operator-link-input {
  width: 100%;
  font: 700 11px var(--font-mono);
  color: var(--accent-ink);
  background: #fff;
}
/* v33 drawer ajax, WhatsApp and per-phone call statuses */
.drawer-operator-form.drawer-call-repeater-form {
  grid-template-columns: 1fr;
}

.call-repeater-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.call-repeater-head strong {
  color: var(--ink);
  font-size: 12px;
}

.call-repeater-list {
  display: grid;
  gap: 8px;
}

.call-repeater-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) 34px;
  gap: 7px;
  align-items: end;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.call-repeater-row > * {
  min-width: 0;
}

.call-repeater-row label,
.drawer-tab-panel label {
  display: grid;
  gap: 4px;
  min-width: 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .07em;
}

.call-repeater-row .input,
.call-repeater-row select {
  width: 100%;
  min-width: 0;
}

.call-repeater-row select {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  padding: 0 10px;
  font-size: 12px;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 700;
}

.call-repeater-row [data-remove-call-contact] {
  align-self: stretch;
  min-height: 38px;
}

.call-status-pill.gresit {
  color: var(--bad-ink);
  background: #fee2e2;
  border-color: rgba(239, 68, 68, .25);
}

.call-status-pill.trimis_whatsapp,
.call-status-pill.trimis_email {
  color: var(--ok-ink);
  background: #dcfce7;
  border-color: rgba(22, 163, 74, .24);
}

.detail-box-delivery-split {
  min-width: 360px;
}

.drawer-delivery-tabs {
  display: grid;
  gap: 10px;
}

.drawer-tab-switcher {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-2);
}

.drawer-tab-btn {
  appearance: none;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  padding: 9px 10px;
  font: 900 11px var(--font-sans);
  text-transform: uppercase;
  letter-spacing: .06em;
  transition: background .15s ease, color .15s ease, box-shadow .15s ease;
}

.drawer-tab-btn.is-active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 4px rgba(15, 23, 42, .08);
}

.drawer-tab-panels {
  display: grid;
}

.drawer-tab-panel {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px;
  margin: 0;
  display: grid;
  gap: 8px;
  background: #fff;
}

.drawer-tab-panel[hidden] {
  display: none;
}

.drawer-tab-panel legend {
  padding: 0 6px;
  color: var(--ink);
  font-size: 11px;
  font-weight: 900;
}

.drawer-whatsapp-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-top: 8px;
}

.whatsapp-btn {
  color: var(--ok-ink);
  background: var(--ok-tint);
  border-color: rgba(22, 163, 74, .24);
}

.drawer-operator-form.is-saving,
.drawer-note-form.is-saving,
.drawer-delivery-form.is-saving {
  opacity: .72;
}

@media (max-width: 1560px) {
  .call-repeater-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .call-repeater-row [data-remove-call-contact] {
    grid-column: 2;
  }
}

@media (max-width: 1240px) {
  .call-repeater-row {
    grid-template-columns: 1fr;
  }

  .call-repeater-row [data-remove-call-contact] {
    grid-column: auto;
  }

  .detail-box-delivery-split {
    min-width: 0;
  }
}

/* ===========================================================
   Drawer v3 redesign — generated from uploaded design reference
   Scoped under .drawer-v3 so existing table styles remain intact.
   =========================================================== */
.drawer-v3,
.drawer-v3 *,
.drawer-v3 *::before,
.drawer-v3 *::after { box-sizing: border-box; }
.drawer-v3 input,
.drawer-v3 select,
.drawer-v3 textarea { max-width: 100%; min-width: 0; }

.drawer-v3 {
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 18px;
  background:
    radial-gradient(900px 200px at 100% 0%, rgba(6, 182, 212, .05), transparent 60%),
    linear-gradient(180deg, #f6f8fc 0%, #eef1f7 100%);
  border-top: 1px solid var(--line);
  padding: 20px 22px 26px;
  display: grid;
  gap: 18px;
  min-width: 0;
}

.drawer-v3__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-1);
}
.drawer-v3__id { display: flex; align-items: center; gap: 14px; min-width: 0; }
.drawer-v3__avatar {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--ink) 0%, #1f2937 100%);
  color: var(--accent-2);
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 13px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}
.drawer-v3__avatar::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 30%, rgba(34, 211, 238, .35), transparent 60%);
}
.drawer-v3__avatar span { position: relative; z-index: 1; }
.drawer-v3__id-text { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.drawer-v3__id-top { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.drawer-v3__id-top h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -.01em;
  color: var(--ink);
  line-height: 1.2;
}
.drawer-v3__pos {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--ink);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .02em;
}
.drawer-v3__id-meta { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.drawer-v3__id-meta .mono { font-family: var(--font-mono); color: var(--ink-soft); }
.drawer-v3__id-meta .sep { color: var(--line-strong); }
.drawer-v3__head-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.drawer-v3__head-pills { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

.drawer-v3 .dpill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: var(--surface-3);
  color: var(--ink-soft);
  border: 1px solid var(--line-2);
}
.drawer-v3 .dpill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: currentColor;
  opacity: .7;
}
.drawer-v3 .dpill.ok { background: var(--ok-tint); color: var(--ok-ink); border-color: transparent; }
.drawer-v3 .dpill.warn,
.drawer-v3 .dpill.incomplete { background: var(--warn-tint); color: var(--warn-ink); border-color: transparent; }
.drawer-v3 .dpill.bad,
.drawer-v3 .dpill.missing { background: var(--bad-tint); color: var(--bad-ink); border-color: transparent; }
.drawer-v3 .dpill.cyan { background: var(--accent-tint-2); color: var(--accent-ink); border-color: transparent; }

.drawer-v3 .dbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 13px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 9px;
  font: 600 12.5px/1 var(--font-sans);
  cursor: pointer;
  white-space: nowrap;
  box-shadow: var(--sh-1);
  transition: transform .12s ease, border-color .12s ease, box-shadow .12s ease, background .12s ease;
  text-decoration: none;
}
.drawer-v3 .dbtn:hover { border-color: var(--line-strong); transform: translateY(-1px); box-shadow: var(--sh-2); }
.drawer-v3 .dbtn:active { transform: translateY(0); }
.drawer-v3 .dbtn svg,
.drawer-v3 .dbtn i { width: 14px; height: 14px; }
.drawer-v3 .dbtn.primary { background: var(--ink); color: #fff; border-color: var(--ink); }
.drawer-v3 .dbtn.primary:hover { background: var(--ink-2); border-color: var(--ink-2); }
.drawer-v3 .dbtn.ghost { background: transparent; border-color: transparent; box-shadow: none; }
.drawer-v3 .dbtn.ghost:hover { background: var(--surface-3); }
.drawer-v3 .dbtn.wa { background: #25d366; color: #fff; border-color: #25d366; }
.drawer-v3 .dbtn.wa:hover { background: #1ebe5a; border-color: #1ebe5a; }
.drawer-v3 .dbtn.email { background: #2563eb; color: #fff; border-color: #2563eb; }
.drawer-v3 .dbtn.email:hover { background: #1d4ed8; border-color: #1d4ed8; }
.drawer-v3 .dbtn.sm { padding: 6px 10px; font-size: 11.5px; }
.comms-email { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; margin-top: 8px; }
.drawer-v3 .dbtn.full { width: 100%; }
.drawer-v3 .dbtn:disabled { opacity: .62; cursor: wait; transform: none; }

.drawer-v3__facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line-2);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--sh-1);
}
.drawer-v3 .fact { background: #fff; padding: 12px 16px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.drawer-v3 .fact small { font-size: 10px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.drawer-v3 .fact strong {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.35;
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
}
.drawer-v3 .fact strong em { font-style: normal; font-weight: 500; color: var(--muted); font-size: 12px; }
.drawer-v3 .fact .ind {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--bad-tint);
  color: var(--bad-ink);
  font-size: 11px;
  font-weight: 700;
}
.drawer-v3 .fact .ind.ok { background: var(--ok-tint); color: var(--ok-ink); }

.drawer-v3 .history-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-1);
  padding: 12px 16px;
  display: grid;
  grid-template-columns: minmax(0, 220px) minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  min-width: 0;
  overflow: hidden;
}
.drawer-v3 .history-card__lede { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.drawer-v3 .history-card__lede small { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.drawer-v3 .history-card__lede b { font-size: 13px; font-weight: 600; color: var(--ink); }
.drawer-v3 .history-card__lede em { font-style: normal; font-size: 11px; color: var(--muted); font-family: var(--font-mono); margin-top: 1px; }
.drawer-v3 .years {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(16, minmax(0, 1fr));
  gap: 6px;
  min-width: 0;
}
.drawer-v3 .year {
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  border-radius: 10px;
  padding: 8px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  min-width: 0;
}
.drawer-v3 .year small { font-size: 9.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.drawer-v3 .year b { font-family: var(--font-mono); font-size: 14px; font-weight: 600; color: var(--ink); letter-spacing: -.02em; }
.drawer-v3 .year.top3 b { color: #a16207; }
.drawer-v3 .year.top1 b { color: #854d0e; }
.drawer-v3 .year--miss { background: #fff7f7; border-color: #f5d6d9; }
.drawer-v3 .year--miss small { color: #9a6b72; }
.drawer-v3 .year--miss b { color: #c44141; font-family: var(--font-sans); font-weight: 500; }

.drawer-v3__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
.drawer-v3__card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-1);
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}
.drawer-v3 .card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px 10px; border-bottom: 1px solid var(--line-2); }
.drawer-v3 .card-head .eyebrow { display: block; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.drawer-v3 .card-head h4 { margin: 2px 0 0; font-size: 14px; font-weight: 600; color: var(--ink); letter-spacing: -.005em; }
.drawer-v3 .card-head .head-extra { display: flex; align-items: center; gap: 6px; }
.drawer-v3 .card-body { padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; flex: 1; min-width: 0; overflow: hidden; }
.drawer-v3 .card-foot { margin-top: auto; padding: 10px 16px 14px; border-top: 1px solid var(--line-2); display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.drawer-v3 .card-foot .meta-time,
.drawer-v3 .operator-last-update,
.drawer-v3 .drawer-v3-count { font-size: 11px; color: var(--muted); font-family: var(--font-mono); }

.drawer-v3 .input,
.drawer-v3 select.input,
.drawer-v3 textarea.input {
  width: 100%;
  padding: 9px 11px;
  font: 500 13px/1.4 var(--font-sans);
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
  transition: border-color .12s ease, box-shadow .12s ease;
}
.drawer-v3 .input:hover { border-color: var(--line-strong); }
.drawer-v3 .input:focus { border-color: var(--accent); box-shadow: var(--sh-focus); }
.drawer-v3 textarea.input { resize: vertical; min-height: 60px; font-family: var(--font-sans); }
.drawer-v3 select.input {
  appearance: none;
  -webkit-appearance: none;
  background: #fff url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7385' stroke-width='2.5' stroke-linecap='round'><path d='M6 9l6 6 6-6'/></svg>") right 10px center/12px no-repeat;
  padding-right: 30px;
}
.drawer-v3 .field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.drawer-v3 .field > span,
.drawer-v3 .field > label { font-size: 10px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }

.drawer-v3 .calls { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.drawer-v3 .call {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) 30px;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line-2);
  background: var(--surface-2);
  border-radius: 12px;
  align-items: end;
  min-width: 0;
}
.drawer-v3 .call .field { gap: 4px; }
.drawer-v3 .call__remove {
  align-self: stretch;
  width: 30px;
  border: 0;
  background: transparent;
  color: var(--muted);
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  display: grid;
  place-items: center;
}
.drawer-v3 .call__remove:hover { background: var(--bad-tint); color: var(--bad-ink); }
.drawer-v3 .call .field--span2 { grid-column: span 2; min-width: 0; }
.drawer-v3 .call .row2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; min-width: 0; }

.drawer-v3 .dtabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--surface-3); border: 1px solid var(--line-2); border-radius: 10px; padding: 3px; gap: 0; }
.drawer-v3 .dtab { appearance: none; border: 0; background: transparent; padding: 7px 10px; border-radius: 8px; font: 600 12px/1 var(--font-sans); color: var(--muted); cursor: pointer; transition: background .12s ease, color .12s ease; }
.drawer-v3 .dtab.is-active { background: #fff; color: var(--ink); box-shadow: var(--sh-1); }
.drawer-v3 .dtab:hover:not(.is-active) { color: var(--ink-soft); }
.drawer-v3 .fields-grid { display: grid; gap: 10px; min-width: 0; }
.drawer-v3 .fields-grid .field--row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; min-width: 0; }

.drawer-v3 .comms-cta {
  background:
    radial-gradient(600px 120px at 0% 0%, rgba(6, 182, 212, .08), transparent 70%),
    linear-gradient(180deg, var(--accent-tint) 0%, #fff 100%);
  border: 1px solid var(--accent-tint-2);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.drawer-v3 .comms-cta__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.drawer-v3 .comms-cta__head b { color: var(--accent-ink); font-size: 12.5px; font-weight: 700; letter-spacing: .01em; }
.drawer-v3 .comms-cta__head .ico { width: 26px; height: 26px; border-radius: 8px; background: var(--accent); color: #fff; display: grid; place-items: center; flex-shrink: 0; }
.drawer-v3 .comms-cta__head .ico svg,
.drawer-v3 .comms-cta__head .ico i { width: 13px; height: 13px; }
.drawer-v3 .comms-cta p { margin: 0; font-size: 12px; color: var(--ink-soft); line-height: 1.45; }
.drawer-v3 .comms-actions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px; min-width: 0; }
.drawer-v3 .comms-link {
  display: block;
  width: 100%;
  padding: 8px 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent-ink);
  background: #fff;
  border: 1px dashed var(--accent-tint-2);
  border-radius: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: text;
}
.drawer-v3 .comms-wa { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; min-width: 0; }
.drawer-v3 .comms-meta { font-size: 11px; color: var(--muted); }
.drawer-v3 .stages { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 5px; }
.drawer-v3 .stage { background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 10px; padding: 8px 6px; font-size: 10.5px; font-weight: 500; color: var(--muted); text-align: center; display: flex; flex-direction: column; gap: 2px; align-items: center; min-width: 0; }
.drawer-v3 .stage b { color: var(--ink); font-size: 11px; font-weight: 600; }
.drawer-v3 .stage.done { background: var(--ok-tint); border-color: transparent; color: var(--ok-ink); }
.drawer-v3 .stage.done b { color: var(--ok-ink); }
.drawer-v3 .stage.seen { background: var(--warn-tint); border-color: transparent; color: var(--warn-ink); }
.drawer-v3 .stage.seen b { color: var(--warn-ink); }

.drawer-v3 .notes { list-style: none; margin: 0; padding: 0 4px 0 0; display: flex; flex-direction: column; gap: 8px; max-height: 240px; overflow: auto; min-width: 0; }
.drawer-v3 .note { background: var(--surface-2); border: 1px solid var(--line-2); border-left: 2px solid var(--accent); border-radius: 8px; padding: 9px 11px; }
.drawer-v3 .note p { margin: 0; font-size: 13px; color: var(--ink); line-height: 1.45; }
.drawer-v3 .note small { display: block; margin-top: 5px; font-size: 11px; color: var(--muted); font-family: var(--font-mono); }
.drawer-v3 .notes--empty { padding: 14px; font-size: 12.5px; color: var(--muted); text-align: center; background: var(--surface-2); border: 1px dashed var(--line); border-radius: 10px; }
.drawer-v3 .note-add { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: end; margin-top: 10px; min-width: 0; }
.drawer-v3 .note-add textarea { min-height: 46px; }
.drawer-v3 .notes::-webkit-scrollbar { width: 6px; }
.drawer-v3 .notes::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 999px; }

@media (max-width: 1240px) {
  .drawer-v3 .years { grid-template-columns: repeat(8, minmax(0, 1fr)); }
  .drawer-v3 .history-card { grid-template-columns: 1fr; }
  .drawer-v3__facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
  .drawer-v3__grid { grid-template-columns: 1fr; }
  .drawer-v3__head { grid-template-columns: 1fr; }
  .drawer-v3__head-actions { justify-content: flex-start; }
}
@media (max-width: 760px) {
  .drawer-v3 { padding: 16px 14px 20px; }
  .drawer-v3 .call { grid-template-columns: 1fr 30px; }
  .drawer-v3 .call .field--span2 { grid-column: auto; }
  .drawer-v3 .call .row2,
  .drawer-v3 .fields-grid .field--row,
  .drawer-v3 .comms-actions,
  .drawer-v3 .comms-wa { grid-template-columns: 1fr; }
  .drawer-v3 .years { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .drawer-v3 .note-add { grid-template-columns: 1fr; }
}

/* v3.2 drawer cleanup: stop legacy drawer form/grid rules from leaking into v3 cards */
.drawer-v3 .drawer-operator-form.drawer-call-repeater-form,
.drawer-v3 .drawer-delivery-form {
  display: flex !important;
  grid-template-columns: none !important;
  gap: 0 !important;
  align-items: stretch !important;
  margin-top: 0 !important;
  padding: 0 !important;
  background: #fff !important;
}

.drawer-v3 .drawer-operator-form.drawer-call-repeater-form > *,
.drawer-v3 .drawer-delivery-form > * {
  min-width: 0;
}

.drawer-v3 .drawer-operator-form.drawer-call-repeater-form .card-head,
.drawer-v3 .drawer-delivery-form .card-head {
  flex: 0 0 auto;
}

.drawer-v3 .drawer-operator-form.drawer-call-repeater-form .card-body,
.drawer-v3 .drawer-delivery-form .card-body {
  flex: 1 1 auto;
}

.drawer-v3 .drawer-operator-form.drawer-call-repeater-form .card-foot,
.drawer-v3 .drawer-delivery-form .card-foot {
  flex: 0 0 auto;
}

.drawer-v3 .drawer-operator-form.drawer-call-repeater-form label,
.drawer-v3 .drawer-delivery-form label {
  margin: 0;
}

.drawer-v3 [data-delivery-panel][hidden] {
  display: none !important;
}

.drawer-v3 .drawer-delivery-form .card-body[data-delivery-tabs] {
  overflow: visible;
}

.drawer-v3 .drawer-delivery-form .fields-grid {
  width: 100%;
}

.drawer-v3 .drawer-call-repeater-form .calls {
  width: 100%;
}

.drawer-v3 .drawer-call-repeater-form .call {
  width: 100%;
}

.drawer-v3 .drawer-call-repeater-form .call .row2,
.drawer-v3 .drawer-delivery-form .field--row {
  width: 100%;
}

/* v32 top list performance pagination */
.topl-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 10px 0 10px;
  padding: 10px 14px;
  border: 1px solid var(--line, #dce3ef);
  border-radius: 16px;
  background: rgba(255,255,255,.72);
  box-shadow: 0 10px 24px rgba(15,23,42,.04);
}
.topl-pagination__summary {
  color: var(--muted, #667085);
  font-size: 12px;
  font-weight: 600;
}
.topl-pagination__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.page-chip {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--line, #dce3ef);
  background: #fff;
  color: var(--muted, #667085);
  font-size: 12px;
  font-weight: 700;
}
.drawer-v3--lazy {
  padding: 16px;
  min-height: auto;
}
@media (max-width: 900px) {
  .topl-pagination { align-items: flex-start; flex-direction: column; }
  .topl-pagination__actions { justify-content: flex-start; }
}

/* v34 top worklist: dense toolbar + default whole-page worklist */
.topl-toolbar-dense {
  display: grid;
  grid-template-columns: minmax(250px, 390px) auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 9px 10px;
}

.topl-toolbar-dense .compact-years {
  max-width: none;
  flex: initial;
  min-width: 0;
  margin: 0;
  min-height: 40px;
  overflow-x: auto;
}

.topl-toolbar-dense .compact-years .year-tab {
  min-height: 36px;
  padding: 6px 9px;
}

.scope-toggle {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--line);
  background: var(--surface-3);
  border-radius: 13px;
  white-space: nowrap;
}

.scope-toggle__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  color: var(--muted);
  text-decoration: none;
  transition: background var(--dur-1) var(--ease), color var(--dur-1) var(--ease), box-shadow var(--dur-1) var(--ease);
}

.scope-toggle__btn svg {
  width: 17px;
  height: 17px;
}

.scope-toggle__btn:hover {
  color: var(--ink);
  background: #fff;
}

.scope-toggle__btn.active {
  background: #fff;
  color: var(--ink);
  box-shadow: var(--sh-1);
}

.topl-filter-form-dense {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) 86px 86px 132px 86px 66px 44px 44px 48px;
  gap: 8px;
  align-items: center;
  width: 100%;
  min-width: 0;
}

.topl-filter-form-dense .compact-search,
.topl-filter-form-dense select,
.topl-filter-form-dense .compact-btn,
.topl-filter-form-dense .ops-switch {
  min-height: 40px;
  height: 40px;
  border-radius: 12px;
}

.topl-filter-form-dense .compact-search {
  min-width: 0;
  padding: 0 10px;
}

.topl-filter-form-dense .compact-search input {
  min-width: 0;
}

.topl-filter-form-dense select {
  width: 100%;
  min-width: 0;
  padding: 0 28px 0 10px;
  font-size: 12px;
}

.topl-filter-form-dense .per-page-select {
  text-align: center;
  padding-left: 9px;
  padding-right: 24px;
}

.topl-filter-form-dense .filter-icon-btn,
.topl-filter-form-dense .reset-icon-btn {
  width: 44px;
  min-width: 44px;
  padding: 0;
}

.topl-filter-form-dense .filter-icon-btn svg,
.topl-filter-form-dense .reset-icon-btn svg {
  margin: 0;
}

.topl-filter-form-dense .ops-switch.ops-switch-icon {
  grid-column: -2 / -1;
  width: 48px;
  min-width: 48px;
  height: 40px;
}

.topl-pagination {
  margin-bottom: 8px;
}

.topl-pagination__summary {
  font-size: 12px;
}

@media (max-width: 1240px) {
  .topl-toolbar-dense {
    grid-template-columns: 1fr auto;
  }

  .topl-toolbar-dense .compact-years {
    grid-column: 1 / -1;
    max-width: 100%;
    flex-basis: auto;
  }

  .topl-filter-form-dense {
    grid-column: 1 / -1;
    grid-template-columns: minmax(180px, 1fr) repeat(4, minmax(88px, 1fr)) 66px 44px 44px 48px;
  }
}

@media (max-width: 840px) {
  .topl-toolbar-dense {
    grid-template-columns: 1fr;
  }

  .scope-toggle {
    width: max-content;
  }

  .topl-filter-form-dense {
    grid-template-columns: 1fr 1fr;
  }

  .topl-filter-form-dense .compact-search {
    grid-column: 1 / -1;
  }

  .topl-filter-form-dense .ops-switch.ops-switch-icon {
    grid-column: auto;
    width: 48px;
  }
}

/* Charts Excel catalog v2 - restored after top toolbar CSS merge */
.excel-chart-ph p { max-width: 980px; }
.chart-notice {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 18px;
  padding: 14px 16px;
  margin: 14px 0;
  color: var(--muted);
  box-shadow: var(--shadow-sm, 0 8px 22px rgba(15, 23, 42, .06));
}
.chart-notice.warn {
  border-color: rgba(234, 179, 8, .32);
  background: #fffbeb;
  color: #713f12;
}
.chart-notice code {
  background: rgba(15, 23, 42, .08);
  border-radius: 6px;
  padding: 2px 6px;
}
.chart-empty.big {
  min-height: 140px;
  border: 1px dashed var(--line);
  border-radius: 18px;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: #fff;
  margin-top: 18px;
}
.mini-dashboard-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 22px 0 28px;
}
.dash-tab {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 16px;
  min-height: 70px;
  text-align: left;
  padding: 14px 16px;
  cursor: pointer;
  box-shadow: var(--shadow-sm, 0 8px 22px rgba(15, 23, 42, .06));
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}
.dash-tab:hover { transform: translateY(-1px); border-color: rgba(6, 182, 212, .45); }
.dash-tab.active {
  border-color: var(--accent);
  background: linear-gradient(135deg, rgba(6, 182, 212, .12), rgba(255,255,255,.96));
}
.dash-tab strong {
  display: block;
  color: var(--ink);
  font-size: 14px;
  margin-bottom: 5px;
}
.dash-tab span {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .035em;
  font-family: var(--mono, monospace);
  font-size: 10px;
  line-height: 1.35;
}
.excel-dashboard { display: none; }
.excel-dashboard.active { display: block; }
.excel-chart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
/* Specificatii P: cele 3 grafice ale aceluiasi domeniu (61-87) stau pe acelasi rand:
   rata de specificare + top branduri + top materiale. Graficele 88-96 raman cate 2 pe rand. */
.excel-chart-grid.specifications-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}
.excel-chart-grid.specifications-grid > .excel-chart-card {
  grid-column: span 3;
}
.excel-chart-grid.specifications-grid > .excel-chart-card.third-width {
  grid-column: span 2;
}
.excel-chart-grid.specifications-grid > .excel-chart-card.full,
.excel-chart-grid.specifications-grid > .excel-chart-card.table-only:not(.half-width-table) {
  grid-column: 1 / -1;
}
.excel-chart-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-sm, 0 8px 22px rgba(15, 23, 42, .06));
}
.excel-chart-card.full { grid-column: 1 / -1; }
.excel-chart-card.table-only { grid-column: 1 / -1; }
/* TOP 100 edition catalogs may opt specific compact tables into the normal 2-column grid. */
.excel-chart-card.table-only.half-width-table { grid-column: auto; }
.excel-card-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--line);
}
.excel-card-head h3 {
  margin: 8px 0 6px;
  color: var(--ink);
  line-height: 1.25;
  font-size: 17px;
}
.excel-card-head p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}
.chart-source-caption {
  margin: 0 0 6px;
  color: #64748b;
  font-size: 11px !important;
  line-height: 1.35;
}
.chart-source-caption a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dotted rgba(100, 116, 139, .45);
}
.chart-source-caption a:hover {
  color: var(--brand);
  border-bottom-color: currentColor;
}
.excel-card-head .copy-table-btn {
  white-space: nowrap;
}
.excel-chart-body {
  padding: 12px 16px 0;
}
.excel-chart-canvas {
  height: 320px;
  width: 100%;
  border-radius: 16px;
  background: linear-gradient(180deg, #fff, #f8fafc);
  border: 1px solid rgba(226, 232, 240, .8);
}
.excel-chart-canvas.small { height: 260px; margin-top: 12px; }
.excel-table-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 20px;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-family: var(--mono, monospace);
  border-bottom: 1px solid var(--line);
}
.excel-table-wrap {
  overflow: auto;
  max-height: 360px;
  background: #fff;
}
.excel-copy-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-size: 12px;
}
.excel-copy-table th,
.excel-copy-table td {
  border-bottom: 1px solid var(--line);
  padding: 9px 10px;
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
}
.excel-copy-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8fafc;
  color: #64748b;
  font-family: var(--mono, monospace);
  text-transform: uppercase;
  letter-spacing: .07em;
  font-size: 10px;
}
.excel-copy-table tbody:empty::after {
  content: 'Fara randuri pentru editia curenta';
  display: block;
  padding: 18px 20px;
  color: var(--muted);
}
.chart-empty {
  height: 100%;
  min-height: 160px;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--muted);
  padding: 24px;
  font-size: 13px;
}
.custom-chart-panel { margin-top: 32px; }
.custom-grid {
  display: grid;
  grid-template-columns: minmax(260px, .8fr) minmax(320px, 1.2fr);
  gap: 18px;
  padding: 18px 20px 20px;
}
.custom-grid textarea {
  width: 100%;
  min-height: 280px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  font-family: var(--mono, monospace);
  font-size: 12px;
  background: #f8fafc;
}
@media (max-width: 1180px) {
  .mini-dashboard-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .excel-chart-grid { grid-template-columns: 1fr; }
  .excel-chart-grid.specifications-grid { grid-template-columns: 1fr; }
  .excel-chart-grid.specifications-grid > .excel-chart-card,
  .excel-chart-grid.specifications-grid > .excel-chart-card.third-width { grid-column: auto; }
}
@media (max-width: 760px) {
  .mini-dashboard-tabs { grid-template-columns: 1fr; }
  .excel-card-head { flex-direction: column; }
  .custom-grid { grid-template-columns: 1fr; }
}

/* v36 top worklist: two-row filters, previous edition vs current edition */
.topl-toolbar-two-rows {
  display: block;
  padding: 10px;
}

.topl-filter-form-2rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  min-width: 0;
}

.topl-filter-form-2rows .topl-filter-row {
  display: grid;
  gap: 8px;
  align-items: center;
  width: 100%;
  min-width: 0;
}

.topl-filter-form-2rows .topl-filter-row-years {
  grid-template-columns: minmax(320px, 1fr) 40px 40px 40px 88px minmax(145px, 170px) minmax(130px, 155px);
}

.topl-filter-form-2rows .topl-filter-row-main {
  grid-template-columns: minmax(300px, 1fr) 112px 130px 104px minmax(150px, 190px) 70px 44px 44px 48px;
}

.topl-filter-form-2rows .compact-years {
  max-width: none;
  width: 100%;
  min-width: 0;
  margin: 0;
}

.topl-filter-form-2rows .scope-toggle {
  justify-self: start;
}

.topl-filter-form-2rows .ops-switch.ops-switch-icon {
  grid-column: auto;
  width: 48px;
  min-width: 48px;
}

@media (max-width: 1240px) {
  .topl-filter-form-2rows .topl-filter-row-years {
    grid-template-columns: minmax(260px, 1fr) 40px 40px 40px 88px minmax(130px, 1fr) minmax(130px, 1fr);
  }

  .topl-filter-form-2rows .topl-filter-row-main {
    grid-template-columns: minmax(220px, 1.4fr) repeat(3, minmax(94px, 1fr)) 70px 44px 44px 48px;
  }
}

@media (max-width: 900px) {
  .topl-filter-form-2rows .topl-filter-row-years,
  .topl-filter-form-2rows .topl-filter-row-main {
    grid-template-columns: 1fr 1fr;
  }

  .topl-filter-form-2rows .compact-years,
  .topl-filter-form-2rows .compact-search {
    grid-column: 1 / -1;
  }

  .topl-filter-form-2rows .scope-toggle {
    width: max-content;
  }
}

.topl-table td.metric-bad {
  background: var(--bad-tint);
  color: var(--bad-ink);
  font-weight: 800;
}

.top-status-form {
  display: inline-block;
  position: relative;
}

.top-status-form.is-reason-open {
  z-index: 80;
}

.status-reason-wrap {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 190px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 14px 35px rgba(15, 23, 42, .16);
}

.status-reason-wrap[hidden] {
  display: none !important;
}

.status-reason-wrap::after {
  content: "";
  position: absolute;
  right: 22px;
  bottom: -6px;
  width: 10px;
  height: 10px;
  transform: rotate(45deg);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.status-reason-label {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.status-reason-select,
.topl-bulk-reason {
  max-width: 210px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 11px;
  padding: 5px 9px;
}

.status-reason-select {
  width: 190px;
}

.topl-bulk-reason:disabled {
  opacity: .55;
}

.history-reason {
  display: block;
  max-width: 90px;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* NU without reason: show warning inline, replacing the leading status dot */
.status-select.missing-reason::before {
  content: "!";
  width: 14px;
  height: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #f59e0b;
  color: #fff;
  font-size: 10px;
  line-height: 1;
  font-weight: 900;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, .18);
}

.status-reason-alert {
  display: none !important;
}


/* Excel-like inline filters for Top table headers */
.topl-th-filter-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  padding: 0;
  margin: 0;
  cursor: pointer;
  display: inline;
  text-align: inherit;
}

.topl-th-filter-btn:hover {
  color: var(--accent-ink);
}

.topl-th-filter-btn.is-filtered,
.topl-th-filter-btn.is-sorted {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.topl-quick-toggle {
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
}

.topl-quick-toggle input {
  width: 13px;
  height: 13px;
  accent-color: var(--warn);
}

.topl-quick-toggle:has(input:checked) {
  color: var(--warn-ink);
  background: var(--warn-tint);
  border-color: rgba(217, 119, 6, .32);
}

.topl-excel-filter-popover {
  position: absolute;
  z-index: 2500;
  width: 270px;
  max-width: calc(100vw - 24px);
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 20px 55px rgba(15, 23, 42, .18);
  overflow: hidden;
}

.topl-filter-pop-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}

.topl-filter-pop-head strong {
  color: var(--ink);
  font-size: 12px;
}

.topl-filter-pop-head button {
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

.topl-filter-pop-head button:hover {
  background: var(--surface-3);
  color: var(--ink);
}

.topl-filter-pop-body {
  display: grid;
  gap: 8px;
  padding: 10px;
}

.topl-filter-action {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  padding: 8px 10px;
  text-align: left;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.topl-filter-action:hover {
  background: #f8fafc;
  border-color: var(--line-strong);
}

.topl-filter-action.primary {
  background: var(--accent-tint);
  border-color: rgba(6, 182, 212, .28);
  color: var(--accent-ink);
  font-weight: 800;
  text-align: center;
}

.topl-filter-action.ghost {
  color: var(--muted);
  text-align: center;
}

.topl-value-search,
.topl-numeric-filter input,
.topl-numeric-filter select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  padding: 8px 10px;
}

.topl-filter-values {
  max-height: 190px;
  overflow: auto;
  display: grid;
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.topl-filter-values label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 5px 6px;
  border-radius: 9px;
  color: var(--ink-soft);
  font-size: 12px;
  cursor: pointer;
}

.topl-filter-values label:hover {
  background: #f8fafc;
}

.topl-filter-values span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topl-numeric-filter {
  display: grid;
  gap: 6px;
}

.topl-numeric-filter label {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.topl-numeric-filter > div {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 6px;
}

.topl-numeric-filter small {
  color: var(--muted);
  font-size: 10px;
}

/* Top filters layout fix: keep NU missing-reason toggle next to search, not on a new row */
.topl-filter-form-2rows .topl-filter-row-main {
  grid-template-columns: minmax(260px, 1.05fr) auto repeat(6, minmax(104px, .42fr)) 70px 44px 44px 48px;
  align-items: center;
}

.topl-filter-form-2rows .compact-search {
  min-width: 300px;
}

.topl-filter-form-2rows .topl-quick-toggle {
  min-width: max-content;
  justify-self: start;
}

@media (max-width: 1240px) {
  .topl-filter-form-2rows .topl-filter-row-main {
    grid-template-columns: minmax(250px, 1fr) auto repeat(4, minmax(104px, 1fr)) 70px 44px 44px 48px;
  }
}


.topl-export-form {
  display: none !important;
}

.export-icon-btn {
  width: 40px;
  min-width: 40px;
  height: 36px;
  min-height: 36px;
  padding: 0;
  justify-content: center;
  position: relative;
  border-radius: 12px;
}

.export-icon-btn svg {
  width: 16px;
  height: 16px;
}

@media (max-width: 900px) {
  .topl-filter-form-2rows .topl-filter-row-main {
    grid-template-columns: 1fr 1fr;
  }
  .topl-filter-form-2rows .topl-quick-toggle {
    justify-self: stretch;
  }
}

/* Live client-side visible row count after Excel-like table filters */
.topl-live-filter-count {
  display: inline-flex;
  align-items: center;
  margin-left: 4px;
  color: var(--warn-ink);
  font-weight: 900;
}

.topl-live-filter-count::before {
  content: "";
  width: 6px;
  height: 6px;
  margin-right: 6px;
  border-radius: 999px;
  background: var(--warn);
}


/* KPI strip: restore minimal style, complete the grid with 12 KPIs */
.topl-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  margin-bottom: 16px;
  overflow: hidden;
}

.topl-strip > div {
  min-height: 94px;
  padding: 14px 16px;
  border-right: 1px solid var(--line-2);
  border-bottom: 1px solid var(--line-2);
  background: transparent;
  box-shadow: none;
  border-radius: 0;
}

.topl-strip > div:nth-child(6n) {
  border-right: 0;
}

.topl-strip > div:nth-last-child(-n+6) {
  border-bottom: 0;
}

.topl-strip small {
  font-size: 11px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 5px;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
}

.topl-strip strong {
  display: block;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -.02em;
  line-height: 1.1;
  margin-top: 4px;
  color: var(--ink);
  font-feature-settings: "tnum";
}

.topl-strip .delta {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  line-height: 1.35;
  color: var(--muted);
}

@media (max-width: 1280px) {
  .topl-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .topl-strip > div:nth-child(6n) {
    border-right: 1px solid var(--line-2);
  }
  .topl-strip > div:nth-child(4n) {
    border-right: 0;
  }
  .topl-strip > div:nth-last-child(-n+6) {
    border-bottom: 1px solid var(--line-2);
  }
  .topl-strip > div:nth-last-child(-n+4) {
    border-bottom: 0;
  }
}

@media (max-width: 900px) {
  .topl-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .topl-strip > div:nth-child(4n) {
    border-right: 1px solid var(--line-2);
  }
  .topl-strip > div:nth-child(2n) {
    border-right: 0;
  }
  .topl-strip > div:nth-last-child(-n+4) {
    border-bottom: 1px solid var(--line-2);
  }
  .topl-strip > div:nth-last-child(-n+2) {
    border-bottom: 0;
  }
}

@media (max-width: 560px) {
  .topl-strip {
    grid-template-columns: 1fr;
  }
  .topl-strip > div {
    border-right: 0 !important;
    border-bottom: 1px solid var(--line-2) !important;
  }
  .topl-strip > div:last-child {
    border-bottom: 0 !important;
  }
}

/* ===== Top 10 print pages restore + polish (v42, 2026-07-06) ===== */
.top10-ph {
  position: relative;
  overflow: hidden;
  align-items: stretch;
  min-height: 190px;
  padding: 28px;
  margin-bottom: 18px;
  border: 1px solid rgba(15, 23, 42, .08);
  border-radius: 28px;
  background:
    radial-gradient(circle at 92% 18%, rgba(34, 211, 238, .26), transparent 30%),
    radial-gradient(circle at 10% 0%, rgba(99, 102, 241, .18), transparent 36%),
    linear-gradient(135deg, #ffffff 0%, #f8fbff 50%, #eef8ff 100%);
  box-shadow: var(--sh-3);
}
.top10-ph::before {
  content: "";
  position: absolute;
  inset: auto -80px -120px auto;
  width: 360px;
  height: 360px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(6, 182, 212, .13), rgba(99, 102, 241, .10));
  pointer-events: none;
}
.top10-ph > * { position: relative; z-index: 1; }
.top10-ph .crumbs { color: var(--muted); }
.top10-ph h1 { max-width: 760px; font-size: clamp(30px, 3.2vw, 48px); }
.top10-ph p { max-width: 780px; color: var(--ink-soft); }
.top10-ph .meta {
  align-self: stretch;
  display: grid;
  grid-template-columns: repeat(3, minmax(110px, 1fr));
  gap: 10px;
}
.top10-ph .meta .stat {
  min-width: 118px;
  display: grid;
  align-content: center;
  padding: 16px 18px;
  text-align: left;
  border: 1px solid rgba(255,255,255,.68);
  border-radius: 20px;
  background: rgba(255,255,255,.70);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9), var(--sh-1);
  backdrop-filter: blur(10px);
}
.top10-ph .meta .stat strong { color: #0f172a; font-size: 28px; }
.top10-ph .meta .stat small { color: var(--muted); }

.top10-editor-shell {
  display: grid;
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.top10-company-list {
  position: sticky;
  top: calc(var(--topbar-h) + 18px);
  max-height: calc(100vh - var(--topbar-h) - 42px);
  overflow: auto;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255,255,255,.86);
  box-shadow: var(--sh-2);
  backdrop-filter: blur(14px);
}
.top10-company-list .panel-head { margin-bottom: 12px; }
.top10-company-list .panel-head h2 { font-size: 18px; }
.top10-company-item {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 12px;
  margin-bottom: 8px;
  border: 1px solid transparent;
  border-radius: 16px;
  background: transparent;
  color: var(--ink-soft);
  transition: background var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease), transform var(--dur-1) var(--ease), box-shadow var(--dur-1) var(--ease);
}
.top10-company-item:hover {
  transform: translateY(-1px);
  border-color: var(--line);
  background: #fff;
  box-shadow: var(--sh-1);
}
.top10-company-item.active {
  border-color: rgba(6, 182, 212, .38);
  background: linear-gradient(135deg, #ecfeff, #fff);
  box-shadow: 0 0 0 4px rgba(6, 182, 212, .08), var(--sh-1);
  color: var(--ink);
}
.top10-company-item > strong {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--ink);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 800;
}
.top10-company-item.active > strong { background: var(--accent); }
.top10-company-item span { min-width: 0; font-weight: 700; line-height: 1.25; }
.top10-company-item small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}
.top10-step-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
  font-style: normal;
}
.top10-step-dots b {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 6px;
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .02em;
}
.top10-step-dots b.ok { background: var(--ok-tint); color: var(--ok-ink); }

.top10-editor-main { display: grid; gap: 18px; min-width: 0; }
.top10-public-links-panel,
.top10-editor-panel,
.top10-feedback-panel,
.top10-assets-panel { box-shadow: var(--sh-1); }
.top10-link-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.top10-link-row small {
  color: var(--muted);
  font-family: var(--font-mono);
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
}

.top10-print-mockup {
  padding: clamp(14px, 2vw, 24px);
  border: 1px solid rgba(15, 23, 42, .08);
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(15,23,42,.06), transparent 24%),
    repeating-linear-gradient(45deg, rgba(15,23,42,.025) 0 8px, transparent 8px 16px),
    #eef2f7;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.75);
}
.top10-print-page {
  --top10-page-pad: clamp(22px, 4vw, 46px);
  --top10-side-width: clamp(280px, 30%, 360px);
  --top10-side-gap: clamp(18px, 3vw, 34px);
  --top10-hero-height: clamp(300px, 32vw, 460px);
  --top10-chart-card-height: clamp(150px, 13vw, 174px);
  --top10-chart-bottom-pad: clamp(22px, 3vw, 36px);
  --top10-side-chart-gap: clamp(18px, 2.2vw, 28px);
  --top10-chart-reserve: calc(var(--top10-chart-card-height) + var(--top10-chart-bottom-pad));
  position: relative;
  width: min(100%, 1120px);
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid #c9d1dd;
  border-radius: 18px;
  background: #fff;
  color: #222831;
  box-shadow: 0 34px 80px rgba(15, 23, 42, .18);
}
.top10-hero-photo {
  position: relative;
  min-height: var(--top10-hero-height);
  display: grid;
  place-items: center;
  padding-right: calc(var(--top10-side-width) + var(--top10-side-gap));
  background:
    linear-gradient(135deg, rgba(15,23,42,.10), rgba(15,23,42,.02)),
    linear-gradient(135deg, #dbe4ef, #f8fafc);
  background-size: cover;
  background-position: center;
  color: #64748b;
  font-weight: 800;
  text-align: center;
}
.top10-hero-photo::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  background: linear-gradient(180deg, transparent, rgba(15,23,42,.58));
  pointer-events: none;
}
.top10-hero-photo span {
  padding: 12px 16px;
  border-radius: 999px;
  background: rgba(255,255,255,.82);
  border: 1px solid rgba(255,255,255,.8);
  box-shadow: var(--sh-1);
}
.top10-hero-photo small {
  position: absolute;
  top: 16px;
  left: var(--top10-page-pad);
  z-index: 1;
  max-width: calc(100% - (var(--top10-page-pad) * 2));
  padding: 6px 9px;
  border-radius: 7px;
  background: rgba(15, 23, 42, .55);
  color: rgba(255,255,255,.94);
  text-align: left;
  text-shadow: 0 1px 8px rgba(0,0,0,.35);
  font-size: 11px;
  font-weight: 700;
}
.top10-print-name {
  padding: 20px calc(var(--top10-side-width) + var(--top10-side-gap)) 10px var(--top10-page-pad);
  font-family: var(--font-display);
  font-size: clamp(22px, 2.65vw, 34px);
  line-height: .94;
  letter-spacing: -.04em;
  font-weight: 800;
  color: #0f172a;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.top10-print-metrics {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 0 calc(var(--top10-side-width) + var(--top10-side-gap)) 22px var(--top10-page-pad);
  color: #475569;
  font-size: 13px;
  font-weight: 600;
}
.top10-print-metrics > strong { color: #0f172a; text-transform: uppercase; letter-spacing: .06em; font-size: 11px; }
.top10-print-metrics > i {
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: #cbd5e1;
}
.top10-rank-shape {
  position: absolute;
  left: var(--top10-page-pad);
  top: calc(var(--top10-hero-height) - 112px);
  z-index: 7;
  width: 92px;
  height: 92px;
  margin-right: 0;
  display: grid;
  place-items: center;
  align-content: center;
  border-radius: 28px 28px 28px 8px;
  background: #1f4f93;
  color: #fff;
  box-shadow: 0 18px 38px rgba(15, 23, 42, .32);
}
.top10-rank-shape span { font-family: var(--font-mono); font-size: 10px; text-transform: uppercase; letter-spacing: .12em; opacity: .78; }
.top10-rank-shape strong { font-family: var(--font-display); font-size: 42px; line-height: .9; }
.top10-print-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(22px, 4vw, 46px);
  padding: 0 calc(var(--top10-side-width) + var(--top10-side-gap)) 30px var(--top10-page-pad);
}
.top10-print-body article p {
  margin: 0 0 16px;
  color: #334155;
  font-size: 15.5px;
  line-height: 1.78;
}
.top10-print-body article p.dropcap::first-letter {
  float: left;
  margin: .08em .12em 0 0;
  font-family: var(--font-display);
  font-size: 4.4em;
  line-height: .82;
  color: #1f4f93;
  font-weight: 800;
}
.top10-print-body aside {
  position: absolute;
  z-index: 6;
  top: var(--top10-page-pad);
  right: var(--top10-page-pad);
  bottom: calc(var(--top10-chart-reserve) + var(--top10-side-chart-gap));
  width: var(--top10-side-width);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 18px;
  overflow: auto;
  border-radius: 24px;
  background: rgba(248,250,252,.94);
  border: 1px solid rgba(226,232,240,.92);
  box-shadow: none;
  backdrop-filter: blur(14px);
}
.top10-print-body aside h3 {
  margin: 0 0 14px;
  font-size: 12px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: .12em;
  color: #1f4f93;
}
.top10-side-project {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 12px;
  padding: 13px 0;
  border-top: 1px solid #e2e8f0;
}
.top10-side-project:first-of-type { border-top: 0; padding-top: 0; }
.top10-side-project img {
  width: 82px;
  height: 66px;
  grid-row: span 2;
  object-fit: cover;
  border-radius: 12px;
  background: #e2e8f0;
}
.top10-side-project strong { color: #0f172a; font-size: 13px; line-height: 1.25; }
.top10-side-project p { margin: 4px 0 0; color: #64748b; font-size: 12px; line-height: 1.45; }
.top10-side-project em { color: #1f4f93; font-style: normal; font-weight: 800; }
.top10-mini-charts {
  position: relative;
  z-index: 8;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 0 var(--top10-page-pad) var(--top10-chart-bottom-pad) var(--top10-page-pad);
}
.top10-line-card {
  min-height: var(--top10-chart-card-height);
  display: flex;
  flex-direction: column;
  padding: 16px 18px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  background: linear-gradient(180deg, #fff, #f8fafc);
}
.top10-line-card strong { display: block; color: #1f4f93; font-size: 12px; margin-bottom: 10px; }
.top10-value-chart { gap: 8px; }
.top10-chart-plot {
  flex: 1 1 auto;
  min-height: 92px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: end;
  gap: clamp(7px, 1.1vw, 14px);
  padding: 8px 2px 0;
  background: linear-gradient(180deg, transparent 0 48%, rgba(148,163,184,.16) 48% 49%, transparent 49%);
}
.top10-chart-bar {
  height: 100%;
  min-width: 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
  align-items: end;
  justify-items: center;
  gap: 4px;
}
.top10-chart-bar span {
  max-width: 100%;
  margin: 0;
  overflow: hidden;
  color: #1f4f93;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.top10-chart-bar i {
  width: min(100%, 34px);
  height: var(--h);
  min-height: 8px;
  display: block;
  border-radius: 9px 9px 3px 3px;
  background: linear-gradient(180deg, #1f5fa8, #1f4f93);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.28);
}
.top10-chart-bar b {
  color: #64748b;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
}
.top10-line-card .top10-chart-last {
  display: block;
  margin-top: 0;
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
}
.top10-line-card.empty { display: grid; place-items: center; text-align: center; color: #94a3b8; }

.top10-page-form,
.top10-comment-form,
.top10-upload-form,
.top10-asset-edit { display: grid; gap: 14px; }
.top10-page-form label,
.top10-comment-form label,
.top10-featured-card label,
.top10-asset-edit label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.top10-page-form input,
.top10-page-form textarea,
.top10-page-form select,
.top10-comment-form textarea,
.top10-featured-card input,
.top10-featured-card textarea,
.top10-featured-card select,
.top10-asset-edit input {
  width: 100%;
  min-height: 40px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: normal;
  text-transform: none;
  transition: border-color var(--dur-1) var(--ease), box-shadow var(--dur-1) var(--ease), background var(--dur-1) var(--ease);
}
.top10-page-form textarea,
.top10-comment-form textarea,
.top10-featured-card textarea { resize: vertical; line-height: 1.55; }
.top10-page-form input:focus,
.top10-page-form textarea:focus,
.top10-page-form select:focus,
.top10-comment-form textarea:focus,
.top10-featured-card input:focus,
.top10-featured-card textarea:focus,
.top10-featured-card select:focus,
.top10-asset-edit input:focus {
  outline: 0;
  border-color: var(--accent);
  background: #fff;
  box-shadow: var(--sh-focus);
}
.top10-done-check,
.check-row {
  display: flex !important;
  grid-template-columns: none !important;
  flex-direction: row;
  align-items: center;
  gap: 9px !important;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--ink-soft) !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  font-family: var(--font-sans) !important;
  font-size: 13px !important;
}
.top10-done-check input,
.check-row input { width: auto !important; min-height: 0 !important; box-shadow: none !important; }
.top10-featured-editor {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, #fff, #f8fafc);
}
.mini-section-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}
.mini-section-title strong { font-size: 14px; color: var(--ink); }
.mini-section-title small { color: var(--muted); font-size: 12px; }
.top10-featured-list { display: grid; gap: 12px; }
.top10-featured-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--sh-1);
}
.top10-featured-card.dragging { opacity: .62; }
.top10-featured-location { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.drag-handle {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--muted);
  cursor: grab;
  font-weight: 900;
}

.top10-comment-thread { display: grid; gap: 10px; margin-bottom: 14px; }
.top10-comment {
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-2);
}
.top10-comment.company { background: #eff6ff; border-color: #bfdbfe; }
.top10-comment.internal { background: #fff7ed; border-color: #fed7aa; }
.top10-comment strong { display: block; color: var(--ink); }
.top10-comment time { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; font-family: var(--font-mono); }
.top10-comment p { margin: 8px 0 0; color: var(--ink-soft); }

.top10-upload-form { margin-bottom: 18px; }
.top10-upload-drop {
  display: grid;
  gap: 6px;
  padding: 22px;
  border: 2px dashed rgba(6, 182, 212, .35);
  border-radius: 18px;
  background: linear-gradient(135deg, #ecfeff, #fff);
  cursor: pointer;
  transition: border-color var(--dur-1) var(--ease), transform var(--dur-1) var(--ease), box-shadow var(--dur-1) var(--ease);
}
.top10-upload-drop:hover { transform: translateY(-1px); border-color: var(--accent); box-shadow: var(--sh-2); }
.top10-upload-drop strong { color: var(--accent-ink); }
.top10-upload-drop small { color: var(--muted); }
.top10-upload-drop input { max-width: 100%; }
.top10-upload-drop.compact { padding: 16px; border-color: var(--line-strong); background: #fff; }
.top10-asset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}
.top10-asset-card {
  overflow: hidden;
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--sh-1);
}
.top10-asset-card > img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  border-radius: 14px;
  background: var(--surface-3);
}
.top10-asset-meta strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top10-asset-meta small { display: block; color: var(--muted); font-size: 12px; }
.top10-asset-edit { grid-template-columns: 1fr; gap: 8px; }

@media (max-width: 1180px) {
  .top10-editor-shell { grid-template-columns: 1fr; }
  .top10-company-list { position: relative; top: auto; max-height: none; }
}
@media (max-width: 900px) {
  .top10-ph { grid-template-columns: 1fr; padding: 22px; }
  .top10-ph .meta { grid-template-columns: 1fr; }
  .top10-print-page {
    --top10-page-pad: 18px;
    --top10-side-width: auto;
    --top10-side-gap: 18px;
    --top10-hero-height: clamp(240px, 54vw, 340px);
    --top10-chart-card-height: 140px;
    --top10-side-chart-gap: 18px;
  }
  .top10-print-body,
  .top10-mini-charts,
  .top10-featured-location { grid-template-columns: 1fr; }
  .top10-hero-photo,
  .top10-print-name,
  .top10-print-metrics,
  .top10-print-body,
  .top10-mini-charts { padding-left: 18px; padding-right: 18px; }
  .top10-hero-photo small { left: 18px; }
  .top10-print-name { white-space: normal; overflow: visible; text-overflow: clip; }
  .top10-print-body aside {
    position: relative;
    inset: auto;
    width: auto;
    margin-bottom: 22px;
    order: -1;
  }
  .top10-print-metrics { align-items: flex-start; padding-top: 0; }
  .top10-rank-shape { width: 78px; height: 78px; top: calc(var(--top10-hero-height) - 94px); }
  .top10-rank-shape strong { font-size: 34px; }
  .mini-section-title { display: grid; }
}
@media (max-width: 640px) {
  .top10-company-item { grid-template-columns: 42px minmax(0,1fr); padding: 10px; }
  .top10-company-item > strong { width: 42px; height: 42px; }
  .top10-side-project { grid-template-columns: 1fr; }
  .top10-side-project img { width: 100%; height: 150px; }
  .top10-asset-grid { grid-template-columns: 1fr; }
}

/* v42.1: keep side project cards readable while photos are still missing */
.top10-side-project:not(:has(img)) {
  grid-template-columns: 1fr;
}

/* Editorial analysis text attached to every print chart */
.chart-editorial-text {
  margin: 0 20px 14px;
  padding: 14px 16px;
  border: 1px solid rgba(37, 99, 235, .14);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(248, 250, 252, .96), rgba(255, 255, 255, .98));
  color: #334155;
  max-height: 230px;
  overflow: auto;
}
.chart-editorial-kicker {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 8px;
  color: #1d4ed8;
  font-family: var(--mono, monospace);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.chart-editorial-kicker svg {
  width: 14px;
  height: 14px;
}
.chart-editorial-text p {
  margin: 0 0 9px;
  color: #334155;
  font-size: 13px;
  line-height: 1.55;
}
.chart-editorial-text p:last-child {
  margin-bottom: 0;
}
.render-combo .excel-chart-canvas,
.render-line .excel-chart-canvas {
  min-height: 360px;
}
.chart-axis-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 8px;
  color: #475569;
  font-size: 11px;
}
.chart-axis-legend span {
  border: 1px solid rgba(148, 163, 184, .35);
  background: #fff;
  border-radius: 999px;
  padding: 5px 9px;
}
.chart-axis-legend b {
  color: #0f172a;
}
.excel-chart-body.has-split-panels {
  padding-top: 14px;
}
.excel-chart-split-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.excel-chart-split-panel {
  min-width: 0;
}
.excel-chart-split-head {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 8px;
}
.excel-chart-split-head h4 {
  margin: 0;
  font-size: 13px;
  line-height: 1.3;
  color: #0f172a;
}
.excel-chart-split-panel .excel-chart-canvas {
  min-height: 340px;
}
@media (max-width: 1100px) {
  .excel-chart-split-grid {
    grid-template-columns: 1fr;
  }
}

/* v43 chart polish: TOP 10 individual should read as one row per company, 3 metrics per row */
.top10-individual-dashboard .excel-chart-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
}
.top10-individual-dashboard .excel-chart-card {
  min-width: 0;
}
.top10-individual-dashboard .excel-card-head {
  padding: 14px 16px 10px;
}
.top10-individual-dashboard .excel-card-head h3 {
  font-size: 14px;
  line-height: 1.25;
}
.top10-individual-dashboard .excel-chart-body {
  padding: 10px 12px 0;
}
.top10-individual-dashboard .excel-chart-canvas {
  height: 250px;
}
@media (max-width: 1280px) {
  .top10-individual-dashboard .excel-chart-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .top10-individual-dashboard .excel-chart-grid { grid-template-columns: 1fr; }
}

/* round9: Top 10 page layout refinements */
.top10-print-page {
  --top10-side-width: clamp(245px, 24%, 310px);
  --top10-side-gap: clamp(26px, 3.2vw, 44px);
}
.top10-print-body article {
  padding-right: clamp(10px, 1.8vw, 26px);
}
.top10-side-project {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
  padding: 12px 0;
}
.top10-side-project img {
  width: 100%;
  height: clamp(70px, 7vw, 98px);
  grid-row: auto;
  object-fit: cover;
  border-radius: 14px;
}
.top10-side-project strong {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.top10-side-project p {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 0;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
}
.top10-side-project.no-img p { -webkit-line-clamp: 5; }
.top10-featured-warning,
.qs4-featured-warning {
  display: none;
  padding: 11px 13px;
  border: 1px solid rgba(245, 158, 11, .34);
  border-radius: 14px;
  background: #fffbeb;
  color: #92400e;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}
.top10-featured-warning.show,
.qs4-featured-warning.show { display: block; }
.word-limit-hint {
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}
.top10-asset-card {
  align-content: start;
  gap: 10px;
}
.top10-asset-edit label {
  gap: 5px;
  padding: 0;
  border: 0;
  background: transparent;
}
.top10-asset-edit label span {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.top10-asset-edit-row {
  display: grid;
  grid-template-columns: minmax(76px, .4fr) minmax(100px, .6fr);
  gap: 8px;
  align-items: end;
}
.top10-asset-edit-row .btn { min-height: 40px; }
.top10-asset-file-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  align-items: stretch;
}
.top10-asset-file-actions > .btn,
.top10-asset-file-actions form,
.top10-asset-file-actions form .btn {
  width: 100%;
}
.top10-asset-file-actions > .btn,
.top10-asset-file-actions form .btn {
  min-height: 40px;
  justify-content: center;
}
@media (max-width: 900px) {
  .top10-print-page { --top10-side-width: auto; --top10-side-gap: 18px; }
  .top10-print-body article { padding-right: 0; }
}

/* v43: editable editorial texts for chart cards */
.chart-editorial-text.is-edited {
  border-color: rgba(14, 165, 233, .26);
  background: linear-gradient(180deg, rgba(240, 249, 255, .92), rgba(255, 255, 255, .98));
}
.chart-editorial-kicker {
  justify-content: space-between;
  align-items: flex-start;
}
.chart-editorial-kicker > span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}
.chart-editorial-kicker em {
  color: #64748b;
  font-family: var(--sans, system-ui, sans-serif);
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
}
.chart-editorial-empty {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 20px 14px;
  padding: 12px 14px;
  border: 1px dashed rgba(148, 163, 184, .48);
  border-radius: 14px;
  background: rgba(248, 250, 252, .72);
  color: #64748b;
  font-size: 12px;
}
.chart-editorial-empty svg {
  width: 14px;
  height: 14px;
}
.chart-editorial-editor {
  margin: 0 20px 16px;
  padding: 16px;
  border: 1px solid rgba(37, 99, 235, .22);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(15, 23, 42, .08);
}
.chart-editorial-editor[hidden] {
  display: none !important;
}
.chart-editorial-editor form {
  display: grid;
  gap: 12px;
}
.chart-editorial-editor-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.chart-editorial-editor-head strong {
  display: block;
  color: #0f172a;
  font-size: 14px;
  font-weight: 800;
}
.chart-editorial-editor-head span {
  display: block;
  margin-top: 3px;
  color: #64748b;
  font-size: 12px;
  line-height: 1.45;
}
.chart-editorial-edited-badge {
  border: 1px solid rgba(14, 165, 233, .26);
  border-radius: 999px;
  padding: 5px 9px;
  background: rgba(240, 249, 255, .9);
  color: #0369a1 !important;
  font-size: 10px !important;
  font-weight: 800;
  text-transform: uppercase;
  white-space: nowrap;
}
.chart-editorial-editor label {
  display: grid;
  gap: 6px;
  color: #334155;
  font-size: 12px;
  font-weight: 800;
}
.chart-editorial-editor input,
.chart-editorial-editor textarea {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, .34);
  border-radius: 12px;
  padding: 10px 12px;
  background: #f8fafc;
  color: #0f172a;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  outline: none;
}
.chart-editorial-editor textarea {
  min-height: 170px;
  resize: vertical;
  line-height: 1.5;
}
.chart-editorial-editor input:focus,
.chart-editorial-editor textarea:focus {
  border-color: rgba(37, 99, 235, .5);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .08);
}
.chart-editorial-editor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}
.excel-card-actions .chart-text-edit-toggle {
  border-color: rgba(37, 99, 235, .22);
}
.btn.ghost.danger {
  border-color: rgba(239, 68, 68, .25);
  color: #dc2626;
}
@media (max-width: 760px) {
  .chart-editorial-kicker,
  .chart-editorial-editor-head,
  .chart-editorial-editor-actions {
    align-items: stretch;
    flex-direction: column;
  }
  .chart-editorial-kicker em {
    white-space: normal;
  }
}

/* round11: chart workflow, cleaner actions and collapsed data tables */
.excel-chart-grid {
  gap: 28px 22px;
}
.excel-chart-card {
  margin-bottom: 4px;
}
.excel-card-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  flex-wrap: wrap;
  min-width: 180px;
}
.btn.icon-only {
  width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn.icon-only svg {
  width: 16px;
  height: 16px;
}
.btn.icon-only.copied {
  border-color: rgba(22, 163, 74, .28);
  background: rgba(240, 253, 244, .94);
  color: #16a34a;
}
.chart-workflow-checks {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-right: 2px;
  padding: 3px;
  border: 1px solid rgba(226, 232, 240, .92);
  border-radius: 999px;
  background: rgba(248, 250, 252, .8);
}
.chart-workflow-form { margin: 0; }
.workflow-check {
  position: relative;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  border: 1px solid rgba(148, 163, 184, .55);
  background: #fff;
  color: #94a3b8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .14s ease, border-color .14s ease, color .14s ease, transform .14s ease;
}
.workflow-check:hover { transform: translateY(-1px); }
.workflow-check svg { width: 14px; height: 14px; stroke-width: 2.8; }
.workflow-check span {
  position: absolute;
  right: -2px;
  bottom: -4px;
  min-width: 11px;
  height: 11px;
  padding: 0 2px;
  border-radius: 999px;
  background: #f8fafc;
  color: #64748b;
  border: 1px solid rgba(203, 213, 225, .9);
  font-family: var(--mono, monospace);
  font-size: 7px;
  font-weight: 900;
  line-height: 10px;
  text-align: center;
}
.workflow-research { border-color: rgba(22, 163, 74, .48); }
.workflow-copy { border-color: rgba(124, 58, 237, .48); }
.workflow-dtp { border-color: rgba(249, 115, 22, .5); }
.workflow-check.done { color: #fff; }
.workflow-research.done {
  border-color: #16a34a;
  background: #16a34a;
}
.workflow-copy.done {
  border-color: #7c3aed;
  background: #7c3aed;
}
.workflow-dtp.done {
  border-color: #f97316;
  background: #f97316;
}
.workflow-research.done span {
  background: #dcfce7;
  border-color: rgba(22, 163, 74, .3);
  color: #15803d;
}
.workflow-copy.done span {
  background: #ede9fe;
  border-color: rgba(124, 58, 237, .3);
  color: #6d28d9;
}
.workflow-dtp.done span {
  background: #ffedd5;
  border-color: rgba(249, 115, 22, .32);
  color: #c2410c;
}
.chart-table-drawer {
  border-top: 1px solid var(--line);
  background: #fff;
}
.chart-table-drawer .excel-table-meta {
  border-bottom: 0;
  cursor: pointer;
  list-style: none;
}
.chart-table-drawer .excel-table-meta::-webkit-details-marker { display: none; }
.chart-table-drawer .drawer-hint {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  margin-left: auto;
  color: #2563eb;
  font-weight: 800;
}
.chart-table-drawer .drawer-hint svg {
  width: 13px;
  height: 13px;
  transition: transform .16s ease;
}
.chart-table-drawer[open] .drawer-hint svg { transform: rotate(180deg); }
.chart-table-drawer[open] .excel-table-meta { border-bottom: 1px solid var(--line); }
.excel-copy-table td.cell-delta-positive {
  background: rgba(34, 197, 94, .12);
  color: #166534;
  font-weight: 800;
}
.excel-copy-table td.cell-delta-negative {
  background: rgba(239, 68, 68, .12);
  color: #991b1b;
  font-weight: 800;
}
.manual-data-empty-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0 20px 14px;
  padding: 13px 15px;
  border: 1px dashed rgba(245, 158, 11, .42);
  border-radius: 16px;
  background: #fffbeb;
  color: #92400e;
}
.manual-data-empty-cta strong {
  display: block;
  color: #78350f;
  font-size: 13px;
  font-weight: 900;
}
.manual-data-empty-cta span {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  line-height: 1.45;
}
.manual-data-empty-cta .btn { white-space: nowrap; }
@media (max-width: 760px) {
  .excel-card-head { flex-direction: column; }
  .excel-card-actions { justify-content: flex-start; min-width: 0; }
  .manual-data-empty-cta { flex-direction: column; align-items: stretch; }
}
.manual-edition-switcher {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 12px;
  margin: -8px 0 18px;
  padding: 14px 16px;
  border: 1px solid rgba(226, 232, 240, .9);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-sm, 0 8px 22px rgba(15, 23, 42, .06));
}
.manual-edition-switcher label {
  display: grid;
  gap: 6px;
  color: #334155;
  font-size: 12px;
  font-weight: 800;
}
.manual-edition-switcher select {
  min-width: 120px;
  border: 1px solid rgba(148, 163, 184, .34);
  border-radius: 12px;
  padding: 10px 12px;
  background: #f8fafc;
  color: #0f172a;
  font: inherit;
}
.manual-edition-switcher > span {
  color: #64748b;
  font-size: 12px;
  line-height: 1.45;
  max-width: 640px;
}

/* round12: cleaner manual chart import UX */
.manual-page-shell {
  max-width: 1360px;
  margin: 0 auto;
  padding: 26px clamp(18px, 3vw, 34px) 56px;
}
.manual-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: 18px;
  align-items: stretch;
  margin-bottom: 18px;
}
.manual-hero-main,
.manual-year-card,
.manual-workflow-strip,
.manual-chart-card,
.manual-existing-section.improved {
  border: 1px solid rgba(226, 232, 240, .9);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(15, 23, 42, .07);
}
.manual-hero-main {
  padding: 24px 26px;
}
.manual-back-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #2563eb;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  margin-bottom: 18px;
}
.manual-back-link svg { width: 16px; height: 16px; }
.manual-eyebrow {
  color: #2563eb;
  font-family: var(--mono, monospace);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.manual-hero-main h1 {
  margin: 0;
  color: #0f172a;
  font-size: clamp(28px, 4vw, 44px);
  line-height: .98;
  letter-spacing: -.045em;
}
.manual-hero-main p {
  max-width: 880px;
  margin: 12px 0 0;
  color: #475569;
  font-size: 15px;
  line-height: 1.55;
}
.manual-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}
.manual-hero-meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 10px;
  border: 1px solid rgba(226, 232, 240, .9);
  border-radius: 999px;
  background: #f8fafc;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}
.manual-hero-meta strong { color: #0f172a; }
.manual-hero-meta .ok { background: #f0fdf4; color: #166534; border-color: rgba(22, 163, 74, .2); }
.manual-hero-meta .warn { background: #fffbeb; color: #92400e; border-color: rgba(245, 158, 11, .28); }
.manual-year-card {
  padding: 20px;
  display: grid;
  align-content: center;
  gap: 10px;
}
.manual-year-card label {
  display: grid;
  gap: 8px;
  color: #334155;
  font-size: 12px;
  font-weight: 900;
}
.manual-year-card select {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(148, 163, 184, .32);
  border-radius: 14px;
  background: #f8fafc;
  padding: 0 13px;
  color: #0f172a;
  font: inherit;
  font-size: 15px;
  font-weight: 800;
}
.manual-year-card small {
  color: #64748b;
  line-height: 1.45;
}
.manual-workflow-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  overflow: hidden;
  margin-bottom: 18px;
}
.manual-workflow-strip article {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 14px 16px;
  border-right: 1px solid rgba(226, 232, 240, .9);
}
.manual-workflow-strip article:last-child { border-right: 0; }
.manual-workflow-strip b {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #eff6ff;
  color: #2563eb;
  font-size: 13px;
}
.manual-workflow-strip span {
  color: #334155;
  font-size: 13px;
  font-weight: 800;
}
.manual-chart-layout.improved {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
  align-items: start;
}
.manual-chart-card.main,
.manual-chart-card.helper {
  overflow: hidden;
}
.manual-card-head.clean {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  border-bottom: 1px solid rgba(226, 232, 240, .9);
  background: linear-gradient(180deg, #fff, #f8fafc);
}
.manual-card-head.clean .lbl {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  margin-bottom: 8px;
  padding: 5px 9px;
  border-radius: 999px;
  background: #eff6ff;
  color: #2563eb;
  font-family: var(--mono, monospace);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.manual-card-head.clean h2,
.manual-chart-card.helper h2 {
  margin: 0;
  color: #0f172a;
  font-size: 22px;
  line-height: 1.1;
  letter-spacing: -.025em;
}
.manual-card-head.clean p {
  margin: 7px 0 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.5;
}
.manual-data-form.improved {
  display: grid;
  gap: 18px;
  padding: 20px 22px 22px;
}
.manual-form-section {
  display: grid;
  gap: 10px;
}
.manual-form-section h3,
.manual-paste-head h3,
.helper-block h3 {
  margin: 0;
  color: #0f172a;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: -.015em;
}
.manual-form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 12px;
}
.manual-data-form.improved label {
  display: grid;
  gap: 7px;
  color: #334155;
  font-size: 12px;
  font-weight: 850;
}
.manual-data-form.improved input,
.manual-data-form.improved select,
.manual-data-form.improved textarea {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, .33);
  border-radius: 14px;
  background: #f8fafc;
  color: #0f172a;
  padding: 11px 12px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  outline: none;
}
.manual-data-form.improved input:focus,
.manual-data-form.improved select:focus,
.manual-data-form.improved textarea:focus {
  border-color: rgba(37, 99, 235, .55);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .08);
}
.manual-source-note textarea {
  min-height: 96px;
  resize: vertical;
  line-height: 1.5;
}
.manual-form-section.paste {
  border: 1px solid rgba(226, 232, 240, .9);
  border-radius: 18px;
  background: #f8fafc;
  padding: 14px;
}
.manual-paste-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 11px;
}
.manual-paste-head p {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 12px;
  line-height: 1.45;
}
.manual-template-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}
.manual-template-buttons .btn {
  min-height: 34px;
  padding: 7px 10px;
  border-radius: 11px;
  font-size: 12px;
}
.manual-paste-area {
  min-height: 330px;
  resize: vertical;
  font-family: var(--mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace) !important;
  font-size: 12px !important;
  line-height: 1.55 !important;
  white-space: pre;
  tab-size: 4;
  background: #fff !important;
}
.manual-actions.sticky {
  position: sticky;
  bottom: 0;
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin: 0 -22px -22px;
  padding: 13px 22px;
  border-top: 1px solid rgba(226, 232, 240, .9);
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(10px);
}
.manual-delete-form {
  padding: 0 22px 22px;
}
.manual-chart-card.helper.improved {
  position: sticky;
  top: 16px;
  padding: 18px;
}
.helper-block {
  padding: 15px;
  border: 1px solid rgba(226, 232, 240, .9);
  border-radius: 18px;
  background: #fff;
  margin-bottom: 12px;
}
.helper-block.highlight {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #eff6ff;
  border-color: rgba(37, 99, 235, .18);
}
.helper-block.highlight > svg {
  width: 22px;
  height: 22px;
  color: #2563eb;
  flex: 0 0 auto;
}
.helper-block p {
  margin: 7px 0 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.5;
}
.helper-block pre {
  overflow-x: auto;
  margin: 10px 0 0;
  padding: 12px;
  border-radius: 12px;
  background: #0f172a;
  color: #dbeafe;
  font-size: 12px;
  line-height: 1.55;
}
.helper-block.muted {
  background: #f8fafc;
}
.helper-block code {
  border-radius: 6px;
  padding: 2px 5px;
  background: #e2e8f0;
  color: #334155;
  font-size: 11px;
}
.manual-existing-section.improved {
  margin-top: 20px;
  overflow: hidden;
}
.manual-existing-section.improved summary {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 18px;
  color: #0f172a;
}
.manual-existing-section.improved summary span {
  color: #64748b;
  font-size: 12px;
  font-family: var(--mono, monospace);
  text-transform: uppercase;
  letter-spacing: .08em;
}
.manual-existing-section.improved .excel-table-wrap {
  border-top: 1px solid rgba(226, 232, 240, .9);
}
@media (max-width: 1100px) {
  .manual-hero,
  .manual-chart-layout.improved { grid-template-columns: 1fr; }
  .manual-chart-card.helper.improved { position: static; }
  .manual-form-grid { grid-template-columns: repeat(2, minmax(160px, 1fr)); }
}
@media (max-width: 760px) {
  .manual-page-shell { padding-inline: 14px; }
  .manual-workflow-strip { grid-template-columns: 1fr 1fr; }
  .manual-workflow-strip article:nth-child(2) { border-right: 0; }
  .manual-form-grid { grid-template-columns: 1fr; }
  .manual-paste-head,
  .manual-actions.sticky { align-items: stretch; flex-direction: column; }
  .manual-template-buttons { justify-content: flex-start; }
}

/* round13: dashboard cards use clean display labels + workflow completion colors */
.dash-tab.dash-complete-research {
  background: linear-gradient(135deg, rgba(34, 197, 94, .15), rgba(255, 255, 255, .96));
  border-color: rgba(34, 197, 94, .35);
}
.dash-tab.dash-complete-copy {
  background: linear-gradient(135deg, rgba(139, 92, 246, .16), rgba(255, 255, 255, .96));
  border-color: rgba(139, 92, 246, .35);
}
.dash-tab.dash-complete-dtp {
  background: linear-gradient(135deg, rgba(249, 115, 22, .18), rgba(255, 255, 255, .96));
  border-color: rgba(249, 115, 22, .38);
}
.dash-tab.dash-progress-partial {
  background: linear-gradient(135deg, rgba(148, 163, 184, .12), rgba(255, 255, 255, .96));
}
.dash-tab.active.dash-complete-research { box-shadow: inset 0 0 0 1px rgba(34, 197, 94, .2), var(--shadow-sm, 0 8px 22px rgba(15, 23, 42, .06)); }
.dash-tab.active.dash-complete-copy { box-shadow: inset 0 0 0 1px rgba(139, 92, 246, .22), var(--shadow-sm, 0 8px 22px rgba(15, 23, 42, .06)); }
.dash-tab.active.dash-complete-dtp { box-shadow: inset 0 0 0 1px rgba(249, 115, 22, .22), var(--shadow-sm, 0 8px 22px rgba(15, 23, 42, .06)); }

/* round13: Grafic 1 dynamics are highlighted on the cell background, not by turning the text into a badge */
.excel-copy-table td.cell-delta-positive {
  background: rgba(34, 197, 94, .16) !important;
  color: inherit;
  font-weight: 700;
}
.excel-copy-table td.cell-delta-negative {
  background: rgba(239, 68, 68, .15) !important;
  color: inherit;
  font-weight: 700;
}

/* Round 14: Top 100 preview + lock controls */
.topl-pagination__actions .top-lock-form {
    display: inline-flex;
    margin: 0;
}
.topl-pagination__actions .btn i {
    width: 15px;
    height: 15px;
}
.top-preview-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: linear-gradient(135deg, rgba(37, 99, 235, .10), rgba(20, 184, 166, .08)), var(--surface);
    box-shadow: var(--shadow);
    margin-bottom: 22px;
}
.top-preview-hero .eyebrow {
    margin: 0 0 8px;
    text-transform: uppercase;
    letter-spacing: .18em;
    font-size: 11px;
    font-weight: 900;
    color: var(--accent);
}
.top-preview-hero h1 {
    margin: 0;
    font-size: clamp(28px, 4vw, 54px);
    line-height: .95;
    letter-spacing: -.05em;
}
.top-preview-hero p {
    margin: 12px 0 0;
    color: var(--muted);
    max-width: 760px;
}
.top-preview-stats {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.top-preview-stats span {
    min-width: 120px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255,255,255,.82);
}
.top-preview-stats strong {
    display: block;
    font-size: 24px;
    letter-spacing: -.03em;
}
.top-preview-stats small {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .08em;
}
.top-preview-layout {
    display: grid;
    grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
    gap: 22px;
    align-items: start;
}
.top-preview-chat {
    position: sticky;
    top: 18px;
    display: grid;
    gap: 14px;
}
.chat-card,
.preview-table-card,
.comment-bubble {
    border: 1px solid var(--line);
    border-radius: 22px;
    background: var(--surface);
    box-shadow: var(--shadow-soft);
}
.chat-card {
    padding: 18px;
}
.chat-card h2,
.preview-table-head h2 {
    margin: 0;
    font-size: 18px;
    letter-spacing: -.02em;
}
.preview-comment-form {
    display: grid;
    gap: 12px;
    margin-top: 14px;
}
.preview-comment-form label {
    display: grid;
    gap: 6px;
    font-size: 12px;
    font-weight: 800;
    color: var(--muted);
}
.preview-comment-form input,
.preview-comment-form textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface-2);
    padding: 11px 12px;
    font: inherit;
    color: var(--text);
}
.chat-list {
    display: grid;
    gap: 10px;
    max-height: 62vh;
    overflow: auto;
    padding-right: 3px;
}
.comment-bubble {
    padding: 14px;
}
.comment-bubble div {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: baseline;
}
.comment-bubble small {
    color: var(--muted);
    font-size: 11px;
}
.comment-bubble p {
    margin: 8px 0 0;
    color: var(--text);
    line-height: 1.5;
    white-space: normal;
}
.comment-empty {
    border: 1px dashed var(--line);
    border-radius: 18px;
    color: var(--muted);
    padding: 18px;
    background: var(--surface-2);
}
.top-preview-main {
    display: grid;
    gap: 26px;
}
.preview-table-card {
    overflow: hidden;
}
.preview-table-card.subdued {
    box-shadow: none;
}
.preview-table-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--line);
}
.preview-table-head p {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 13px;
}
.count-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 34px;
    border-radius: 999px;
    background: rgba(16, 185, 129, .12);
    color: #047857;
    font-weight: 900;
}
.count-pill.danger {
    background: rgba(239, 68, 68, .12);
    color: #b91c1c;
}
.preview-table-wrap {
    width: 100%;
    overflow: auto;
}
.preview-table-wrap.compact {
    max-height: 520px;
}
.preview-table {
    width: 100%;
    min-width: 1120px;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 12px;
}
.preview-table th,
.preview-table td {
    padding: 11px 12px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: middle;
    white-space: nowrap;
}
.preview-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: var(--surface-2);
    color: var(--muted);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .08em;
}
.preview-table td.num,
.preview-table th.num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}
.preview-table td.rank {
    font-weight: 900;
    color: var(--text);
}
.preview-company strong,
.preview-company small {
    display: block;
}
.preview-company small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 11px;
}
.preview-move,
.preview-status,
.preview-data {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 5px 9px;
    font-size: 11px;
    font-weight: 900;
    line-height: 1;
}
.preview-move.up { background: rgba(16,185,129,.12); color: #047857; }
.preview-move.down { background: rgba(239,68,68,.12); color: #b91c1c; }
.preview-move.new { background: rgba(37,99,235,.12); color: #1d4ed8; }
.preview-move.reentry { background: rgba(100,116,139,.14); color: #475569; border-color: rgba(100,116,139,.22); }
.preview-move.same,
.preview-move.none { background: var(--surface-2); color: var(--muted); }
.preview-status.ok { background: rgba(16,185,129,.12); color: #047857; }
.preview-status.nu { background: rgba(239,68,68,.12); color: #b91c1c; }
.preview-status.has-reason { position: relative; cursor: help; }
.preview-status.has-reason::after {
    content: attr(data-reason);
    position: absolute;
    left: 50%;
    bottom: calc(100% + 9px);
    transform: translateX(-50%) translateY(4px);
    width: max-content;
    max-width: 280px;
    white-space: normal;
    text-align: left;
    background: #0f172a;
    color: #fff;
    border-radius: 10px;
    padding: 9px 11px;
    font-size: 12px;
    line-height: 1.35;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
    box-shadow: 0 14px 30px rgba(15,23,42,.2);
    opacity: 0;
    pointer-events: none;
    z-index: 20;
    transition: opacity .15s ease, transform .15s ease;
}
.preview-status.has-reason::before {
    content: '';
    position: absolute;
    left: 50%;
    bottom: calc(100% + 3px);
    transform: translateX(-50%) translateY(4px);
    border: 6px solid transparent;
    border-top-color: #0f172a;
    opacity: 0;
    pointer-events: none;
    z-index: 21;
    transition: opacity .15s ease, transform .15s ease;
}
.preview-status.has-reason:hover::after,
.preview-status.has-reason:focus-visible::after,
.preview-status.has-reason:hover::before,
.preview-status.has-reason:focus-visible::before {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.preview-status.review { background: rgba(245,158,11,.14); color: #a16207; }
.preview-data.ok { background: rgba(16,185,129,.12); color: #047857; }
.preview-data.incomplete { background: rgba(245,158,11,.14); color: #a16207; }
.preview-data.missing { background: rgba(148,163,184,.16); color: #64748b; }
@media (max-width: 1100px) {
    .top-preview-layout { grid-template-columns: 1fr; }
    .top-preview-chat { position: static; }
    .top-preview-hero { align-items: flex-start; flex-direction: column; }
    .top-preview-stats { justify-content: flex-start; }
}

/* Round 16: preview criteria card */
.preview-rules-card {
    background: #fbfdff;
}
.preview-rules-card .rules-eyebrow {
    margin: 0 0 8px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .14em;
    text-transform: uppercase;
}
.preview-rules-card h2 {
    margin-bottom: 12px;
}
.preview-rules-card h3 {
    margin: 18px 0 10px;
    font-size: 13px;
    letter-spacing: .03em;
    text-transform: uppercase;
    color: var(--muted);
}
.preview-rules-list {
    display: grid;
    gap: 9px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.preview-rules-list li {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    gap: 9px;
    align-items: start;
    color: var(--text);
    font-size: 12px;
    line-height: 1.45;
}
.preview-rules-list i {
    width: 18px;
    height: 18px;
    margin-top: 1px;
    border-radius: 999px;
    padding: 3px;
    background: rgba(16, 185, 129, .13);
    color: #047857;
    stroke-width: 3;
}
.preview-rules-list.guidance i {
    background: rgba(37, 99, 235, .11);
    color: #1d4ed8;
    stroke-width: 2.4;
}
.rules-note {
    margin: 14px 0 0;
    padding-top: 12px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
}

/* Top 10 editor: unified editorial field + one-click copy controls */
.top10-field-help {
  display: block;
  margin-top: -2px;
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: normal;
  line-height: 1.45;
  text-transform: none;
}
.top10-copy-field {
  position: relative;
  display: block;
  width: 100%;
  min-width: 0;
}
.top10-copy-field > input,
.top10-copy-field > textarea {
  padding-right: 50px !important;
}
.top10-copy-btn {
  position: absolute;
  z-index: 3;
  top: 6px;
  right: 6px;
  display: inline-grid;
  width: 32px;
  height: 32px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: rgba(255,255,255,.94);
  color: var(--ink-soft);
  cursor: pointer;
  box-shadow: 0 2px 7px rgba(15,23,42,.08);
  transition: transform var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease), background var(--dur-1) var(--ease), color var(--dur-1) var(--ease);
}
.top10-copy-btn:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
  color: var(--accent-ink);
  background: #fff;
}
.top10-copy-btn:focus-visible {
  outline: 0;
  box-shadow: var(--sh-focus);
}
.top10-copy-btn svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.top10-copy-btn.copied {
  border-color: #86efac;
  background: #ecfdf5;
  color: #15803d;
}
.top10-copy-btn.copy-error {
  border-color: #fecaca;
  background: #fef2f2;
  color: #b91c1c;
}


/* Segmente campanie confirmare proiecte print */
.pill.print-tier {
  display: inline-flex;
  margin-top: 6px;
  font-size: 10px;
  letter-spacing: .02em;
  border: 1px solid transparent;
}
.pill.print-tier.top10 { background: #fff7ed; color: #9a3412; border-color: #fed7aa; }
.pill.print-tier.top100 { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }

/* TOP 10 editor: canonical project selection + complete project text */
.top10-editor-main .top10-print-mockup .top10-side-project strong,
.top10-editor-main .top10-print-mockup .top10-side-project p {
  display: block;
  overflow: visible;
  -webkit-box-orient: initial;
  -webkit-line-clamp: initial;
  white-space: normal;
  text-overflow: clip;
  overflow-wrap: anywhere;
}
.top10-featured-card.selected {
  border-color: rgba(22, 163, 74, .42);
  background: linear-gradient(180deg, #f0fdf4, #ffffff 42%);
  box-shadow: 0 10px 30px -24px rgba(22, 101, 52, .85);
}
.top10-editor-featured-choice {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: -14px -14px 0;
  padding: 12px 48px 12px 14px;
  border-bottom: 1px solid #dcfce7;
  background: #f0fdf4;
  color: #166534;
  cursor: pointer;
}
.top10-editor-featured-choice input {
  width: 20px !important;
  height: 20px !important;
  min-height: 0 !important;
  margin: 0;
  accent-color: #16a34a;
  box-shadow: none !important;
  flex: 0 0 20px;
}
.top10-editor-featured-choice span {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.top10-editor-featured-choice strong {
  color: #166534;
  font-size: 13px;
}
.top10-editor-featured-choice small {
  color: #4d7c5a;
  font-size: 11px;
  font-weight: 500;
}
.top10-editor-featured-choice.selection-locked {
  cursor: not-allowed;
  opacity: .55;
  filter: grayscale(.25);
}
.top10-featured-limit {
  display: none;
  padding: 11px 13px;
  border: 1px solid rgba(37, 99, 235, .24);
  border-radius: 14px;
  background: #eff6ff;
  color: #1e40af;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
}
.top10-featured-limit.show { display: block; }
.top10-featured-editor .mini-section-title > div {
  display: grid;
  gap: 4px;
}
.top10-featured-editor .mini-section-title .badge {
  flex: 0 0 auto;
  white-space: nowrap;
}
.top10-hero-credit-help {
  padding: 11px 13px;
  border: 1px solid #dbeafe;
  border-radius: 12px;
  background: #f8fbff;
  color: #475569;
  font-size: 12px;
  line-height: 1.5;
}
.top10-hero-credit-help a {
  color: #1d4ed8;
  font-weight: 700;
  text-decoration: none;
}
.top10-hero-credit-help a:hover { text-decoration: underline; }


/* Top 10 AG: tabelul principal compact, apropiat de macheta de print. */
.top10-ranking-wrap {
  max-height: 520px;
}
.excel-copy-table.top10-ranking-table {
  width: 1874px;
  min-width: 1874px;
  table-layout: fixed;
  font-size: 11px;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}
.top10-ranking-table col.rank-position { width: 72px; }
.top10-ranking-table col.rank-evolution { width: 44px; }
.top10-ranking-table col.rank-company { width: 190px; }
.top10-ranking-table col.rank-number { width: 68px; }
.excel-copy-table.top10-ranking-table th,
.excel-copy-table.top10-ranking-table td {
  padding: 6px 5px;
  vertical-align: middle;
}
.excel-copy-table.top10-ranking-table th {
  white-space: normal;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: auto;
  text-align: center;
  line-height: 1.15;
  font-size: 9px;
  letter-spacing: .035em;
}
.excel-copy-table.top10-ranking-table td {
  white-space: nowrap;
  text-align: center;
}
.excel-copy-table.top10-ranking-table th:nth-child(4),
.excel-copy-table.top10-ranking-table td:nth-child(4) {
  text-align: left;
}
.excel-copy-table.top10-ranking-table td:nth-child(4) {
  font-weight: 700;
}

/* v44: AI-generated editorial text for chart cards */
.excel-card-actions .chart-ai-generate-btn {
  border-color: rgba(124, 58, 237, .28);
  color: #6d28d9;
  background: linear-gradient(180deg, #ffffff, #faf5ff);
}
.excel-card-actions .chart-ai-generate-btn:hover {
  border-color: rgba(124, 58, 237, .5);
  background: #f5f3ff;
  color: #5b21b6;
}
.excel-card-actions .chart-ai-generate-btn:disabled {
  cursor: wait;
  opacity: .72;
}
.excel-card-actions .chart-ai-generate-btn.is-loading svg {
  animation: chart-ai-spin .85s linear infinite;
}
@keyframes chart-ai-spin {
  to { transform: rotate(360deg); }
}
.chart-ai-feedback {
  margin: 0 20px 14px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
}
.chart-ai-feedback[hidden] {
  display: none !important;
}
.chart-ai-feedback.is-success {
  border-color: rgba(34, 197, 94, .26);
  background: rgba(240, 253, 244, .94);
  color: #166534;
}
.chart-ai-feedback.is-error {
  border-color: rgba(239, 68, 68, .28);
  background: rgba(254, 242, 242, .96);
  color: #b91c1c;
}
.chart-editorial-text.is-ai {
  border-color: rgba(124, 58, 237, .24);
  background: linear-gradient(180deg, rgba(250, 245, 255, .86), rgba(255, 255, 255, .98));
}
.chart-editorial-text.is-ai .chart-editorial-kicker em,
.chart-editorial-edited-badge {
  color: #6d28d9;
}

/* v44.1: stack workflow and text actions on two-column chart cards */
.chart-action-buttons {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  flex-wrap: wrap;
}

@media (min-width: 1181px) {
  .excel-chart-card:not(.full):not(.table-only) .excel-card-actions,
  .excel-chart-card.table-only.half-width-table .excel-card-actions {
    min-width: 123px;
    flex-direction: column;
    align-items: flex-end;
    justify-content: flex-start;
    flex-wrap: nowrap;
  }

  .excel-chart-card:not(.full):not(.table-only) .chart-workflow-checks,
  .excel-chart-card.table-only.half-width-table .chart-workflow-checks {
    margin-right: 0;
  }

  .excel-chart-card:not(.full):not(.table-only) .chart-action-buttons,
  .excel-chart-card.table-only.half-width-table .chart-action-buttons {
    flex-wrap: nowrap;
  }
}

@media (max-width: 760px) {
  .chart-action-buttons {
    justify-content: flex-start;
  }
}


/* v44.2: separate copy for editorial text and Illustrator-ready table data */
.excel-card-actions .copy-editorial-btn {
  border-color: rgba(14, 116, 144, .26);
  color: #0e7490;
  background: linear-gradient(180deg, #fff, #ecfeff);
}
.excel-card-actions .copy-editorial-btn:hover {
  border-color: rgba(14, 116, 144, .5);
  color: #155e75;
  background: #cffafe;
}
.excel-card-actions .copy-table-btn {
  border-color: rgba(71, 85, 105, .24);
  color: #475569;
  background: linear-gradient(180deg, #fff, #f8fafc);
}
.excel-card-actions .copy-table-btn:hover {
  border-color: rgba(71, 85, 105, .42);
  color: #334155;
  background: #f1f5f9;
}
.btn.icon-only.copy-failed {
  border-color: rgba(239, 68, 68, .34);
  background: rgba(254, 242, 242, .96);
  color: #dc2626;
}

/* Cele patru actiuni principale raman pe acelasi rand si pe cardurile in 2 coloane. */
.chart-action-buttons {
  gap: 5px;
  flex-wrap: nowrap;
}
@media (min-width: 1181px) {
  .excel-chart-card:not(.full):not(.table-only) .excel-card-actions,
  .excel-chart-card.table-only.half-width-table .excel-card-actions {
    min-width: 151px;
  }
  .excel-chart-card:not(.full):not(.table-only) .chart-action-buttons .btn.icon-only,
  .excel-chart-card.table-only.half-width-table .chart-action-buttons .btn.icon-only {
    width: 34px;
    height: 34px;
    min-height: 34px;
  }
}

/* v44.4: QR pentru pagina publica a graficului animat */
.chart-secondary-actions {
  width: 100%;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-top: 2px;
}
.excel-card-actions .chart-qr-btn {
  border-color: rgba(37, 99, 235, .28);
  color: #1d4ed8;
  background: linear-gradient(180deg, #fff, #eff6ff);
}
.excel-card-actions .chart-qr-btn:hover {
  border-color: rgba(37, 99, 235, .5);
  color: #1e40af;
  background: #dbeafe;
}
.chart-qr-dialog {
  width: min(92vw, 430px);
  max-width: 430px;
  padding: 0;
  border: 0;
  border-radius: 22px;
  color: var(--ink);
  background: transparent;
  box-shadow: 0 28px 90px rgba(15, 23, 42, .28);
}
.chart-qr-dialog::backdrop {
  background: rgba(15, 23, 42, .55);
  backdrop-filter: blur(5px);
}
.chart-qr-panel {
  position: relative;
  padding: 22px;
  border: 1px solid rgba(148, 163, 184, .28);
  border-radius: 22px;
  background: #fff;
}
.chart-qr-close-form {
  position: absolute;
  top: 12px;
  right: 12px;
  margin: 0;
}
.chart-qr-heading {
  padding-right: 42px;
}
.chart-qr-heading > span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #2563eb;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.chart-qr-heading > span svg {
  width: 15px;
  height: 15px;
}
.chart-qr-heading h3 {
  margin: 7px 0 6px;
  font-size: 19px;
  line-height: 1.25;
}
.chart-qr-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.chart-qr-code {
  width: min(270px, 70vw);
  aspect-ratio: 1;
  margin: 18px auto;
  padding: 10px;
  border: 1px solid #dbe4f0;
  border-radius: 18px;
  background: #fff;
  box-shadow: inset 0 0 0 5px #f8fafc;
}
.chart-qr-code svg {
  width: 100%;
  height: 100%;
}
.chart-qr-url-label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.chart-qr-url-label input {
  width: 100%;
  min-width: 0;
  height: 38px;
  padding: 0 10px;
  border: 1px solid #dbe4f0;
  border-radius: 10px;
  color: #334155;
  background: #f8fafc;
  font-size: 11px;
  font-family: "Geist Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
  text-transform: none;
  letter-spacing: 0;
}
.chart-qr-dialog-actions {
  margin-top: 13px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}
@media (max-width: 600px) {
  .chart-qr-panel {
    padding: 18px;
  }
  .chart-qr-dialog-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .chart-qr-dialog-actions .btn {
    justify-content: center;
  }
}

/* Workflow checkmarks: save in place without page reload */
.workflow-check:disabled {
  cursor: wait;
}
.workflow-check.is-saving {
  opacity: .58;
  transform: none;
}
.workflow-research.is-saved { box-shadow: 0 0 0 4px rgba(22, 163, 74, .14); }
.workflow-copy.is-saved { box-shadow: 0 0 0 4px rgba(124, 58, 237, .14); }
.workflow-dtp.is-saved { box-shadow: 0 0 0 4px rgba(249, 115, 22, .16); }
.workflow-check.is-error {
  border-color: #dc2626;
  color: #dc2626;
  box-shadow: 0 0 0 4px rgba(220, 38, 38, .12);
}

/* Introducere simpla pe perioade pentru graficele cu o singura serie externa */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.manual-form-section.manual-simple-entry {
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(191, 219, 254, .9);
  border-radius: 20px;
  background: linear-gradient(180deg, #f8fbff 0%, #f8fafc 100%);
}
.manual-simple-entry-head {
  align-items: center;
  margin-bottom: 0;
}
.manual-simple-entry-summary {
  min-width: 98px;
  padding: 10px 13px;
  border: 1px solid rgba(148, 163, 184, .24);
  border-radius: 14px;
  display: grid;
  justify-items: center;
  background: #fff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, .05);
}
.manual-simple-entry-summary strong {
  color: #0f172a;
  font-size: 22px;
  line-height: 1;
}
.manual-simple-entry-summary span {
  margin-top: 4px;
  color: #64748b;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.manual-simple-entry-summary.ok {
  border-color: rgba(34, 197, 94, .25);
  background: #f0fdf4;
}
.manual-simple-entry-summary.warn {
  border-color: rgba(245, 158, 11, .28);
  background: #fffbeb;
}
.manual-simple-value-grid {
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid rgba(203, 213, 225, .9);
  border-radius: 16px;
  background: #fff;
}
.manual-simple-grid-row {
  display: grid;
  gap: 12px;
  align-items: center;
  min-height: 66px;
  padding: 9px 12px;
  border-bottom: 1px solid rgba(226, 232, 240, .9);
}
.manual-simple-grid-row.refs-0 { grid-template-columns: minmax(90px, .7fr) minmax(250px, 2fr) 104px; }
.manual-simple-grid-row.refs-1 { grid-template-columns: minmax(90px, .7fr) minmax(240px, 1.7fr) minmax(118px, .7fr) 104px; }
.manual-simple-grid-row.refs-2 { grid-template-columns: minmax(90px, .7fr) minmax(230px, 1.45fr) repeat(2, minmax(118px, .7fr)) 104px; }
.manual-simple-grid-row.refs-3 { grid-template-columns: minmax(90px, .7fr) minmax(220px, 1.35fr) repeat(3, minmax(108px, .62fr)) 96px; }
.manual-simple-grid-row.multi-input {
  grid-template-columns: minmax(82px, .55fr) repeat(var(--manual-cols, 1), minmax(190px, 1.35fr)) repeat(var(--readonly-cols, 0), minmax(108px, .66fr)) 96px;
  min-width: calc(280px + var(--manual-cols, 1) * 210px + var(--readonly-cols, 0) * 120px);
}
.manual-simple-grid-row:last-child { border-bottom: 0; }
.manual-simple-grid-header {
  min-height: 42px;
  background: #eef5ff;
  color: #475569;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .055em;
  text-transform: uppercase;
}
.manual-simple-grid-row.saved { background: rgba(240, 253, 244, .36); }
.manual-simple-grid-row.inherited { background: rgba(239, 246, 255, .42); }
.manual-simple-grid-row.missing { background: rgba(255, 251, 235, .45); }
.manual-simple-grid-row.edited { background: rgba(240, 253, 244, .62); }
.manual-simple-period {
  color: #0f172a;
  font-family: var(--mono, ui-monospace, monospace);
  font-size: 13px;
  line-height: 1.3;
  letter-spacing: .01em;
}
.manual-data-form.improved .manual-simple-value-cell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}
.manual-data-form.improved .manual-simple-input {
  min-height: 42px;
  padding: 9px 11px;
  border-radius: 11px;
  background: #fff;
  font-family: var(--mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);
  font-size: 13px;
  font-weight: 800;
  text-align: right;
  letter-spacing: .015em;
}
.manual-simple-preview {
  min-width: 84px;
  color: #64748b;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.3;
  text-align: right;
}
.manual-simple-readonly-value {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  color: #64748b;
  font-size: 11px;
}
.manual-simple-readonly-value.reference {
  color: #7c3aed;
}
.manual-simple-readonly-value b {
  color: #0f172a;
  font-size: 13px;
}
.manual-simple-row-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 30px;
  padding: 6px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  white-space: nowrap;
}
.manual-simple-row-status svg { width: 13px; height: 13px; }
.manual-simple-row-status.saved,
.manual-simple-row-status.edited {
  color: #166534;
  background: #dcfce7;
}
.manual-simple-row-status.inherited {
  color: #1d4ed8;
  background: #dbeafe;
}
.manual-simple-row-status.missing {
  color: #92400e;
  background: #fef3c7;
}
.manual-simple-save-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: #fff;
  color: #64748b;
  font-size: 11px;
  line-height: 1.45;
}
.manual-simple-save-note svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  color: #2563eb;
}
.manual-simple-help p + p { margin-top: 10px; }

@media (max-width: 1050px) {
  .manual-simple-grid-row.refs-2,
  .manual-simple-grid-row.refs-3 {
    grid-template-columns: minmax(82px, .65fr) minmax(210px, 1.4fr) repeat(2, minmax(105px, .65fr));
  }
  .manual-simple-grid-row.refs-3 > :nth-last-child(2),
  .manual-simple-grid-row.refs-3.manual-simple-grid-header > :nth-last-child(2) { display: none; }
  .manual-simple-grid-row > :last-child,
  .manual-simple-grid-header > :last-child { display: none; }
}
@media (max-width: 680px) {
  .manual-simple-entry-head {
    align-items: stretch;
    flex-direction: column;
  }
  .manual-simple-entry-summary {
    width: 100%;
    grid-template-columns: auto auto;
    justify-content: center;
    gap: 7px;
  }
  .manual-simple-entry-summary span { margin-top: 0; }
  .manual-simple-grid-header { display: none; }
  .manual-simple-grid-row,
  .manual-simple-grid-row.refs-0,
  .manual-simple-grid-row.refs-1,
  .manual-simple-grid-row.refs-2,
  .manual-simple-grid-row.refs-3 {
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 8px 10px;
    padding: 12px;
  }
  .manual-simple-period {
    grid-row: 1 / -1;
    align-self: start;
    padding-top: 10px;
  }
  .manual-data-form.improved .manual-simple-value-cell {
    grid-column: 2;
    grid-template-columns: 1fr;
    gap: 5px;
  }
  .manual-simple-preview {
    min-width: 0;
    text-align: left;
  }
  .manual-simple-readonly-value {
    grid-column: 2;
    display: inline-flex !important;
    margin-right: 10px;
  }
  .manual-simple-grid-row > :last-child {
    display: inline-flex;
    grid-column: 2;
    justify-self: start;
  }
  .manual-form-section.manual-simple-entry { padding: 12px; }
}

/* Hărțile județene: harta și legenda au spații separate, ca sudul țării să nu fie tăiat. */
.render-map_bar .excel-chart-body {
  padding-bottom: 12px;
}
.render-map_bar .excel-chart-canvas {
  height: 520px;
  min-height: 520px;
  overflow: visible;
}
.county-map-scale {
  display: grid;
  grid-template-columns: auto minmax(120px, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 8px 6px 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1;
}
.county-map-scale i {
  display: block;
  height: 14px;
  border: 1px solid rgba(148, 163, 184, .35);
  border-radius: 999px;
  background: linear-gradient(90deg, #bfdbfe 0%, #9fb6ef 25%, #7f8ed7 50%, #625fc1 75%, #3730a3 100%);
}

@media (max-width: 820px) {
  .render-map_bar .excel-chart-canvas {
    height: 460px;
    min-height: 460px;
  }
}

/* Graficele 8.11.4 + 8.11.5: o singură hartă cu distribuție și evoluție. */
.render-county_employment_combined_map .excel-chart-body {
  position: relative;
  padding-bottom: 12px;
}
.render-county_employment_combined_map .excel-chart-canvas {
  height: 620px;
  min-height: 620px;
  overflow: visible;
}
.county-employment-bands-legend {
  position: absolute;
  z-index: 4;
  top: 18px;
  left: 20px;
  display: grid;
  gap: 5px;
  width: 164px;
  padding: 10px 12px;
  border: 1px solid rgba(148, 163, 184, .28);
  border-radius: 12px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 8px 22px rgba(15, 23, 42, .08);
  backdrop-filter: blur(3px);
  color: var(--ink);
  font-size: 11px;
  line-height: 1.2;
  pointer-events: none;
}
.county-employment-bands-title {
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.county-employment-bands-legend span {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.county-employment-bands-legend span i {
  display: inline-block;
  flex: 0 0 14px;
  width: 14px;
  height: 14px;
  border: 1px solid rgba(15, 23, 42, .08);
}
.county-employment-map-legend {
  display: grid;
  gap: 8px;
  padding: 0 6px 6px;
}
.county-employment-change-legend {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 22px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}
.county-employment-change-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.county-employment-change-legend i {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 1px 5px rgba(15, 23, 42, .2);
}
.county-employment-change-legend i.up { background: #16803a; }
.county-employment-change-legend i.down { background: #ef2f2f; }

@media (max-width: 820px) {
  .render-county_employment_combined_map .excel-chart-canvas {
    height: 520px;
    min-height: 520px;
  }
  .county-employment-bands-legend {
    top: 10px;
    left: 10px;
    width: 145px;
    padding: 8px 9px;
    font-size: 10px;
  }
  .county-employment-bands-legend span i {
    flex-basis: 12px;
    width: 12px;
    height: 12px;
  }
}

/* Chestionare: sugestii editoriale centralizate in pagina de Comunicare */
.comm-suggestions-panel {
  overflow: hidden;
}
.comm-suggestions-total {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  padding: 8px 11px;
  border: 1px solid rgba(124, 58, 237, .18);
  border-radius: 999px;
  background: rgba(245, 243, 255, .82);
  color: #6d28d9;
  font-size: 12px;
  font-weight: 800;
}
.comm-suggestions-total strong { font-size: 15px; }
.comm-suggestions-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.comm-suggestion-group {
  min-width: 0;
  border: 1px solid rgba(226, 232, 240, .95);
  border-radius: 18px;
  background: #f8fafc;
  overflow: hidden;
}
.comm-suggestion-group > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(226, 232, 240, .92);
  background: rgba(255, 255, 255, .9);
}
.comm-suggestion-group > header > div {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}
.comm-suggestion-group h3 {
  margin: 0;
  font-size: 14px;
}
.comm-suggestion-group > header > strong {
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  border-radius: 999px;
  background: #eef2ff;
  color: #4338ca;
  font-size: 12px;
}
.comm-suggestion-top {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 24px;
  padding: 0 7px;
  border-radius: 7px;
  font-family: var(--mono, monospace);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .08em;
}
.comm-suggestion-top.ag { background: #dbeafe; color: #1d4ed8; }
.comm-suggestion-top.p { background: #ede9fe; color: #6d28d9; }
.comm-suggestion-list {
  max-height: 540px;
  overflow: auto;
  padding: 11px;
  display: grid;
  gap: 10px;
}
.comm-suggestion-card {
  padding: 13px 14px;
  border: 1px solid rgba(226, 232, 240, .96);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 5px 16px rgba(15, 23, 42, .035);
}
.comm-suggestion-card-head,
.comm-suggestion-card-foot {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.comm-suggestion-card-head > div {
  min-width: 0;
  display: grid;
  gap: 2px;
}
.comm-suggestion-card-head strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  color: #0f172a;
}
.comm-suggestion-card-head span,
.comm-suggestion-card-foot span {
  color: #64748b;
  font-size: 10px;
}
.comm-suggestion-status {
  flex: 0 0 auto;
  padding: 4px 7px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569 !important;
  font-family: var(--mono, monospace);
  font-size: 9px !important;
  font-weight: 900;
  text-transform: uppercase;
}
.comm-suggestion-status.status-applied { background: #dcfce7; color: #15803d !important; }
.comm-suggestion-status.status-rejected { background: #fee2e2; color: #b91c1c !important; }
.comm-suggestion-status.status-ignored { background: #f1f5f9; color: #64748b !important; }
.comm-suggestion-card p {
  margin: 11px 0 13px;
  color: #334155;
  font-size: 13px;
  line-height: 1.55;
  white-space: normal;
}
.comm-suggestion-card-foot {
  align-items: center;
  padding-top: 9px;
  border-top: 1px solid rgba(241, 245, 249, .96);
}
.comm-suggestion-card-foot a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #2563eb;
  font-size: 11px;
  font-weight: 800;
  text-decoration: none;
}
.comm-suggestion-card-foot a svg { width: 13px; height: 13px; }
.comm-suggestion-empty {
  padding: 28px 16px;
  color: #94a3b8;
  font-size: 12px;
  text-align: center;
}
.comm-empty.compact { padding-block: 24px; }
@media (max-width: 980px) {
  .comm-suggestions-grid { grid-template-columns: 1fr; }
}

/* TOP 100 print: access rapid la formularele operator */
.top100-print-table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(226, 232, 240, .95);
  border-radius: 16px;
}
.top100-print-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 820px;
  background: #fff;
}
.top100-print-table th,
.top100-print-table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(226, 232, 240, .92);
  text-align: left;
  vertical-align: middle;
}
.top100-print-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8fafc;
  color: #475569;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.top100-print-table tbody tr:last-child td { border-bottom: 0; }
.top100-print-table tbody tr:hover { background: #f8fbff; }
.top100-print-table td > strong:not(.top100-print-rank) { display: block; color: #0f172a; }
.top100-print-table td > small { display: block; margin-top: 3px; color: #94a3b8; }
.top100-print-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  min-height: 34px;
  padding: 0 9px;
  border-radius: 11px;
  background: #e8f0ff;
  color: #1d4ed8;
  font-family: var(--mono, monospace);
}
.top100-print-status {
  display: inline-flex;
  align-items: center;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}
.top100-print-status.done { background: #dcfce7; color: #15803d; }
.top100-print-status.open { background: #dbeafe; color: #1d4ed8; }
.top100-print-status.missing { background: #f1f5f9; color: #64748b; }
.top100-print-actions { display: flex; align-items: center; gap: 8px; }

/* editare inline pe pagina publica in modul operator */
.q-inline-project-value {
  cursor: text;
  border-radius: 5px;
  transition: background-color .15s ease, box-shadow .15s ease;
}
.q-inline-project-value:hover {
  background: #fff7cc;
  box-shadow: 0 0 0 3px #fff7cc;
}
.q-inline-project-value.saving { opacity: .55; }
.q-inline-project-value.saved {
  background: #dcfce7;
  box-shadow: 0 0 0 3px #dcfce7;
}
.q-inline-project-input {
  width: min(100%, 720px);
  min-width: 180px;
  padding: 5px 7px;
  border: 1px solid #60a5fa;
  border-radius: 6px;
  background: #fff;
  color: #0f172a;
  font: inherit;
  line-height: inherit;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, .18);
}
.q-inline-project-help {
  display: block;
  margin-top: 5px;
  color: #64748b;
  font-size: 10px;
  font-weight: 600;
}

/* pozele sunt administrate direct sub proiectul TOP 10 */
.top10-inline-project-photos {
  grid-column: 1 / -1;
  margin-top: 4px;
  padding: 14px;
  border: 1px solid #dbe4f0;
  border-radius: 14px;
  background: #f8fafc;
}
.top10-inline-project-photos-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.top10-inline-project-photos-head > div { min-width: 0; margin-right: auto; }
.top10-inline-project-photos-head strong,
.top10-inline-project-photos-head small { display: block; }
.top10-inline-project-photos-head small { margin-top: 2px; color: #64748b; font-size: 10px; }
.top10-inline-upload-btn { position: relative; cursor: pointer; }
.top10-inline-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
}
.top10-inline-photo-card {
  display: grid;
  gap: 9px;
  padding: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
}
.top10-inline-photo-card > img {
  width: 100%;
  height: 150px;
  border-radius: 9px;
  object-fit: cover;
  background: #e2e8f0;
}
.top10-inline-photo-meta { min-width: 0; }
.top10-inline-photo-meta strong,
.top10-inline-photo-meta small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.top10-inline-photo-meta strong { color: #0f172a; font-size: 11px; }
.top10-inline-photo-meta small { margin-top: 2px; color: #64748b; font-size: 9px; }
.top10-inline-photo-card label { display: grid; gap: 4px; }
.top10-inline-photo-card label > span { color: #64748b; font-size: 9px; font-weight: 800; }
.top10-inline-photo-card input {
  width: 100%;
  min-width: 0;
  padding: 8px 9px;
  border: 1px solid #dbe4f0;
  border-radius: 8px;
  background: #fff;
}
.top10-inline-photo-actions {
  display: grid;
  grid-template-columns: minmax(70px, .7fr) auto auto;
  align-items: end;
  gap: 7px;
}
.top10-photo-download {
  width: 100%;
  min-height: 38px;
  justify-content: center;
}
.top10-inline-photo-empty {
  padding: 16px;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  color: #94a3b8;
  text-align: center;
  font-size: 11px;
}
.top10-external-form { display: none; }

/* proiect featured manual in editorul intern TOP 10 */
.top10-new-featured-wrap {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #e2e8f0;
}
.top10-new-featured-list { display: grid; gap: 12px; margin-top: 12px; }
.top10-new-featured-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
  padding: 14px;
  border: 1px solid #dbe4f0;
  border-radius: 14px;
  background: #f8fafc;
}
.top10-new-featured-row.selected {
  border-color: #86efac;
  background: #f0fdf4;
}
.top10-new-featured-row > label:not(.top10-editor-featured-choice),
.top10-new-featured-row > .top10-editor-featured-choice,
.top10-new-featured-row > .top10-new-featured-toolbar { grid-column: 1 / -1; }
.top10-new-featured-row > .top10-featured-location { grid-column: 1 / -1; }
.top10-new-featured-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.top10-new-featured-toolbar strong { color: #0f172a; }

@media (max-width: 760px) {
  .top10-inline-project-photos-head { align-items: stretch; flex-wrap: wrap; }
  .top10-inline-project-photos-head > div { flex-basis: 100%; }
  .top10-inline-photo-actions { grid-template-columns: 1fr 1fr; }
  .top10-inline-photo-actions label { grid-column: 1 / -1; }
  .top10-new-featured-row { grid-template-columns: 1fr; }
}

/* progres export DTP - profile Leadbuilding pregatite in cereri scurte */
.dtp-export-progress {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, .56);
  backdrop-filter: blur(4px);
}
.dtp-export-progress[hidden] { display: none !important; }
.dtp-export-progress__card {
  width: min(620px, 100%);
  padding: 22px;
  border: 1px solid rgba(148, 163, 184, .35);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(15, 23, 42, .28);
}
.dtp-export-progress__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}
.dtp-export-progress__head small {
  display: block;
  margin-bottom: 3px;
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.dtp-export-progress__head h3 {
  margin: 0;
  color: #0f172a;
  font-size: 20px;
}
.dtp-export-progress__head button {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 10px;
  background: #f1f5f9;
  color: #475569;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}
.dtp-export-progress__head button:disabled { opacity: .35; cursor: default; }
.dtp-export-progress__current {
  margin-top: 20px;
  min-height: 22px;
  color: #0f172a;
  font-weight: 800;
}
.dtp-export-progress__bar {
  height: 12px;
  margin-top: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}
.dtp-export-progress__bar span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0ea5e9, #22c55e);
  transition: width .2s ease;
}
.dtp-export-progress__summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 13px;
  color: #475569;
  font-size: 12px;
}
.dtp-export-progress__summary strong { color: #0f172a; }
.dtp-export-progress__summary b { color: #0f172a; }
.dtp-export-progress__errors {
  max-height: 150px;
  margin-top: 14px;
  padding: 11px 12px;
  overflow: auto;
  border: 1px solid #fecaca;
  border-radius: 10px;
  background: #fff7f7;
  color: #991b1b;
  font-size: 11px;
  line-height: 1.55;
  white-space: pre-line;
}
.dtp-export-progress__foot {
  margin-top: 14px;
  color: #64748b;
  font-size: 11px;
}

/* TOP export controls: keep MK, DTP and AWB on the same first row without pushing filters down. */
@media (min-width: 1241px) {
  .topl-filter-form-2rows .topl-filter-row-years {
    grid-template-columns: minmax(520px, 1fr) 40px 40px 40px 88px minmax(145px, 170px) minmax(130px, 155px);
  }
}

@media (min-width: 901px) and (max-width: 1240px) {
  .topl-filter-form-2rows .topl-filter-row-years {
    grid-template-columns: minmax(360px, 1fr) 40px 40px 40px 88px minmax(125px, 1fr) minmax(120px, 1fr);
  }
}

.topl-filter-form-2rows .compact-years {
  gap: 2px;
  padding: 4px 5px;
  overflow: hidden;
}

.topl-filter-form-2rows .compact-years .year-tab {
  min-width: 0;
  padding: 5px 7px;
  font-size: 10.5px;
  line-height: 1.1;
}

.topl-filter-form-2rows .compact-years .year-tab .new {
  margin-left: 3px;
  padding: 1px 3px;
  font-size: 7px;
}

.topl-filter-form-2rows .export-icon-btn {
  width: 40px;
  min-width: 40px;
  height: 40px;
  padding: 0;
  justify-content: center;
}

/* v44.4: selectie geometrica tip spreadsheet in tabelele din drawere */
.chart-table-drawer .excel-copy-table[data-grid-selectable="1"] {
  outline: none;
}
.chart-table-drawer .excel-copy-table[data-grid-selectable="1"] th,
.chart-table-drawer .excel-copy-table[data-grid-selectable="1"] td {
  -webkit-user-select: none;
  user-select: none;
  cursor: cell;
}
.chart-table-drawer .excel-copy-table td.is-grid-selected {
  position: relative;
  background: rgba(14, 165, 233, .18) !important;
  color: #0c4a6e !important;
  box-shadow: inset 0 0 0 1px rgba(2, 132, 199, .42);
}
.chart-table-drawer .excel-copy-table th.is-grid-header-selected {
  background: rgba(2, 132, 199, .18) !important;
  color: #075985 !important;
  box-shadow: inset 0 -2px 0 rgba(2, 132, 199, .72);
}
.chart-table-drawer .excel-copy-table:focus-visible {
  box-shadow: inset 0 0 0 2px rgba(2, 132, 199, .25);
}


/* TOP 100 P questionnaire matrix: four separate doughnuts, as in print. */
.questionnaire-matrix-doughnuts {
  height: auto;
  min-height: 320px;
  padding: 12px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}
.questionnaire-matrix-doughnut {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.questionnaire-matrix-doughnut-title {
  min-height: 40px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  text-align: center;
  font-size: 11px;
  line-height: 1.25;
  font-weight: 650;
  color: var(--ink-2);
}
.questionnaire-matrix-doughnut-chart {
  width: 100%;
  height: 230px;
}
.questionnaire-matrix-legend {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 0 8px 4px;
  color: var(--muted);
  font-size: 10px;
}
.questionnaire-matrix-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.questionnaire-matrix-legend i {
  width: 9px;
  height: 9px;
  border-radius: 2px;
  display: inline-block;
}
@media (max-width: 1050px) {
  .questionnaire-matrix-doughnuts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .questionnaire-matrix-doughnuts { grid-template-columns: 1fr; }
}

/* SiOAR annual bulk import: one paste -> all SiOAR charts, values stored only in DB. */
.sioar-bulk-card{margin:14px 0 20px;padding:16px;border:1px solid rgba(37,99,235,.24);border-radius:18px;background:linear-gradient(145deg,#f8fbff,#fff);box-shadow:0 10px 28px rgba(15,23,42,.045)}
.sioar-bulk-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:14px}
.sioar-bulk-head h3{display:flex;align-items:center;gap:8px;margin:0;color:#0f172a;font-size:15px}.sioar-bulk-head h3 svg{width:18px;height:18px;color:#2563eb}
.sioar-bulk-head p{max-width:900px;margin:5px 0 0;color:#64748b;font-size:12px;line-height:1.5}
.sioar-bulk-badge{flex:0 0 auto;padding:6px 9px;border:1px solid rgba(37,99,235,.18);border-radius:999px;background:#eff6ff;color:#1d4ed8;font:800 11px/1 var(--mono,monospace)}
.sioar-bulk-form{display:grid;gap:12px}
.sioar-bulk-meta{display:grid;grid-template-columns:150px minmax(220px,.7fr) minmax(240px,1fr);gap:10px}
.sioar-bulk-meta label,.sioar-bulk-paste-label,.sioar-bulk-note{display:grid;gap:6px;color:#334155;font-size:11px;font-weight:850}.sioar-bulk-meta label span,.sioar-bulk-note span{color:#94a3b8;font-weight:650}
.sioar-bulk-meta input,.sioar-bulk-paste-label textarea,.sioar-bulk-note textarea{width:100%;box-sizing:border-box;border:1px solid rgba(148,163,184,.34);border-radius:12px;background:#fff;color:#0f172a;font:inherit}
.sioar-bulk-meta input{min-height:40px;padding:0 11px}.sioar-bulk-paste-label textarea{min-height:250px;padding:12px;font-family:var(--mono,monospace);font-size:11px;line-height:1.45;white-space:pre;resize:vertical}.sioar-bulk-note textarea{padding:10px 11px;resize:vertical}
.sioar-bulk-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.sioar-bulk-actions small{color:#64748b;font-size:11px}
.sioar-bulk-template{border:1px dashed rgba(148,163,184,.45);border-radius:12px;background:#fff;overflow:hidden}.sioar-bulk-template summary{display:flex;align-items:center;gap:7px;padding:10px 12px;cursor:pointer;color:#334155;font-size:11px;font-weight:850}.sioar-bulk-template summary svg{width:15px;height:15px;color:#2563eb}.sioar-bulk-template p{margin:0;padding:0 12px 8px;color:#64748b;font-size:11px}.sioar-bulk-template pre{max-height:330px;overflow:auto;margin:0;padding:12px;border-top:1px solid rgba(226,232,240,.9);background:#f8fafc;color:#334155;font:11px/1.45 var(--mono,monospace);white-space:pre}
@media(max-width:900px){.sioar-bulk-meta{grid-template-columns:1fr}.sioar-bulk-head{display:grid}.sioar-bulk-badge{justify-self:start}}

/* TOP 100 P - audit manual pentru profilul companiilor. Candidatele nu modifica datele firmei pana la aprobare. */
.profile-audit-panel{margin:14px 0 20px;padding:16px;border:1px solid rgba(37,99,235,.24);border-radius:18px;background:linear-gradient(145deg,#f8fbff,#fff);box-shadow:0 10px 28px rgba(15,23,42,.045)}
.profile-audit-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px}
.profile-audit-head .eyebrow{display:block;margin-bottom:4px;color:#2563eb;font:800 10px/1.2 var(--mono,monospace);letter-spacing:.08em;text-transform:uppercase}
.profile-audit-head h3{margin:0;color:#0f172a;font-size:16px}
.profile-audit-head p{max-width:850px;margin:6px 0 0;color:#64748b;font-size:12px;line-height:1.5}
.profile-audit-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap;flex:0 0 auto}
.profile-audit-actions form{margin:0}
.profile-audit-error,.profile-audit-empty{display:flex;align-items:center;gap:8px;margin-top:14px;padding:11px 12px;border:1px dashed rgba(148,163,184,.45);border-radius:12px;background:#fff;color:#64748b;font-size:12px}
.profile-audit-error{border-color:rgba(220,38,38,.25);background:#fff7f7;color:#b91c1c}
.profile-audit-error svg,.profile-audit-empty svg{width:16px;height:16px;flex:0 0 auto}
.profile-audit-review{margin-top:14px}
.profile-audit-review-toolbar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:10px 12px;border:1px solid rgba(226,232,240,.95);border-bottom:0;border-radius:12px 12px 0 0;background:#f8fafc;color:#64748b;font-size:11px}
.profile-audit-review-toolbar strong{color:#0f172a}
.profile-audit-review-toolbar .btn:first-of-type{margin-left:auto}
.profile-audit-table-wrap{border:1px solid rgba(226,232,240,.95);border-radius:0 0 12px 12px;background:#fff}
.profile-audit-table{min-width:1040px}
.profile-audit-table th{white-space:nowrap}
.profile-audit-table td{vertical-align:top}
.profile-audit-table td small{display:block;margin-top:3px;color:#94a3b8;font-size:10px}
.profile-audit-table .audit-check{width:42px;text-align:center}
.profile-audit-table .audit-check input{width:16px;height:16px;accent-color:#2563eb;cursor:pointer}
.profile-audit-table .audit-value{max-width:290px;overflow-wrap:anywhere}
.profile-audit-table .audit-value.candidate{background:rgba(37,99,235,.045);color:#0f3d91;font-weight:650}
.profile-audit-table .audit-value a{color:#2563eb;text-decoration:none}
.profile-audit-table .audit-value a:hover{text-decoration:underline}
.profile-audit-status{display:inline-flex;align-items:center;padding:3px 7px;border-radius:999px;background:#eef6ff;color:#1d4ed8;font-size:10px;font-weight:800;white-space:nowrap}
@media(max-width:980px){.profile-audit-head{display:grid}.profile-audit-actions{justify-content:flex-start}.profile-audit-review-toolbar .btn:first-of-type{margin-left:0}}
.profile-audit-health{display:grid;gap:10px;margin-top:14px;padding:12px;border:1px solid rgba(34,197,94,.22);border-radius:14px;background:rgba(240,253,244,.72)}
.profile-audit-health.has-missing{border-color:rgba(245,158,11,.28);background:rgba(255,251,235,.78)}
.profile-audit-health-main{display:flex;align-items:baseline;gap:10px;flex-wrap:wrap;color:#475569;font-size:11px}
.profile-audit-health-number{color:#0f172a;font-size:13px}.profile-audit-health-number strong{font-size:18px}
.profile-audit-health-missing{font-weight:800;color:#b45309}.profile-audit-health.is-complete .profile-audit-health-missing{color:#15803d}
.profile-audit-health-main small{flex-basis:100%;color:#64748b}
.profile-audit-health-families{display:flex;gap:6px;flex-wrap:wrap}
.profile-audit-health-chip{display:inline-flex;align-items:center;gap:4px;padding:5px 8px;border:1px solid rgba(148,163,184,.28);border-radius:999px;background:#fff;color:#475569;font-size:10px;white-space:nowrap}
.profile-audit-health-chip.has-missing{border-color:rgba(245,158,11,.3);color:#92400e;background:#fffbeb}.profile-audit-health-chip.is-ok{color:#166534;background:#f0fdf4}
.profile-audit-health-details{border-top:1px solid rgba(148,163,184,.22);padding-top:8px}.profile-audit-health-details summary{cursor:pointer;color:#2563eb;font-size:11px;font-weight:800}
.profile-audit-health-details .table-wrap{margin-top:8px;max-height:320px;overflow:auto;background:#fff;border:1px solid rgba(226,232,240,.95);border-radius:10px}
.profile-audit-health-table{min-width:780px}.profile-audit-health-table td{vertical-align:top}
