/* ── VABP Paint Formula Dashboard ───────────────────────────────────────────
   Dark theme — charcoal #1a1f2e, teal accent #2dd4bf
   ─────────────────────────────────────────────────────────────────────────── */

/* ── Variables ───────────────────────────────────────────────────────────── */
:root {
  --bg:        #1a1f2e;
  --bg-2:      #1e2435;
  --card:      #242938;
  --card-2:    #2c3145;
  --border:    rgba(255,255,255,0.08);
  --border-hi: rgba(255,255,255,0.14);
  --accent:    #2dd4bf;
  --accent-dk: #0d9488;
  --text:      #f1f5f9;
  --text-2:    #94a3b8;
  --text-3:    #64748b;
  --header-h:  56px;
  --sidebar-w: 256px;
  --r:         8px;
  --r-sm:      5px;
}

/* ── Reset ───────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { height: 100%; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  height: 100%;
  overflow: hidden;
}
button { cursor: pointer; font-family: inherit; }
input, select { font-family: inherit; }

/* ── Header ──────────────────────────────────────────────────────────────── */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 200;
  gap: 12px;
}
.header-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.header-right { display: flex; align-items: center; flex-shrink: 0; }

.sidebar-toggle {
  background: none; border: none; color: var(--text-3);
  padding: 6px; border-radius: var(--r-sm);
  display: none; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.sidebar-toggle:hover { color: var(--text); background: var(--card); }

.logo { display: flex; align-items: center; gap: 10px; min-width: 0; }
.logo-mark {
  width: 32px; height: 32px; flex-shrink: 0;
  background: var(--accent);
  border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 15px; color: #0f172a;
}
.logo-text { display: flex; flex-direction: column; min-width: 0; }
.logo-name { font-size: 14px; font-weight: 600; color: var(--text); line-height: 1.2; white-space: nowrap; }
.logo-sub  { font-size: 11px; color: var(--text-3); white-space: nowrap; }

/* ── Health bar ───────────────────────────────────────────────────────────── */
.health-bar { display: flex; align-items: center; gap: 14px; }
.health-dot { display: flex; align-items: center; gap: 5px; }
.dot {
  width: 7px; height: 7px;
  border-radius: 50%; flex-shrink: 0;
  transition: opacity 0.3s;
}
.dot-label { font-size: 11px; color: var(--text-3); white-space: nowrap; }
.health-loading { font-size: 12px; color: var(--text-3); }
.health-ok  { font-size: 12px; color: var(--accent); }
.health-err { font-size: 12px; color: #f87171; }

/* ── Sidebar overlay ─────────────────────────────────────────────────────── */
.sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 150;
}
.sidebar-overlay.overlay--visible { display: block; }

/* ── App shell ───────────────────────────────────────────────────────────── */
.app-shell {
  display: flex;
  height: 100vh;
  padding-top: var(--header-h);
}

/* ── Sidebar ─────────────────────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--bg-2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
}

.mode-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.mode-tab {
  flex: 1;
  background: none; border: none;
  color: var(--text-3);
  font-size: 12px; font-weight: 500;
  padding: 10px 6px;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.15s, border-color 0.15s;
}
.mode-tab:hover { color: var(--text-2); }
.mode-tab--active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }

.search-form { padding: 14px 14px 10px; display: flex; flex-direction: column; }
.field-group { margin-bottom: 11px; }
.field-label {
  display: block;
  font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--text-3);
  margin-bottom: 5px;
}
.optional { font-weight: 400; text-transform: none; opacity: 0.7; letter-spacing: 0; }

.field-input, .field-select {
  width: 100%;
  background: var(--card);
  border: 1px solid var(--border-hi);
  border-radius: var(--r-sm);
  color: var(--text);
  padding: 8px 10px;
  font-size: 13px;
  outline: none;
  transition: border-color 0.15s;
}
.field-select {
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
  padding-right: 28px;
}
.field-input::placeholder { color: var(--text-3); }
.field-input:focus, .field-select:focus { border-color: var(--accent); }

.search-btn {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  width: 100%;
  background: var(--accent); color: #0f172a;
  border: none; border-radius: var(--r-sm);
  padding: 10px 14px;
  font-size: 13px; font-weight: 700;
  transition: background 0.15s, transform 0.1s;
  margin-top: 4px;
}
.search-btn:hover { background: #5eead4; }
.search-btn:active { transform: scale(0.98); }

.recent-section {
  padding: 12px 14px;
  border-top: 1px solid var(--border);
  flex: 1;
}
.recent-title {
  font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--text-3); margin-bottom: 8px;
}
.recent-empty { font-size: 12px; color: var(--text-3); }
.recent-item {
  display: block; width: 100%;
  background: none; border: none;
  color: var(--text-2); font-size: 12px;
  text-align: left; padding: 5px 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: color 0.15s;
}
.recent-item:hover { color: var(--accent); }

/* ── Main content ────────────────────────────────────────────────────────── */
.main-content {
  flex: 1; min-width: 0;
  overflow-y: auto;
  overflow-x: hidden;
}

/* ── Splash ──────────────────────────────────────────────────────────────── */
.splash {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  min-height: calc(100vh - var(--header-h));
  padding: 40px 24px; text-align: center;
}
.splash-icon  { font-size: 52px; margin-bottom: 18px; }
.splash-title { font-size: 24px; font-weight: 700; color: var(--text); margin-bottom: 10px; }
.splash-desc  { font-size: 15px; color: var(--text-2); max-width: 440px; margin-bottom: 28px; line-height: 1.65; }
.splash-sources { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.source-chip {
  font-size: 11px; font-weight: 700; letter-spacing: 0.07em;
  padding: 5px 14px;
  background: var(--card); border-radius: 99px; border: 1px solid;
}

/* ── Paint line tabs ─────────────────────────────────────────────────────── */
.paint-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  background: var(--bg-2);
  padding: 0 12px; gap: 0;
  flex-shrink: 0;
  overflow-x: auto; scrollbar-width: none;
  position: sticky; top: 0; z-index: 10;
}
.paint-tabs::-webkit-scrollbar { display: none; }

.paint-tab {
  padding: 12px 18px;
  background: none; border: none;
  color: var(--text-3);
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
  display: flex; align-items: center; gap: 7px;
  transition: color 0.15s, border-color 0.15s;
}
.paint-tab:hover { color: var(--text-2); }
.paint-tab--active {
  color: var(--tc, var(--accent));
  border-bottom-color: var(--tc, var(--accent));
}

.tab-count {
  font-size: 10px; font-weight: 700;
  background: var(--card); color: var(--text-3);
  border-radius: 99px; padding: 1px 7px; min-width: 20px; text-align: center;
  transition: background 0.15s, color 0.15s;
}

/* ── Color grid ──────────────────────────────────────────────────────────── */
.color-grid { padding: 14px; }

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.tab-empty {
  padding: 48px 24px; text-align: center;
  color: var(--text-3); font-size: 13px;
}

/* ── Color card — hero chip layout ──────────────────────────────────────── */
.color-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  display: flex; flex-direction: column;
  cursor: pointer; overflow: hidden;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.12s;
}
.color-card:hover {
  border-color: var(--border-hi);
  box-shadow: 0 4px 16px rgba(0,0,0,0.35);
  transform: translateY(-1px);
}
.color-card--selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(45,212,191,0.25);
}
.color-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Hero chip area — full width, fixed height */
.card-chip-hero {
  width: 100%; height: 140px;
  flex-shrink: 0;
  background: var(--card-2);
  overflow: hidden; position: relative;
}
/* Chip skeleton — shown while image loads */
@keyframes chip-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.chip-skeleton {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, #262b3a 25%, #313749 50%, #262b3a 75%);
  background-size: 200% 100%;
  animation: chip-shimmer 1.4s ease-in-out infinite;
  z-index: 1;
}

.chip-hero-img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  opacity: 0;
  transition: opacity 0.3s ease;
  position: relative; z-index: 2;
}
.chip-hero-img.loaded { opacity: 1; }

.chip-hero-fallback { width: 100%; height: 100%; display: block; }
.chip-hero-swatch   { width: 100%; height: 100%; }
.chip-hero-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-3); font-size: 11px; letter-spacing: 0.04em;
}

/* Card info body */
.card-body {
  padding: 10px 12px 12px;
  flex: 1;
}
.card-name {
  font-size: 13px; font-weight: 700; color: var(--text);
  margin-bottom: 8px; line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-meta-rows { display: flex; flex-direction: column; gap: 2px; margin-bottom: 8px; }
.card-row {
  display: flex; gap: 6px; align-items: baseline;
  font-size: 11px; line-height: 1.5;
}
.card-lbl {
  color: var(--text-3); font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.05em;
  font-size: 10px; flex-shrink: 0; width: 38px;
}
.card-val { color: var(--text-2); }
.card-code-val {
  color: var(--accent);
  font-family: 'Courier New', monospace;
  font-weight: 600; font-size: 11px;
}
.card-models-val {
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.card-badges { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }

.effect-badge {
  display: inline-block;
  font-size: 10px; font-weight: 600;
  padding: 2px 8px; border-radius: 99px; letter-spacing: 0.03em;
}
.badge-metallic { background: rgba(6,182,212,0.12);  color: #06b6d4; }
.badge-pearl    { background: rgba(192,132,252,0.12); color: #c084fc; }
.badge-tricoat  { background: rgba(251,191,36,0.12);  color: #fbbf24; }
.badge-solid    { background: rgba(74,222,128,0.12);  color: #4ade80; }
.badge-other    { background: rgba(255,255,255,0.06); color: var(--text-2); }

/* ── Skeleton ────────────────────────────────────────────────────────────── */
@keyframes shimmer {
  0%,100% { opacity: 0.35; }
  50%      { opacity: 0.6;  }
}
.skeleton-card  { animation: shimmer 1.6s ease-in-out infinite; pointer-events: none; }
.skeleton-block { background: var(--card-2); }
.skeleton-card .card-chip-hero { background: var(--card-2); }

.skel-line { height: 11px; background: var(--card-2); border-radius: 4px; }
.mb2 { margin-bottom: 8px; }
.w30 { width: 30%; }
.w40 { width: 40%; }
.w50 { width: 50%; }
.w60 { width: 60%; }
.w70 { width: 70%; }
.w80 { width: 80%; }

/* ── Empty / Error states ────────────────────────────────────────────────── */
.empty-state {
  padding: 56px 24px; text-align: center; color: var(--text-3);
}
.empty-icon { font-size: 36px; margin-bottom: 12px; display: block; }
.error-state {
  padding: 16px;
  color: #f87171;
  background: rgba(239,68,68,0.08);
  border: 1px solid rgba(239,68,68,0.2);
  border-radius: var(--r);
  margin: 16px;
}

/* ── Formula detail ──────────────────────────────────────────────────────── */
.formula-detail { padding: 16px; max-width: 860px; }

.back-btn {
  background: none; border: none;
  color: var(--accent); font-size: 13px;
  padding: 4px 0; margin-bottom: 18px;
  display: inline-flex; align-items: center; gap: 5px;
  opacity: 0.85; transition: opacity 0.15s;
}
.back-btn:hover { opacity: 1; }

.detail-header {
  display: flex; gap: 16px; align-items: flex-start;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 16px; margin-bottom: 20px;
}
.detail-chip {
  width: 72px; height: 72px; flex-shrink: 0;
  border-radius: 9px; overflow: hidden;
  background: var(--card-2); position: relative;
}
.detail-chip-img     { width: 100%; height: 100%; object-fit: cover; display: block; }
.detail-chip-fallback,
.detail-chip-swatch  { width: 100%; height: 100%; }
.detail-chip-placeholder { width: 100%; height: 100%; background: var(--card-2); }

.detail-info { flex: 1; min-width: 0; }
.detail-code {
  font-size: 22px; font-weight: 700;
  font-family: 'Courier New', monospace;
  color: var(--accent); margin-bottom: 4px; line-height: 1.1;
}
.detail-name { font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 5px; }
.detail-meta { font-size: 13px; color: var(--text-2); }

.formula-sections { display: flex; flex-direction: column; gap: 14px; }

.formula-section {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
}

.formula-section-hdr {
  padding: 11px 16px;
  background: rgba(255,255,255,0.025);
  border-bottom: 1px solid var(--border);
  border-left: 4px solid transparent;
  display: flex; align-items: center; gap: 10px;
}
.fsec-title { font-size: 12px; font-weight: 800; letter-spacing: 0.08em; }
.fsec-count { font-size: 11px; color: var(--text-3); margin-left: auto; }

.formula-variant { padding: 14px 16px; }
.formula-variant--sep { border-top: 1px solid var(--border); }

.variant-label {
  font-size: 12px; font-weight: 600;
  color: var(--text-2); font-family: 'Courier New', monospace;
  margin-bottom: 10px;
}
.variant-code { color: var(--text-3); font-weight: 400; }

.stage-label {
  font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--text-3); margin-bottom: 8px;
}

.formula-stage { margin-bottom: 16px; }
.formula-stage:last-child { margin-bottom: 0; }

.toner-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.toner-table th {
  text-align: left; color: var(--text-3);
  font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em;
  padding: 5px 8px 7px;
  border-bottom: 1px solid var(--border);
}
.toner-table td {
  padding: 7px 8px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  vertical-align: middle;
}
.toner-table tr:last-child td { border-bottom: none; }

.t-code {
  font-family: 'Courier New', monospace;
  font-size: 12px; color: var(--accent);
  white-space: nowrap; width: 1%;
}
.t-name  { color: var(--text); min-width: 130px; }
.num-col {
  text-align: right; white-space: nowrap; width: 1%;
  font-family: 'Courier New', monospace; font-size: 12px;
  padding-left: 16px;
}
.t-pct { color: var(--text-2); }
.bar-col { width: 110px; padding-left: 12px; }

.toner-bar { height: 6px; background: var(--card-2); border-radius: 3px; overflow: hidden; }
.toner-bar-fill {
  height: 100%; background: var(--accent);
  border-radius: 3px; transition: width 0.35s ease;
}

.toner-total {
  text-align: right;
  font-size: 12px; font-weight: 600; color: var(--text-2);
  font-family: 'Courier New', monospace;
  padding: 10px 8px 2px;
  border-top: 1px solid var(--border); margin-top: 4px;
}

.no-toners   { font-size: 12px; color: var(--text-3); padding: 10px 0; }
.no-formulas { padding: 32px 24px; text-align: center; color: var(--text-3); font-size: 13px; }

/* ── Responsive ──────────────────────────────────────────────────────────── */

/* Desktop large (1400px+): 5 columns */
@media (min-width: 1400px) {
  .cards-grid { grid-template-columns: repeat(5, 1fr); }
}

/* Desktop (1100-1399px): 4 columns */
@media (min-width: 1100px) and (max-width: 1399px) {
  .cards-grid { grid-template-columns: repeat(4, 1fr); }
}

/* Laptop (900-1099px): 3 columns */
@media (min-width: 900px) and (max-width: 1099px) {
  .cards-grid { grid-template-columns: repeat(3, 1fr); }
}

/* Tablet landscape (769-899px): 3 columns */
@media (min-width: 769px) and (max-width: 899px) {
  .cards-grid { grid-template-columns: repeat(3, 1fr); }
  .sidebar { width: 220px; }
}

@media (min-width: 769px) {
  .sidebar-overlay { display: none !important; }
}

/* Mobile (≤768px) */
@media (max-width: 768px) {
  .sidebar-toggle { display: flex; }

  .sidebar {
    position: fixed;
    top: var(--header-h); left: 0; bottom: 0;
    z-index: 160;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
  }
  .sidebar--open {
    transform: translateX(0);
    box-shadow: 4px 0 24px rgba(0,0,0,0.5);
  }

  /* 2 columns on mobile */
  .cards-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .card-chip-hero { height: 110px; }

  .bar-col { display: none; }
  .toner-table th:last-child,
  .toner-table td:last-child { display: none; }

  .detail-chip { width: 56px; height: 56px; }
  .detail-code { font-size: 17px; }
  .detail-name { font-size: 14px; }
  .logo-sub  { display: none; }
  .dot-label { display: none; }
  .health-bar { gap: 8px; }
}

/* Very small phones: 1 column */
@media (max-width: 380px) {
  .cards-grid { grid-template-columns: 1fr; }
}

/* ── Palette header (Phase 1 results) ───────────────────────────────────────── */
.palette-header {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px 4px;
}
.palette-label {
  font-size: 14px; font-weight: 600; color: var(--text);
  font-family: 'Courier New', monospace;
}
.palette-count {
  font-size: 12px; color: var(--text-3);
  background: var(--card); border-radius: 99px;
  padding: 2px 10px;
}

/* ── Detail view wrapper (Phase 2) ──────────────────────────────────────────── */
.detail-view { padding: 16px; max-width: 860px; }

/* ── Detail paint-line tabs ──────────────────────────────────────────────────── */
.detail-tabs {
  display: flex; gap: 0;
  border-bottom: 1px solid var(--border);
  background: var(--bg-2);
  padding: 0 4px;
  overflow-x: auto; scrollbar-width: none;
  position: sticky; top: 0; z-index: 10;
  margin: 0 -16px 20px;
  padding: 0 16px;
}
.detail-tabs::-webkit-scrollbar { display: none; }

.detail-tab {
  padding: 11px 16px;
  background: none; border: none;
  color: var(--text-3);
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
  display: flex; align-items: center; gap: 6px;
  transition: color 0.15s, border-color 0.15s;
}
.detail-tab:hover { color: var(--text-2); }
.detail-tab--active {
  color: var(--tc, var(--accent));
  border-bottom-color: var(--tc, var(--accent));
}
.detail-tab--empty { opacity: 0.45; }

.tab-count {
  font-size: 10px; font-weight: 700;
  background: var(--card); color: var(--text-3);
  border-radius: 99px; padding: 1px 7px; min-width: 20px; text-align: center;
  transition: background 0.15s, color 0.15s;
}
.tab-count--zero { opacity: 0.5; }

/* ── Formula card (one variant per card) ─────────────────────────────────────── */
.formula-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
  margin-bottom: 12px;
}
.formula-card:last-child { margin-bottom: 0; }

.fcard-header {
  padding: 10px 14px;
  background: rgba(255,255,255,0.025);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px;
  flex-wrap: wrap;
}
.fcard-paint-line {
  font-size: 11px; font-weight: 800; letter-spacing: 0.09em;
  color: var(--accent); text-transform: uppercase;
}
.fcard-variant {
  font-size: 12px; color: var(--text-2);
  font-family: 'Courier New', monospace;
}
.fcard-meta { margin-left: auto; display: flex; gap: 5px; flex-wrap: wrap; }
.fcard-meta-pill {
  font-size: 10px; font-weight: 600;
  background: var(--card-2); color: var(--text-3);
  border-radius: 99px; padding: 2px 8px;
  letter-spacing: 0.04em;
}

.formula-stage { padding: 14px; }
.formula-stage + .formula-stage { border-top: 1px solid var(--border); }

/* ── "Metadata Only" card (MixElite / no formula) ──────────────────────────── */
.tab-meta-only {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 24px 20px;
  text-align: center;
}
.meta-icon  { font-size: 28px; margin-bottom: 10px; }
.meta-title { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.meta-desc  { font-size: 13px; color: var(--text-2); margin-bottom: 14px; line-height: 1.55; }
.meta-item  {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--text-2);
  background: var(--card-2); border-radius: var(--r-sm);
  padding: 5px 12px; margin: 4px;
}
.meta-swatch {
  display: inline-block; width: 14px; height: 14px;
  border-radius: 3px; flex-shrink: 0;
  border: 1px solid rgba(255,255,255,0.12);
}

/* ── "No data" for a tab ─────────────────────────────────────────────────────── */
.tab-no-data {
  padding: 40px 24px; text-align: center;
  color: var(--text-3); font-size: 13px;
}

/* ── Skeleton adjustments for detail view ──────────────────────────────────── */
.detail-view .formula-card.skeleton-card { pointer-events: none; }
.detail-view .formula-card.skeleton-card .fcard-header { background: var(--card-2); }

/* ── Responsive adjustments for Phase 2 ─────────────────────────────────────── */
@media (max-width: 768px) {
  .detail-view { padding: 12px; }
  .detail-tabs { margin: 0 -12px 16px; padding: 0 12px; }
  .detail-tab  { padding: 10px 12px; font-size: 10px; }
  .formula-stage { padding: 10px; }
}

/* ── Blocked source tab panel ─────────────────────────────────────────────────── */
.tab-blocked {
  padding: 40px 24px;
  text-align: center;
}
.tab-blocked-icon {
  font-size: 28px;
  margin-bottom: 10px;
  opacity: 0.6;
}
.tab-blocked-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 8px;
}
.tab-blocked-desc {
  font-size: 12px;
  color: var(--text-3);
  max-width: 340px;
  margin: 0 auto;
  line-height: 1.6;
}
