.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: var(--radius-xs);
  padding: 8px 14px; background: var(--surface-3); color: var(--ink);
  cursor: pointer; font-weight: 550; line-height: 1.2;
  transition: transform 0.12s var(--ease), background 0.12s;
}
.btn:hover { filter: brightness(0.98); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--pine); color: #fff; }
.btn-navy { background: var(--navy); color: #fff; }
.btn-ghost { background: transparent; border-color: var(--line); }
.btn-danger { background: var(--nogo); color: #fff; }
.btn-sm { padding: 5px 10px; font-size: 0.82rem; }
.btn-lg { padding: 11px 16px; width: 100%; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

.input, .select, .textarea {
  width: 100%; border: 1px solid var(--line-strong); border-radius: var(--radius-xs);
  background: var(--surface); padding: 9px 11px;
}
.textarea { min-height: 110px; resize: vertical; }
.label { display: block; font-size: 0.78rem; color: var(--muted); margin-bottom: 6px; font-weight: 550; }
.field { margin-bottom: 12px; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.card-pad { padding: 16px 18px; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 8px; border-radius: 999px; font-size: 0.74rem; font-weight: 600;
  background: var(--surface-3); color: var(--ink-2); white-space: nowrap;
}
.chip.go, .rec-GO { background: var(--go-bg); color: var(--go); }
.chip.review, .rec-REVIEW { background: var(--review-bg); color: var(--review); }
.chip.nogo, .rec-NO_GO { background: var(--nogo-bg); color: var(--nogo); }
.chip.monitor, .rec-MONITOR { background: var(--monitor-bg); color: var(--monitor); }
.chip.partner, .rec-GO_WITH_PARTNER { background: var(--partner-bg); color: var(--partner); }
.chip.support, .rec-GO_WITH_INTERNAL_SUPPORT { background: var(--support-bg); color: var(--support); }
.st-MATCHED { background: var(--go-bg); color: var(--matched); }
.st-PARTIAL { background: var(--review-bg); color: var(--partial); }
.st-MISSING { background: var(--nogo-bg); color: var(--missing); }
.st-UNKNOWN { background: var(--surface-3); color: var(--unknown); border: 1px dashed var(--line-strong); }
.st-BLOCKER { background: #3b0d0d; color: #fecaca; }

.table-wrap { overflow: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
table.data th {
  text-align: start; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--muted); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line);
}
table.data td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data tr:hover td { background: var(--bg-elev); }
table.data tr { cursor: pointer; }

.badge { font-size: 0.72rem; font-weight: 700; padding: 2px 7px; border-radius: 5px; background: var(--surface-3); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; flex-wrap: wrap; }
.tab {
  background: none; border: 0; padding: 10px 12px; color: var(--muted); cursor: pointer;
  border-bottom: 2px solid transparent; font-weight: 550;
}
.tab.active { color: var(--ink); border-bottom-color: var(--pine); }

.modal-back {
  position: fixed; inset: 0; background: rgba(12, 18, 27, 0.45);
  display: grid; place-items: center; z-index: 80; padding: 18px;
}
.modal {
  width: min(640px, 100%); max-height: 90vh; overflow: auto;
  background: var(--surface); border-radius: 14px; border: 1px solid var(--line); box-shadow: var(--shadow-lg);
}
.modal-h { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.modal-b { padding: 18px; }
.toast-wrap {
  position: fixed; bottom: 18px; inset-inline-end: 18px; z-index: 90;
  display: flex; flex-direction: column; gap: 8px;
}
.toast {
  background: var(--navy); color: #fff; padding: 10px 14px; border-radius: 10px;
  box-shadow: var(--shadow); min-width: 240px; font-size: 0.88rem;
}

.score-dual { display: flex; gap: 18px; align-items: center; }
.ring {
  --p: 0; width: 88px; height: 88px; border-radius: 50%;
  background: conic-gradient(var(--c, var(--pine)) calc(var(--p) * 1%), var(--surface-3) 0);
  display: grid; place-items: center;
}
.ring::after {
  content: ""; width: 64px; height: 64px; border-radius: 50%; background: var(--surface);
}
.ring-val {
  position: absolute; font-weight: 700; font-size: 0.95rem; z-index: 1;
}
.ring-wrap { position: relative; display: grid; place-items: center; }
.ring-label { text-align: center; margin-top: 6px; font-size: 0.75rem; color: var(--muted); }

.bar { height: 8px; background: var(--surface-3); border-radius: 99px; overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--pine); border-radius: 99px; }
.bar.conf > span { background: var(--sky); }

.kpi-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.kpi {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px; cursor: pointer;
}
.kpi .n { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.04em; }
.kpi.active { outline: 2px solid var(--pine); }
.funnel { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin: 8px 0 18px; }
.funnel .step {
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px;
  position: relative;
}
.funnel .step::after {
  content: "›"; position: absolute; inset-inline-end: -10px; top: 50%; transform: translateY(-50%);
  color: var(--faint); font-size: 1.2rem;
}
html[dir="rtl"] .funnel .step::after { content: "‹"; }
.funnel .step:last-child::after { content: none; }

.lang-switch { display: flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.lang-switch button { border: 0; background: none; padding: 6px 9px; cursor: pointer; color: var(--muted); }
.lang-switch button.on { background: var(--navy); color: #fff; }

.empty { padding: 36px 16px; text-align: center; color: var(--muted); }

.evidence {
  display: inline-flex; gap: 6px; align-items: center;
  background: var(--pine-soft); color: var(--pine); border-radius: 6px;
  padding: 2px 7px; font-size: 0.74rem; margin: 2px;
}

.callout {
  border-inline-start: 3px solid var(--gold);
  background: var(--gold-soft);
  padding: 10px 12px; border-radius: 0 8px 8px 0; font-size: 0.88rem;
}
.callout.warn { border-color: var(--copper); background: var(--copper-soft); }
.callout.danger { border-color: var(--nogo); background: var(--nogo-bg); }
.callout.info { border-color: var(--sky); background: var(--sky-soft); }

.graph-canvas { width: 100%; height: 540px; background: var(--bg-elev); border-radius: 12px; border: 1px solid var(--line); }

@media (max-width: 1100px) {
  .kpi-grid, .funnel, .row-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 700px) {
  .kpi-grid, .funnel, .row-2, .row-3 { grid-template-columns: 1fr; }
  .funnel .step::after { content: none; }
}
