/* ─── BARITU VERTICALES — Components ────────────────────────────────────── */

/* ══ TOPBAR ═══════════════════════════════════════════════════════════════ */
.topbar-logo {
  display: flex; align-items: center; gap: 9px;
  text-decoration: none; margin-right: 20px;
}
.topbar-logo-mark { width: 20px; height: 20px; flex-shrink: 0; }
.topbar-logo-name { font-size: 14px; font-weight: 600; color: var(--text-primary); letter-spacing: -0.02em; }
.topbar-logo-badge {
  font-family: var(--mono); font-size: 8px; letter-spacing: .12em;
  padding: 2px 7px; border-radius: 3px;
  background: var(--eco-dim); border: 1px solid var(--eco-border);
  color: var(--eco-text); text-transform: uppercase;
}
.topbar-spacer { flex: 1; }
.topbar-ops { display: flex; align-items: center; gap: 6px; }

.rt-pill {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .05em;
  padding: 3px 9px; border-radius: 20px;
  background: var(--bg-surface); border: 1px solid var(--border);
  color: var(--text-muted); white-space: nowrap;
  transition: all var(--dur);
}
.rt-pill.runtime  { background: var(--rt-active);   border-color: var(--rt-border);   color: var(--rt-text); }
.rt-pill.orch     { background: var(--orch-active);  border-color: var(--orch-border);  color: var(--orch-text); }
.rt-pill.degraded { background: var(--warn-soft);   border-color: rgba(192,128,64,.2); color: var(--warn); }

/* Heartbeat dot */
.rt-dot {
  width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; display: inline-block;
}
.rt-dot.active { background: var(--rt-pulse); animation: pulse-ring var(--dur-pulse) ease-out infinite; }
.rt-dot.idle   { background: var(--text-ghost); }
.rt-dot.warn   { background: var(--warn); animation: breath var(--dur-breath) ease-in-out infinite; }
@keyframes pulse-ring {
  0%  { box-shadow: 0 0 0 0 rgba(74,158,110,.3); }
  70% { box-shadow: 0 0 0 5px rgba(74,158,110,0); }
  100%{ box-shadow: 0 0 0 0 rgba(74,158,110,0); }
}
@keyframes breath {
  0%,100%{ opacity:.6; } 50%{ opacity:1; }
}

/* ══ CARDS ════════════════════════════════════════════════════════════════ */
.card {
  background: var(--bg-elevated); border: 1px solid var(--border-warm);
  border-radius: var(--radius-lg); padding: 18px 20px;
  position: relative; overflow: hidden;
}
.card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--cream-soft), transparent);
  pointer-events: none;
}
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.card-title  { font-family: var(--mono); font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted); }

/* ══ STAT CARDS ═══════════════════════════════════════════════════════════ */
.stat-card {
  background: var(--bg-elevated); border: 1px solid var(--border-warm);
  border-radius: var(--radius-lg); padding: 15px 17px;
  display: flex; flex-direction: column; gap: 5px;
}
.stat-label { font-family: var(--mono); font-size: 9px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted); }
.stat-value { font-size: 26px; font-weight: 600; color: var(--text-primary); letter-spacing: -0.04em; line-height: 1.1; }
.stat-value.ok { color: var(--ok-bright); }
.stat-value.p  { color: var(--p-text); }
.stat-sub { font-size: 11px; color: var(--text-ghost); font-family: var(--mono); }

/* ══ VERTICAL SELECTOR GRID — domain operational systems ═════════════════ */
.vertical-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px;
}
.vertical-card {
  background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 15px;
  cursor: pointer; transition: all var(--dur-md) var(--ease-soft);
  display: flex; flex-direction: column; gap: 7px;
  position: relative; overflow: hidden;
}
.vertical-card::after {
  content: ''; position: absolute;
  bottom: 0; left: 0; right: 0; height: 1px;
  background: transparent;
  transition: background var(--dur-md);
}
.vertical-card:hover {
  border-color: var(--p-border); background: rgba(0,173,80,.04);
  transform: translateY(-1px);
}
.vertical-card:hover::after { background: var(--p-border); }
.vertical-card.selected {
  border-color: var(--eco-border); background: var(--eco-dim);
}
.vertical-card.selected::after { background: var(--eco-border); }

.vc-top { display: flex; align-items: center; justify-content: space-between; }
.vc-name { font-size: 13px; font-weight: 500; color: var(--text-primary); letter-spacing: -0.015em; }
.vc-outcome {
  font-size: 10.5px; color: var(--text-muted); line-height: 1.55;
  font-family: var(--mono); letter-spacing: .01em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.vc-traits { display: flex; gap: 4px; flex-wrap: wrap; }
.vc-trait {
  font-family: var(--mono); font-size: 8px; letter-spacing: .06em;
  padding: 1px 6px; border-radius: 3px;
  background: var(--bg-elevated); border: 1px solid var(--border);
  color: var(--text-ghost); text-transform: lowercase;
}
.vertical-card.selected .vc-trait {
  background: var(--eco-dim); border-color: var(--eco-border); color: var(--eco-text);
}
.vc-svc-count {
  font-family: var(--mono); font-size: 9px; color: var(--text-ghost);
  letter-spacing: .04em; margin-top: 2px;
}
/* Ready indicator — shown when selected */
.vc-ready-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--eco-text);
  animation: pulse-ring var(--dur-pulse) ease-out infinite;
  flex-shrink: 0;
}
@keyframes pulse-ring {
  0%  { box-shadow: 0 0 0 0 rgba(74,158,110,.3); }
  70% { box-shadow: 0 0 0 5px rgba(74,158,110,0); }
  100%{ box-shadow: 0 0 0 0 rgba(74,158,110,0); }
}

/* Vertical tag pills */
.vt { font-family: var(--mono); font-size: 8.5px; letter-spacing: .08em; padding: 2px 7px; border-radius: 3px; text-transform: uppercase; border: 1px solid; display: inline-block; }
.vt-fintech    { background: rgba(0,173,80,.10);   color: #3ce58f; border-color: rgba(0,173,80,.20); }
.vt-healthcare { background: rgba(74,158,110,.08);  color: #4fab7a; border-color: rgba(74,158,110,.18); }
.vt-commerce   { background: rgba(192,128,64,.08);  color: #c08040; border-color: rgba(192,128,64,.18); }
.vt-hr         { background: rgba(80,140,180,.08);  color: #5a90b8; border-color: rgba(80,140,180,.18); }
.vt-logistics  { background: rgba(170,80,80,.08);   color: #aa5050; border-color: rgba(170,80,80,.18); }
.vt-lms        { background: rgba(180,140,80,.08);  color: #b49050; border-color: rgba(180,140,80,.18); }
.vt-saas       { background: rgba(140,80,180,.08);  color: #8c50b4; border-color: rgba(140,80,180,.18); }
.vt-ai_ops     { background: rgba(80,180,180,.08);  color: #50b4b4; border-color: rgba(80,180,180,.18); }

/* ══ GENERATE PANEL ═══════════════════════════════════════════════════════ */
.form-label { font-family: var(--mono); font-size: 9.5px; letter-spacing: .09em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 6px; display: block; }
.input {
  background: var(--bg-surface); border: 1px solid var(--border);
  color: var(--text-primary); font-family: var(--font); font-size: 13px;
  padding: 8px 12px; border-radius: var(--radius-sm);
  outline: none; transition: border-color var(--dur); width: 100%;
}
.input::placeholder { color: var(--text-ghost); }
.input:focus { border-color: var(--border-focus); }
textarea.input { resize: vertical; min-height: 90px; line-height: 1.65; }
select.input { cursor: pointer; }

/* Generate button */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 16px; border-radius: var(--radius-sm);
  font-family: var(--font); font-size: 12.5px; font-weight: 500;
  cursor: pointer; border: 1px solid transparent;
  transition: all var(--dur) var(--ease); white-space: nowrap;
}
.btn:hover { opacity: .85; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--p); color: #fff; border-color: rgba(0,173,80,.35); }
.btn-eco     { background: var(--eco); color: #fff; border-color: rgba(42,128,85,.35); }
.btn-ghost   { background: var(--bg-surface); color: var(--text-secondary); border-color: var(--border); }
.btn-ghost:hover { color: var(--text-primary); border-color: var(--p-border); }
.btn-sm { padding: 4px 10px; font-size: 11px; }
.btn svg { width: 13px; height: 13px; }

/* ══ PIPELINE PROGRESS ════════════════════════════════════════════════════ */
.pipeline-track {
  display: flex; flex-direction: column; gap: 5px;
  padding: 14px; background: var(--bg-surface);
  border: 1px solid var(--border); border-radius: var(--radius);
  max-height: 260px; overflow-y: auto;
}
.pipeline-step {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 10px; border-radius: var(--radius-sm);
  font-size: 12px; color: var(--text-muted);
  border: 1px solid transparent;
  transition: all var(--dur-md) var(--ease-soft);
}
.pipeline-step.active { background: var(--orch-active); border-color: var(--orch-border); color: var(--orch-text); }
.pipeline-step.done   { background: var(--rt-active);   border-color: var(--rt-border);   color: var(--rt-text); }
.pipeline-step.failed { background: var(--err-soft);    border-color: rgba(184,80,80,.18); color: var(--err-bright); }
.step-pct { margin-left: auto; font-family: var(--mono); font-size: 10px; color: var(--text-ghost); }
.step-icon { width: 14px; height: 14px; flex-shrink: 0; opacity: .7; }

/* Progress bar */
.progress-bar { height: 2px; background: var(--bg-surface); border-radius: 1px; overflow: hidden; margin: 8px 0; }
.progress-fill { height: 100%; background: var(--p); border-radius: 1px; transition: width .4s var(--ease-soft); }
@keyframes progress-flow { 0%{background-position:0 0} 100%{background-position:32px 0} }
.progress-fill.running {
  background: repeating-linear-gradient(90deg,var(--p) 0,var(--p) 8px,rgba(0,173,80,.35) 8px,rgba(0,173,80,.35) 16px);
  background-size: 32px 100%;
  animation: progress-flow 1.2s linear infinite;
}

/* ══ RESULT CARD ══════════════════════════════════════════════════════════ */
.result-card {
  background: var(--bg-surface); border: 1px solid var(--rt-border);
  border-radius: var(--radius); padding: 16px;
  animation: view-enter var(--dur-md) var(--ease-soft);
}
.result-card-header { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.result-score-row { display: flex; gap: 10px; margin-top: 14px; }
.result-score {
  flex: 1; background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 10px 12px; text-align: center;
}
.result-score-num { font-size: 22px; font-weight: 600; letter-spacing: -0.035em; color: var(--text-primary); }
.result-score-label { font-family: var(--mono); font-size: 9px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); margin-top: 2px; }

/* ══ SERVICE GRID ═════════════════════════════════════════════════════════ */
.service-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin-top: 12px; }
.service-item {
  display: flex; align-items: center; gap: 7px;
  padding: 8px 10px; background: var(--bg-elevated);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 11.5px; color: var(--text-secondary);
  font-family: var(--mono); letter-spacing: .02em;
}
.service-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--eco-text); flex-shrink: 0; }

/* ══ ZIP LIST ═════════════════════════════════════════════════════════════ */
.zip-list { display: flex; flex-direction: column; gap: 6px; }
.zip-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; background: var(--bg-surface);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 12.5px; transition: border-color var(--dur);
}
.zip-item:hover { border-color: var(--eco-border); }
.zip-id   { font-family: var(--mono); font-size: 11px; color: var(--text-secondary); flex: 1; }
.zip-vert { flex-shrink: 0; }
.zip-meta { font-family: var(--mono); font-size: 10px; color: var(--text-ghost); flex-shrink: 0; }

/* ══ OBSERVER — operational intelligence ════════════════════════════════ */
.obs-timeline { display: flex; flex-direction: column; gap: 0; position: relative; }
.obs-timeline::before {
  content: ''; position: absolute;
  left: 7px; top: 12px; bottom: 12px; width: 1px;
  background: var(--border-soft);
}
.obs-event { display: flex; align-items: flex-start; gap: 14px; padding: 8px 0; }
.obs-event-dot {
  width: 15px; height: 15px; border-radius: 50%;
  border: 1px solid; flex-shrink: 0; margin-top: 2px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-elevated); z-index: 1;
}
.obs-event-inner { width: 5px; height: 5px; border-radius: 50%; }
.obs-event-dot.ok   { border-color: var(--rt-border); }
.obs-event-dot.ok   .obs-event-inner { background: var(--ok-bright); animation: breath var(--dur-breath) ease-in-out infinite; }
.obs-event-dot.warn { border-color: rgba(192,128,64,.3); }
.obs-event-dot.warn .obs-event-inner { background: var(--warn); }
.obs-event-dot.err  { border-color: rgba(184,80,80,.3); }
.obs-event-dot.err  .obs-event-inner { background: var(--err-bright); }
.obs-event-body  { flex: 1; }
.obs-event-title { font-size: 12px; font-weight: 500; color: var(--text-secondary); line-height: 1.4; }
.obs-event-meta  { font-family: var(--mono); font-size: 10px; color: var(--text-ghost); margin-top: 2px; }

/* ══ CONFIDENCE PILL ══════════════════════════════════════════════════════ */
.conf-pill {
  display: inline-flex; align-items: center; gap: 4px;
  font-family: var(--mono); font-size: 8.5px; letter-spacing: .07em;
  text-transform: uppercase; padding: 2px 7px; border-radius: 3px;
}
.conf-pill.high   { background: rgba(74,158,110,.1); color: var(--conf-high);   border: 1px solid rgba(74,158,110,.18); }
.conf-pill.medium { background: rgba(192,128,64,.1); color: var(--conf-medium); border: 1px solid rgba(192,128,64,.18); }
.conf-pill.low    { background: rgba(184,80,80,.1);  color: var(--conf-low);    border: 1px solid rgba(184,80,80,.18); }

/* ══ BADGES ═══════════════════════════════════════════════════════════════ */
.badge {
  font-family: var(--mono); font-size: 8.5px; font-weight: 500;
  letter-spacing: .07em; text-transform: uppercase;
  padding: 2px 7px; border-radius: 3px;
  display: inline-flex; align-items: center; gap: 4px;
  flex-shrink: 0; white-space: nowrap;
}
.badge-ok      { background: var(--ok-soft);  color: var(--ok-bright); border: 1px solid rgba(74,158,110,.18); }
.badge-warn    { background: var(--warn-soft); color: var(--warn);      border: 1px solid rgba(192,128,64,.18); }
.badge-err     { background: var(--err-soft);  color: var(--err-bright);border: 1px solid rgba(184,80,80,.18); }
.badge-p       { background: var(--p-soft);    color: var(--p-text);    border: 1px solid var(--p-border); }
.badge-eco     { background: var(--eco-soft);  color: var(--eco-text);  border: 1px solid var(--eco-border); }
.badge-neutral { background: var(--bg-surface);color: var(--text-muted);border: 1px solid var(--border); }

/* ══ MODAL ════════════════════════════════════════════════════════════════ */
.modal-backdrop {
  display: none; position: fixed; inset: 0; z-index: 400;
  background: rgba(8,9,10,.88); backdrop-filter: blur(10px);
  align-items: center; justify-content: center;
}
.modal-backdrop.open { display: flex; }
.modal {
  background: var(--bg-overlay); border: 1px solid var(--border-warm);
  border-radius: var(--radius-xl); padding: 26px;
  width: 100%; max-width: 580px; max-height: 82vh; overflow-y: auto;
  position: relative; animation: view-enter var(--dur-lg) var(--ease-soft);
}
.modal-close {
  position: absolute; top: 14px; right: 14px;
  width: 26px; height: 26px; border-radius: 6px;
  background: var(--bg-surface); border: 1px solid var(--border);
  color: var(--text-muted); cursor: pointer; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--dur);
}
.modal-close:hover { color: var(--text-primary); border-color: var(--p-border); }
.modal-title { font-size: 15px; font-weight: 600; color: var(--text-primary); letter-spacing: -0.02em; margin-bottom: 18px; }
.detail-label { font-family: var(--mono); font-size: 9px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-ghost); margin-bottom: 4px; margin-top: 14px; }
.detail-label:first-child { margin-top: 0; }
.detail-val { font-size: 13px; color: var(--text-secondary); line-height: 1.6; }

/* ══ SKELETON ═════════════════════════════════════════════════════════════ */
.skeleton {
  background: linear-gradient(90deg, var(--bg-surface) 25%, rgba(255,255,255,.02) 50%, var(--bg-surface) 75%);
  background-size: 200% 100%; animation: shimmer 2s infinite;
  border-radius: var(--radius-sm); height: 34px; margin-bottom: 6px;
}
@keyframes shimmer { 0%{background-position:200% 0} 100%{background-position:-200% 0} }
.empty { display:flex; flex-direction:column; align-items:center; justify-content:center; padding:36px 20px; gap:8px; }
.empty-text { font-size:12px; color:var(--text-muted); text-align:center; font-family:var(--mono); letter-spacing:.02em; }

/* ══ SCROLLBAR ════════════════════════════════════════════════════════════ */
::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

/* ══ RESULT OUTCOME LINE ══════════════════════════════════════════════════ */
.result-outcome {
  font-family: var(--mono); font-size: 10px;
  color: var(--eco-text); letter-spacing: .03em;
  margin-bottom: 10px; line-height: 1.6;
  padding: 6px 10px; background: var(--eco-dim);
  border: 1px solid var(--eco-border); border-radius: var(--radius-sm);
}

/* ══ BUTTON SPINNER ═══════════════════════════════════════════════════════ */
.btn-spinner {
  width: 10px; height: 10px; border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,.3);
  border-top-color: #fff;
  animation: spin .7s linear infinite; flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ══ ACTIVATE HINT ════════════════════════════════════════════════════════ */
.activate-hint {
  font-family: var(--mono); font-size: 10px; color: var(--text-ghost);
  letter-spacing: .04em; padding: 6px 0;
  transition: color var(--dur-md);
}
.activate-hint.ready { color: var(--eco-text); }

/* ── Topbar logout ── */
.topbar-logout{display:flex;align-items:center;gap:6px;background:var(--bg-surface);
  border:1px solid var(--border);border-radius:var(--radius-sm);color:var(--text-secondary);
  font-family:var(--font);font-size:12px;padding:6px 11px;margin-left:8px;cursor:pointer;
  transition:color var(--dur) var(--ease),border-color var(--dur) var(--ease)}
.topbar-logout:hover{color:var(--text-primary);border-color:var(--p-border)}
.topbar-logout svg{width:13px;height:13px}
.topbar-logout:disabled{opacity:.4;cursor:default}
