/* ============================================================
   KinFast Portal — Design System
   ============================================================ */

:root {
  --navy-900: #0D2240;
  --navy-700: #1F3960;
  --navy-500: #335078;
  --navy-50:  #EAEEF4;
  --amber-500: #F2A05C;
  --amber-600: #D9874A;
  --amber-100: #FBE5CC;
  --amber-50:  #FEF5EA;
  --ink-900: #0F1419;
  --ink-700: #2A2F36;
  --ink-500: #6B7280;
  --ink-300: #9CA3AF;
  --line:    #E5E7EB;
  --bg-page: #F4F6F9;
  --bg-card: #FFFFFF;
  --bg-soft: #F8F9FB;
  --green-700: #1F7A4C;
  --green-100: #D4F4E2;
  --red-700:   #C0392B;
  --red-100:   #FAE0DE;
  --blue-700:  #2563EB;
  --blue-100:  #DBEAFE;
  --f-serif: Georgia, "Times New Roman", serif;
  --f-sans:  -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --f-mono:  ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 2px rgba(13,34,64,0.05), 0 1px 3px rgba(13,34,64,0.04);
  --shadow-md: 0 4px 12px rgba(13,34,64,0.06), 0 1px 3px rgba(13,34,64,0.04);
  --shadow-lg: 0 8px 24px rgba(13,34,64,0.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

html, body {
  font-family: var(--f-sans);
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-900);
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
}

code { font-family: var(--f-mono); background: var(--bg-soft); padding: 1px 5px; border-radius: 3px; font-size: 0.92em; }

/* ============================================================
   HEADER (KinFast wordmark + Thembian by + user)
   ============================================================ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--navy-900);
  color: #fff;
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 2rem;
  align-items: center;
  padding: 0.85rem 1.5rem;
  box-shadow: var(--shadow-md);
}

.brand-block { display: flex; flex-direction: column; gap: 2px; }

.kinfast-wordmark {
  font-family: var(--f-serif);
  font-size: 1.7rem;
  font-weight: bold;
  color: #fff;
  line-height: 1;
  letter-spacing: -0.5px;
}
.kinfast-wordmark .amber { color: var(--amber-500); }

.tagline {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.7);
  font-style: italic;
  letter-spacing: 0.5px;
}

.brand-by {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-left: 1px solid rgba(255,255,255,0.15);
  padding-left: 1.5rem;
}

.by-label {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.logo-img { height: 36px; width: auto; }

.user-menu { display: flex; align-items: center; gap: 0.7rem; }

.user-pill {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  padding: 0.3rem 0.75rem 0.3rem 0.3rem;
  border-radius: 30px;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--amber-500);
  color: var(--navy-900);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
}

.user-info { line-height: 1.15; }
.user-name { font-size: 0.85rem; font-weight: 600; color: #fff; }
.user-role { font-size: 0.7rem; color: rgba(255,255,255,0.65); }

.btn-icon {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.75);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.btn-icon:hover { background: rgba(255,255,255,0.08); color: #fff; }

/* ============================================================
   STEPPER
   ============================================================ */
.stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 1.2rem 1.5rem 0.4rem;
  background: var(--bg-page);
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}

.step {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.9rem;
  border-radius: 30px;
  background: #fff;
  border: 1px solid var(--line);
  transition: all 0.2s ease;
}

.step-circle {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--bg-soft);
  border: 2px solid var(--line);
  color: var(--ink-500);
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink-500);
}

.step.current {
  background: var(--navy-900);
  border-color: var(--navy-900);
  box-shadow: 0 4px 12px rgba(13,34,64,0.18);
}
.step.current .step-circle {
  background: var(--amber-500);
  border-color: var(--amber-500);
  color: var(--navy-900);
}
.step.current .step-label { color: #fff; }

.step.done {
  background: var(--green-100);
  border-color: var(--green-700);
}
.step.done .step-circle {
  background: var(--green-700);
  border-color: var(--green-700);
  color: #fff;
}
.step.done .step-circle::after { content: '✓'; font-size: 0.85rem; }
.step.done .step-circle > * { display: none; }
.step.done .step-label { color: var(--green-700); font-weight: 600; }

.step-connector {
  width: 32px;
  height: 2px;
  background: var(--line);
}

/* ============================================================
   MAIN LAYOUT
   ============================================================ */
main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1.6rem 1.6rem 3rem;
}

.screen { animation: fade-in 0.3s ease; }
@keyframes fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  padding: 1.3rem 1.4rem;
  margin-bottom: 1.2rem;
  box-shadow: var(--shadow-sm);
}
.card.flat { box-shadow: none; padding: 0.85rem 1.4rem; }
.big-card { padding: 1.8rem 2rem; }

.card-head {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.1rem;
}
.card-head h2 {
  font-family: var(--f-serif);
  font-size: 1.4rem;
  color: var(--navy-900);
  margin-bottom: 0.2rem;
}
.card-head h3 {
  font-family: var(--f-serif);
  font-size: 1.15rem;
  font-weight: bold;
  color: var(--navy-900);
  margin-bottom: 0.15rem;
}

.card-num {
  background: var(--navy-900);
  color: var(--amber-500);
  font-family: var(--f-serif);
  font-weight: bold;
  font-size: 1rem;
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius);
  letter-spacing: 0;
  flex-shrink: 0;
}

.muted { color: var(--ink-500); }
.small { font-size: 0.82rem; }

/* ============================================================
   FORM CONTROLS
   ============================================================ */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.4rem;
}
@media (max-width: 800px) {
  .form-grid { grid-template-columns: 1fr; }
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.form-field label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-700);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.form-field input,
.form-field textarea,
.form-field select {
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: var(--f-sans);
  font-size: 0.95rem;
  color: var(--ink-900);
  background: #fff;
}
.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
  outline: 2px solid var(--amber-100);
  border-color: var(--amber-500);
}
.field-hint {
  font-size: 0.78rem;
  color: var(--ink-500);
}

.input-with-button {
  display: flex;
  gap: 0.5rem;
}
.input-with-button input { flex: 1; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius);
  border: none;
  font-family: var(--f-sans);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.12s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
}
.btn:disabled, .btn.btn-disabled {
  opacity: 0.45;
  cursor: not-allowed;
  background: var(--bg-soft) !important;
  color: var(--ink-500) !important;
  border: 1px solid var(--line) !important;
}
.btn-primary {
  background: var(--navy-900);
  color: #fff;
}
.btn-primary:hover:not(:disabled) { background: var(--navy-700); }

.btn-secondary {
  background: #fff;
  color: var(--navy-900);
  border: 1px solid var(--navy-900);
}
.btn-secondary:hover:not(:disabled) { background: var(--navy-50); }

.btn-link {
  background: transparent;
  border: none;
  color: var(--amber-600);
  text-decoration: underline;
  padding: 0.2rem 0.4rem;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.85rem;
}
.btn-link:hover { color: var(--navy-900); }

.btn-large {
  padding: 0.85rem 2rem;
  font-size: 1.05rem;
}
.btn-sm {
  padding: 0.35rem 0.7rem;
  font-size: 0.78rem;
}

.primary-action-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1.4rem;
  flex-wrap: wrap;
}

/* ============================================================
   SAP RESULT CARD
   ============================================================ */
.sap-result {
  margin-top: 1.2rem;
  padding: 1rem 1.2rem;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  border-left: 4px solid var(--green-700);
}
.sap-result .head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--green-700);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}
.sap-product-name {
  font-family: var(--f-serif);
  font-size: 1.3rem;
  font-weight: bold;
  color: var(--navy-900);
}
.sap-fields {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}
@media (max-width: 900px) {
  .sap-fields { grid-template-columns: repeat(2, 1fr); }
}
.sap-field-label {
  font-size: 0.72rem;
  color: var(--ink-500);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}
.sap-field-value {
  font-weight: 600;
  color: var(--ink-900);
  font-size: 0.95rem;
}

.sap-spinner {
  margin-top: 1rem;
  padding: 1rem;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  gap: 0.8rem;
  color: var(--ink-500);
  font-size: 0.9rem;
}
.sap-spinner-icon {
  width: 18px;
  height: 18px;
  border: 3px solid var(--navy-50);
  border-top-color: var(--amber-500);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

.sap-error {
  margin-top: 1rem;
  padding: 0.85rem 1.1rem;
  background: var(--red-100);
  border: 1px solid var(--red-700);
  border-radius: var(--radius);
  color: var(--red-700);
  font-size: 0.9rem;
}

/* ============================================================
   UPLOAD ZONE
   ============================================================ */
.upload-zone {
  border: 2.5px dashed var(--navy-500);
  border-radius: var(--radius-lg);
  background: var(--bg-soft);
  padding: 3rem 2rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s ease;
}
.upload-zone:hover {
  border-color: var(--amber-500);
  background: var(--amber-50);
}
.upload-zone.dragging {
  border-color: var(--amber-500);
  background: var(--amber-100);
  transform: scale(1.01);
}
.upload-icon {
  font-size: 3rem;
  margin-bottom: 0.6rem;
}
.upload-primary {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--navy-900);
  margin-bottom: 0.3rem;
}
.upload-secondary {
  color: var(--ink-500);
  font-size: 0.85rem;
}

.upload-sample {
  margin-top: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.upload-result {
  margin-top: 1rem;
  padding: 1rem 1.2rem;
  background: var(--green-100);
  border: 1px solid var(--green-700);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  gap: 0.8rem;
  color: var(--green-700);
}
.upload-result-icon { font-size: 1.6rem; }
.upload-result-text { font-weight: 600; }

/* ============================================================
   STATS DISPLAY
   ============================================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.2rem;
}
@media (max-width: 900px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
.stat-tile {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  border-left: 3px solid var(--amber-500);
}
.stat-tile-value {
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--navy-900);
  line-height: 1.1;
  font-family: var(--f-sans);
}
.stat-tile-label {
  font-size: 0.78rem;
  color: var(--ink-500);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 0.3rem;
}

.dist-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.5rem;
}
.dist-table th, .dist-table td {
  text-align: left;
  padding: 0.55rem 0.85rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.88rem;
}
.dist-table th {
  background: var(--bg-soft);
  color: var(--ink-500);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.dist-table td.num, .dist-table th.num { text-align: right; font-variant-numeric: tabular-nums; }

.dist-bar-wrap {
  display: inline-block;
  width: 120px;
  height: 8px;
  background: var(--bg-soft);
  border-radius: 4px;
  margin-right: 0.5rem;
  vertical-align: middle;
  overflow: hidden;
}
.dist-bar {
  height: 100%;
  background: var(--amber-500);
  border-radius: 4px;
}

/* ============================================================
   GENERATING SCREEN — Circular progress + stages
   ============================================================ */
.generating-host {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 3rem 1.5rem 4rem;
  max-width: 720px;
  margin: 0 auto;
}

.progress-circle {
  position: relative;
  width: 200px;
  height: 200px;
  margin-bottom: 2rem;
}
.progress-svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.progress-track {
  fill: none;
  stroke: var(--navy-50);
  stroke-width: 14;
}
.progress-fill {
  fill: none;
  stroke: var(--amber-500);
  stroke-width: 14;
  stroke-linecap: round;
  stroke-dasharray: 552.92;
  stroke-dashoffset: 552.92;
  transition: stroke-dashoffset 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.progress-percent {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 2.6rem;
  font-weight: 700;
  color: var(--navy-900);
  font-family: var(--f-sans);
  letter-spacing: -2px;
}

.gen-message {
  font-family: var(--f-serif);
  font-size: 1.4rem;
  color: var(--navy-900);
  text-align: center;
  margin-bottom: 0.3rem;
  font-weight: bold;
  min-height: 1.7em;
  transition: opacity 0.25s;
}
.gen-submessage {
  font-size: 0.95rem;
  text-align: center;
  margin-bottom: 2rem;
  font-style: italic;
  min-height: 1.5em;
  transition: opacity 0.25s;
}

.gen-stages {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.gen-stage {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.65rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: all 0.25s ease;
}
.gen-stage-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--line);
  background: var(--bg-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
  color: var(--ink-500);
}
.gen-stage-text {
  font-size: 0.92rem;
  color: var(--ink-700);
  flex: 1;
}
.gen-stage.current {
  background: var(--amber-50);
  border-color: var(--amber-500);
}
.gen-stage.current .gen-stage-icon {
  background: var(--amber-500);
  border-color: var(--amber-500);
  color: #fff;
  animation: pulse 1.3s infinite;
}
.gen-stage.current .gen-stage-text { font-weight: 600; color: var(--navy-900); }
.gen-stage.done {
  background: var(--green-100);
  border-color: var(--green-700);
}
.gen-stage.done .gen-stage-icon {
  background: var(--green-700);
  border-color: var(--green-700);
  color: #fff;
}
.gen-stage.done .gen-stage-text { color: var(--green-700); }

@keyframes pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(242, 160, 92, 0.7); }
  50% { transform: scale(1.08); box-shadow: 0 0 0 8px rgba(242, 160, 92, 0); }
}
@keyframes spin { to { transform: rotate(360deg); } }

.gen-fun-fact {
  margin-top: 2rem;
  padding: 0.9rem 1.2rem;
  background: var(--navy-900);
  color: var(--amber-100);
  border-radius: var(--radius);
  font-size: 0.9rem;
  text-align: center;
  font-style: italic;
  min-height: 2.7em;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  transition: opacity 0.25s;
}

/* ============================================================
   INNER TABS (Step 3)
   ============================================================ */
.inner-tabs {
  display: flex;
  gap: 0.3rem;
  border-bottom: 2px solid var(--line);
  margin-bottom: 1.4rem;
  padding-bottom: 1px;
}
.inner-tab {
  background: transparent;
  border: none;
  padding: 0.7rem 1.3rem;
  cursor: pointer;
  font-family: var(--f-sans);
  font-size: 0.92rem;
  color: var(--ink-500);
  font-weight: 500;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: all 0.12s ease;
}
.inner-tab:hover { color: var(--navy-900); }
.inner-tab.active {
  color: var(--navy-900);
  border-bottom-color: var(--amber-500);
  font-weight: 600;
}

/* ============================================================
   SCENARIO CARDS (Step 3 — Browse view)
   ============================================================ */
.scenario-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
@media (max-width: 1100px) {
  .scenario-cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 700px) {
  .scenario-cards { grid-template-columns: 1fr; }
}

.scenario-card {
  background: var(--bg-card);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.3rem 1.4rem;
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
}
.scenario-card:hover {
  border-color: var(--navy-500);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.scenario-card.selected {
  border: 2px solid var(--amber-500);
  box-shadow: 0 0 0 4px rgba(242, 160, 92, 0.15);
}
.scenario-card.selected::after {
  content: '✓ Selected';
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--amber-500);
  color: var(--navy-900);
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.72rem;
  font-weight: 700;
}
.scenario-card.recommended {
  background: linear-gradient(135deg, #FEF5EA 0%, #FFFFFF 50%);
}
.scenario-card-tag {
  display: inline-block;
  font-family: var(--f-serif);
  font-size: 1.4rem;
  font-weight: bold;
  color: var(--amber-500);
  background: var(--navy-900);
  width: 36px;
  height: 36px;
  border-radius: 8px;
  text-align: center;
  line-height: 36px;
  margin-bottom: 0.6rem;
}
.scenario-card-name {
  font-family: var(--f-serif);
  font-size: 1.05rem;
  font-weight: bold;
  color: var(--navy-900);
  margin-bottom: 0.3rem;
}
.scenario-card-rule {
  font-size: 0.82rem;
  color: var(--ink-500);
  font-style: italic;
  margin-bottom: 1rem;
  min-height: 2.5em;
}
.scenario-card-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem 1rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--line);
}
.scenario-card-metric {
  display: flex;
  flex-direction: column;
}
.scenario-card-metric-label {
  font-size: 0.7rem;
  color: var(--ink-500);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.scenario-card-metric-value {
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy-900);
}
.scenario-card-actions {
  margin-top: 1rem;
  display: flex;
  gap: 0.4rem;
}
.scenario-recommend-badge {
  display: inline-block;
  background: var(--amber-500);
  color: var(--navy-900);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 8px;
  border-radius: 10px;
  margin-bottom: 0.5rem;
}

/* ============================================================
   KPI cards, grids, tables — shared
   ============================================================ */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.2rem;
}
@media (max-width: 1100px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
}
.kpi {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  padding: 1.1rem 1.2rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.kpi::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--amber-500);
}
.kpi-label {
  font-size: 0.75rem;
  color: var(--ink-500);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.4rem;
}
.kpi-value {
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--navy-900);
  line-height: 1.1;
  letter-spacing: -0.5px;
}
.kpi-sub { font-size: 0.82rem; color: var(--ink-500); margin-top: 0.3rem; }
.kpi-delta {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  margin-top: 0.3rem;
}
.kpi-delta.pos { background: var(--green-100); color: var(--green-700); }
.kpi-delta.neg { background: var(--red-100); color: var(--red-700); }
.kpi-delta.neutral { background: var(--navy-50); color: var(--navy-700); }

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
  margin-bottom: 1.2rem;
}
.grid-2-asymmetric {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 1.2rem;
  align-items: start;
}
@media (max-width: 1100px) {
  .grid-2, .grid-2-asymmetric { grid-template-columns: 1fr; }
}

.row-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.table-wrap { overflow-x: auto; }
.scroll-vertical { max-height: 60vh; overflow-y: auto; }

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.data-table thead {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--navy-900);
}
.data-table thead th {
  text-align: left;
  padding: 0.7rem 0.8rem;
  color: #fff;
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  border-bottom: 2px solid var(--amber-500);
}
.data-table th.num,
.data-table td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.data-table tbody tr {
  border-bottom: 1px solid var(--line);
  transition: background 0.08s ease;
}
.data-table tbody tr:hover { background: var(--bg-soft); }
.data-table tbody td {
  padding: 0.65rem 0.8rem;
  color: var(--ink-700);
}
.data-table tbody td strong { color: var(--navy-900); font-weight: 600; }
.data-table tr.scenario-row.selected td { background: var(--amber-50); font-weight: 600; }

.chart-wrap { height: 280px; position: relative; }

/* Weights tab */
.weights-list { display: flex; flex-direction: column; gap: 0.85rem; margin-bottom: 1.1rem; }
.weight-row {
  display: grid;
  grid-template-columns: 1fr 60px;
  gap: 0.8rem;
  align-items: center;
}
.weight-row .name { font-size: 0.9rem; color: var(--navy-900); font-weight: 500; }
.weight-row .unit { font-size: 0.72rem; color: var(--ink-500); margin-top: 2px; }
.weight-slider-wrap {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  grid-column: 1 / -1;
}
.weight-slider {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  background: var(--navy-50);
  border-radius: 3px;
  outline: none;
}
.weight-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--amber-500);
  border: 3px solid #fff;
  box-shadow: 0 2px 4px rgba(13,34,64,0.2);
  cursor: pointer;
}
.weight-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--amber-500);
  border: 3px solid #fff;
  box-shadow: 0 2px 4px rgba(13,34,64,0.2);
  cursor: pointer;
}
.weight-input {
  width: 60px;
  text-align: center;
  padding: 0.4rem 0.5rem;
  border: 2px solid var(--amber-500);
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--navy-900);
  background: #fff;
}
.weights-total {
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  background: var(--bg-soft);
  border: 2px solid var(--line);
}
.weights-total.valid { background: var(--green-100); border-color: var(--green-700); }
.weights-total.invalid { background: var(--red-100); border-color: var(--red-700); }
.weights-total .lbl { font-size: 0.78rem; letter-spacing: 1px; text-transform: uppercase; color: var(--ink-500); font-weight: 600; }
.weights-total .val { font-size: 1.6rem; font-weight: 700; color: var(--navy-900); }
.weights-total .status { font-size: 0.82rem; margin-top: 0.3rem; color: var(--ink-500); }
.weights-total.valid .status { color: var(--green-700); font-weight: 600; }
.weights-total.invalid .status { color: var(--red-700); font-weight: 600; }
.presets { display: flex; flex-direction: column; gap: 0.5rem; }
.preset-btn {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius);
  cursor: pointer;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.preset-btn:hover {
  border-color: var(--amber-500);
  background: var(--amber-50);
}
.preset-btn .pn { font-weight: 600; font-size: 0.9rem; color: var(--navy-900); }
.preset-btn .pw { font-size: 0.74rem; color: var(--ink-500); font-family: var(--f-mono); }

/* Frontier bar */
.frontier-bar { padding: 0.6rem 0; }
.frontier-rail {
  position: relative;
  height: 30px;
  background: linear-gradient(to right, var(--green-100), var(--amber-100), var(--red-100));
  border-radius: 6px;
  margin-bottom: 0.6rem;
}
.frontier-marker {
  position: absolute;
  top: -8px;
  width: 4px;
  height: 46px;
  background: var(--navy-900);
  border-radius: 2px;
  transition: left 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  transform: translateX(-2px);
}
.frontier-marker .marker-dot {
  position: absolute;
  top: -6px;
  left: -6px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--amber-500);
  border: 3px solid var(--navy-900);
}
.frontier-marker .marker-label {
  position: absolute;
  top: 50px;
  left: -40px;
  width: 90px;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--navy-900);
  white-space: nowrap;
}
.frontier-axis {
  display: flex;
  justify-content: space-between;
  margin-top: 2.2rem;
  font-size: 0.78rem;
  color: var(--ink-500);
}
.frontier-axis b { display: block; color: var(--navy-900); font-size: 0.92rem; font-weight: 600; }
.frontier-axis .right { text-align: right; }

.action-buttons { display: flex; gap: 0.5rem; flex-wrap: wrap; }

.search-input {
  padding: 0.55rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 0.9rem;
}
.search-input:focus { outline: 2px solid var(--amber-100); border-color: var(--amber-500); }

.jit-badge {
  display: inline-block;
  width: 22px;
  text-align: center;
  padding: 0.1rem 0;
  border-radius: 3px;
  font-size: 0.74rem;
  font-weight: 700;
}
.jit-badge.yes { background: var(--green-100); color: var(--green-700); }
.jit-badge.no  { background: var(--bg-soft); color: var(--ink-500); }

/* ============================================================
   APPROVE SCREEN
   ============================================================ */
.approve-summary {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-left: 4px solid var(--amber-500);
  padding: 1.2rem 1.4rem;
  border-radius: var(--radius);
  margin-bottom: 1.4rem;
}
.approve-summary h4 {
  font-family: var(--f-serif);
  font-size: 1.1rem;
  color: var(--navy-900);
  margin-bottom: 0.6rem;
}
.approve-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
@media (max-width: 900px) {
  .approve-summary-grid { grid-template-columns: repeat(2, 1fr); }
}
.approve-summary-grid .label {
  font-size: 0.72rem;
  text-transform: uppercase;
  color: var(--ink-500);
  letter-spacing: 0.5px;
}
.approve-summary-grid .value {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--navy-900);
}

.approve-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.2rem;
  margin-bottom: 1.4rem;
}

.notification-block {
  margin-top: 1.5rem;
  padding: 1.8rem 2rem;
  background: var(--green-100);
  border: 2px solid var(--green-700);
  border-radius: var(--radius-lg);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1.5rem;
  animation: pulse-in 0.5s ease;
}
@keyframes pulse-in {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}
.notification-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--green-700);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: bold;
}
.notification-text h3 {
  font-family: var(--f-serif);
  color: var(--green-700);
  margin-bottom: 0.3rem;
  font-size: 1.3rem;
}
.notification-text p { color: var(--ink-700); margin-bottom: 0.3rem; }

/* ============================================================
   COMPLETE / DOWNLOAD SCREEN
   ============================================================ */
.success-banner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding-bottom: 1.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
}
.success-icon {
  font-size: 3.5rem;
}
.success-banner h2 {
  font-family: var(--f-serif);
  color: var(--navy-900);
  margin-bottom: 0.3rem;
}

.download-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}
@media (max-width: 900px) {
  .download-grid { grid-template-columns: repeat(2, 1fr); }
}
.download-tile {
  background: var(--bg-card);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.4rem 1.2rem;
  cursor: pointer;
  text-align: left;
  font-family: var(--f-sans);
  transition: all 0.15s ease;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.6rem;
}
.download-tile:hover {
  border-color: var(--amber-500);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.download-icon {
  font-size: 2.4rem;
  width: 60px;
  height: 60px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
}
.download-icon.excel { background: #E2EFDA; }
.download-icon.csv   { background: var(--navy-50); }
.download-icon.pdf   { background: #FAE0DE; }
.download-icon.email { background: var(--amber-100); }
.download-title {
  font-family: var(--f-serif);
  font-size: 1.05rem;
  font-weight: bold;
  color: var(--navy-900);
}
.download-sub { line-height: 1.3; }

/* ============================================================
   STATUS CHIPS (used in RFQ supplier counts + delivery aggregate)
   ============================================================ */
.status-chips {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.85rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
}

.status-chip .num {
  font-weight: 700;
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
}

.status-chip.pending  { background: var(--bg-soft);    color: var(--ink-700);   border: 1px solid var(--line); }
.status-chip.approved { background: var(--green-100);  color: var(--green-700); border: 1px solid var(--green-700); }
.status-chip.override { background: var(--amber-100);  color: var(--amber-600); border: 1px solid var(--amber-500); }
.status-chip.total    { background: var(--navy-900);   color: #fff;             border: 1px solid var(--navy-900); }

/* ============================================================
   RFQ EMAIL DRAFT
   ============================================================ */
.email-draft {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  margin-bottom: 1rem;
  font-family: var(--f-sans);
}

.email-row {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
}

.email-row:last-of-type { border-bottom: none; }

.email-label {
  flex: 0 0 80px;
  font-weight: 600;
  color: var(--ink-500);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.email-value {
  flex: 1;
  color: var(--ink-900);
}

.email-subject {
  flex: 1;
  padding: 0.5rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 5px;
  font-family: var(--f-sans);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--navy-900);
  background: #fff;
}

.email-subject:focus { outline: 2px solid var(--amber-100); border-color: var(--amber-500); }

.email-divider {
  height: 1px;
  background: var(--line);
  margin: 0.3rem 0 0.8rem;
}

.email-body {
  width: 100%;
  padding: 1rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--ink-900);
  background: #fff;
  resize: vertical;
  min-height: 320px;
}

.email-body:focus { outline: 2px solid var(--amber-100); border-color: var(--amber-500); }

.attachments-row {
  margin-bottom: 0.5rem;
  padding: 0.85rem 1rem;
  background: var(--amber-50);
  border: 1px solid var(--amber-500);
  border-radius: var(--radius);
}

.attachments-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--amber-600);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}

.attachments-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.attachment-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: #fff;
  border: 1px solid var(--amber-500);
  border-radius: 18px;
  padding: 0.4rem 0.9rem;
  font-size: 0.85rem;
  color: var(--navy-900);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.12s ease;
}

.attachment-pill:hover {
  background: var(--amber-100);
  border-color: var(--amber-600);
}

/* RFQ supplier table — checkboxes */
#rfqSupplierTable td input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--amber-500);
}

/* Delivery status badges */
.delivery-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.22rem 0.6rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.delivery-badge.queued    { background: var(--bg-soft);   color: var(--ink-500); border: 1px solid var(--line); }
.delivery-badge.sent      { background: var(--blue-100);  color: var(--blue-700); border: 1px solid var(--blue-700); }
.delivery-badge.delivered { background: var(--green-100); color: var(--green-700); border: 1px solid var(--green-700); }
.delivery-badge.bounced   { background: var(--red-100);   color: var(--red-700); border: 1px solid var(--red-700); }

.read-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.22rem 0.6rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}

.read-badge.pending { background: var(--bg-soft);   color: var(--ink-500); border: 1px solid var(--line); }
.read-badge.read    { background: var(--amber-100); color: var(--amber-600); border: 1px solid var(--amber-500); }

.delivery-badge .pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  animation: pulse-soft 1.4s ease-in-out infinite;
}

@keyframes pulse-soft {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ============================================================
   MODULE MENU BAR (top-level nav under header)
   ============================================================ */
.menu-bar {
  display: flex;
  align-items: stretch;
  gap: 0;
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: 0 1.5rem;
  overflow-x: auto;
}

.menu-tab {
  background: transparent;
  border: none;
  padding: 0.85rem 1.2rem;
  cursor: pointer;
  font-family: var(--f-sans);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--ink-500);
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
  transition: color 0.12s ease, border-color 0.12s ease;
}

.menu-tab:hover:not(:disabled) {
  color: var(--navy-900);
}

.menu-tab.active {
  color: var(--navy-900);
  border-bottom-color: var(--amber-500);
  font-weight: 600;
}

.menu-tab.disabled {
  color: var(--ink-300);
  cursor: not-allowed;
  opacity: 0.6;
}

.menu-tab.disabled::after {
  content: 'Phase 2';
  margin-left: 0.4rem;
  font-size: 0.65rem;
  background: var(--bg-soft);
  color: var(--ink-500);
  padding: 1px 5px;
  border-radius: 3px;
  border: 1px solid var(--line);
  vertical-align: middle;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* ============================================================
   BIDS RECEIVED — supplier bid cards
   ============================================================ */
.bid-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  margin-bottom: 0.8rem;
  overflow: hidden;
  transition: box-shadow 0.15s ease;
}

.bid-card.submitted { border-left: 4px solid var(--green-700); }
.bid-card.pending   { border-left: 4px solid var(--amber-500); }
.bid-card.declined  { border-left: 4px solid var(--red-700); opacity: 0.85; }

.bid-card-head {
  display: grid;
  grid-template-columns: auto 1fr auto auto auto;
  gap: 1.2rem;
  align-items: center;
  padding: 0.95rem 1.2rem;
  cursor: pointer;
}

.bid-card-head:hover { background: var(--bg-soft); }

.bid-card-statusbadge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.7rem;
  border-radius: 4px;
  font-size: 0.73rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  white-space: nowrap;
}

.bid-card-statusbadge.submitted { background: var(--green-100); color: var(--green-700); }
.bid-card-statusbadge.pending   { background: var(--amber-100); color: var(--amber-600); }
.bid-card-statusbadge.declined  { background: var(--red-100);   color: var(--red-700); }

.bid-card-supplier {
  min-width: 0;
}

.bid-card-suppname {
  font-family: var(--f-serif);
  font-size: 1.05rem;
  font-weight: bold;
  color: var(--navy-900);
}

.bid-card-suppmeta {
  font-size: 0.78rem;
  color: var(--ink-500);
  margin-top: 2px;
}

.bid-card-stats {
  display: flex;
  gap: 1.8rem;
}

.bid-stat-item {
  text-align: right;
}

.bid-stat-label {
  font-size: 0.7rem;
  color: var(--ink-500);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.bid-stat-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy-900);
}

.bid-stat-delta {
  font-size: 0.78rem;
  font-weight: 600;
  margin-left: 4px;
}

.bid-stat-delta.pos { color: var(--green-700); }
.bid-stat-delta.neg { color: var(--red-700); }

.bid-card-expand {
  width: 32px;
  height: 32px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: var(--ink-700);
  transition: transform 0.18s ease;
}

.bid-card.expanded .bid-card-expand { transform: rotate(180deg); }

.bid-card-body {
  padding: 0 1.2rem 1.2rem;
  border-top: 1px solid var(--line);
  background: var(--bg-soft);
  display: none;
}

.bid-card.expanded .bid-card-body { display: block; }

.bid-section {
  margin-top: 1rem;
}

.bid-section-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--navy-900);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}

.bid-quotation-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
  background: #fff;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--line);
}

.bid-quotation-table thead th {
  background: var(--navy-50);
  color: var(--navy-900);
  padding: 0.5rem 0.7rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.bid-quotation-table td {
  padding: 0.45rem 0.7rem;
  border-bottom: 1px solid var(--line);
  color: var(--ink-700);
}

.bid-quotation-table td.num,
.bid-quotation-table th.num { text-align: right; font-variant-numeric: tabular-nums; }

.bid-quotation-table tbody tr:last-child td { border-bottom: none; }

.bid-docs-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.bid-doc-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.9rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 0.86rem;
}

.bid-doc-icon {
  width: 32px;
  height: 32px;
  border-radius: 5px;
  background: var(--amber-100);
  color: var(--amber-600);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.bid-doc-name { font-weight: 600; color: var(--navy-900); }
.bid-doc-meta { font-size: 0.75rem; color: var(--ink-500); }

.bid-tc-accept {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.9rem;
  background: var(--green-100);
  border: 1px solid var(--green-700);
  border-radius: 6px;
  color: var(--green-700);
  font-size: 0.88rem;
}

.bid-tc-accept .check {
  width: 22px;
  height: 22px;
  background: var(--green-700);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  flex-shrink: 0;
}

/* ============================================================
   COMPARATIVE ANALYSIS — traditional procurement layout
   (top 3 suppliers as columns, like a real Cost Comparison sheet)
   ============================================================ */
.comp-trad-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: 1rem;
}

/* Per-category sub-comparative wrapper */
.cat-comparative {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: 1.2rem;
}

.cat-comp-header {
  display: flex;
  align-items: stretch;
  gap: 0.9rem;
  padding: 0.85rem 1rem;
  background: linear-gradient(to right, #FEF8F1, #FFFFFF);
  border-bottom: 1px solid var(--line);
}

.cat-comp-num {
  width: 38px;
  height: 38px;
  background: var(--amber-500);
  color: var(--navy-900);
  font-family: var(--f-serif);
  font-weight: bold;
  font-size: 1.1rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cat-comp-name {
  font-family: var(--f-serif);
  font-size: 1.05rem;
  font-weight: bold;
  color: var(--navy-900);
  margin-bottom: 0.25rem;
}

.cat-comp-count {
  color: var(--ink-500);
  font-weight: normal;
  font-size: 0.9rem;
  font-family: var(--f-sans);
}

.cat-comp-title-bar {
  background: #FFF5E0;
  border: 1px solid var(--amber-500);
  color: var(--navy-900);
  font-family: var(--f-serif);
  font-weight: bold;
  font-size: 1rem;
  letter-spacing: 0.5px;
  padding: 0.4rem 0.8rem;
  border-radius: 5px;
  display: inline-block;
  margin-top: 0.2rem;
}

/* Grand-overall summary card */
.comp-trad-card.grand-summary {
  background: var(--navy-900);
  color: #fff;
}

.grand-summary-title {
  padding: 0.85rem 1.2rem 0.5rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--amber-500);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.grand-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: rgba(255, 255, 255, 0.1);
  padding-bottom: 1px;
}

.gs-cell {
  background: var(--navy-900);
  padding: 0.85rem 1.2rem 1rem;
}

.gs-cell.highlight {
  background: var(--amber-500);
  color: var(--navy-900);
}

.gs-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.8;
  margin-bottom: 4px;
}

.gs-cell.highlight .gs-label { opacity: 1; }

.gs-value {
  font-family: var(--f-serif);
  font-size: 1.5rem;
  font-weight: bold;
  font-variant-numeric: tabular-nums;
}

.comp-trad-header {
  background: var(--navy-900);
  color: #fff;
  padding: 0.85rem 1.2rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  font-size: 0.88rem;
  flex-wrap: wrap;
}

.comp-trad-header .indent-label { line-height: 1.5; }
.comp-trad-header code {
  background: rgba(255,255,255,0.12);
  color: var(--amber-500);
  padding: 1px 6px;
  border-radius: 3px;
  font-weight: 600;
}

.comp-trad-title-bar {
  background: var(--navy-50);
  text-align: center;
  padding: 0.65rem;
  font-family: var(--f-serif);
  font-size: 1.05rem;
  font-weight: bold;
  color: var(--navy-900);
  letter-spacing: 1.5px;
  border-bottom: 1px solid var(--line);
}

.comp-trad-scroll {
  overflow-x: auto;
  overflow-y: auto;
  max-height: 70vh;
  border-bottom: 1px solid var(--line);
}

.comp-trad-table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.comp-trad-table th,
.comp-trad-table td {
  border: 1px solid var(--line);
  padding: 0.42rem 0.6rem;
  vertical-align: middle;
}

/* Tier-1 header (section labels) */
.comp-trad-table thead tr.tier-1 th {
  background: var(--navy-700);
  color: #fff;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.74rem;
  letter-spacing: 0.5px;
  text-align: center;
  padding: 0.55rem 0.7rem;
  font-family: var(--f-serif);
  position: sticky;
  top: 0;
  z-index: 3;
}

.comp-trad-table thead tr.tier-1 th.s1 { background: #5B7BAA; }
.comp-trad-table thead tr.tier-1 th.s2 { background: #C57841; }
.comp-trad-table thead tr.tier-1 th.s3 { background: #5D8B47; }

.comp-trad-table .sup-name {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.comp-trad-table .sup-id {
  font-size: 0.68rem;
  font-weight: 500;
  font-family: var(--f-mono);
  opacity: 0.92;
  margin-top: 2px;
  text-transform: none;
  letter-spacing: 0;
}

.comp-trad-table .sup-id .ann-pin {
  width: 22px;
  height: 22px;
  margin-left: 4px;
  vertical-align: middle;
  background: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.3);
  color: #fff;
}

.comp-trad-table .sup-id .ann-pin.has-comment {
  background: var(--amber-500);
  border-color: var(--amber-500);
  color: var(--navy-900);
}

/* Tier-2 header (column labels) */
.comp-trad-table thead tr.tier-2 th {
  background: var(--bg-soft);
  font-weight: 600;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: var(--navy-900);
  text-align: left;
  padding: 0.5rem 0.6rem;
  position: sticky;
  top: 41px;
  z-index: 2;
}

.comp-trad-table thead tr.tier-2 th.num { text-align: right; }

/* Supplier color backgrounds for cells */
.comp-trad-table td.s1, .comp-trad-table th.s1 { background: #E8EFF8; }
.comp-trad-table td.s2, .comp-trad-table th.s2 { background: #FDEDD4; }
.comp-trad-table td.s3, .comp-trad-table th.s3 { background: #E1F0DB; }

.comp-trad-table thead tr.tier-2 th.s1 { background: #C7D5E9; }
.comp-trad-table thead tr.tier-2 th.s2 { background: #FAD9B0; }
.comp-trad-table thead tr.tier-2 th.s3 { background: #BCDDA6; }

.comp-trad-table td.num,
.comp-trad-table th.num { text-align: right; font-variant-numeric: tabular-nums; }

.comp-trad-table td.center { text-align: center; }

/* Item rows */
.comp-trad-table tr.item-row td { background: #fff; }
.comp-trad-table tr.item-row td.s1 { background: #F4F7FB; }
.comp-trad-table tr.item-row td.s2 { background: #FEF5E5; }
.comp-trad-table tr.item-row td.s3 { background: #F0F8EB; }

.comp-trad-table tr.item-row td.code {
  font-family: var(--f-mono);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--navy-700);
}

.comp-trad-table tr.item-row td.item-name {
  max-width: 280px;
  min-width: 220px;
}

.comp-trad-table tr.item-row td.empty {
  text-align: center;
  color: var(--ink-300);
  font-style: italic;
}

/* Category divider */
.comp-trad-table tr.cat-divider td {
  background: var(--navy-900) !important;
  color: #fff;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0.4px;
  padding: 0.55rem 0.8rem;
  font-family: var(--f-serif);
}

.comp-trad-table tr.cat-divider .cat-count {
  font-weight: normal;
  color: var(--amber-100);
  font-family: var(--f-sans);
  font-size: 0.72rem;
  text-transform: none;
  letter-spacing: 0;
}

.comp-trad-table tr.cat-divider .ann-pin {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.3);
  color: #fff;
  margin-left: 0.5rem;
}
.comp-trad-table tr.cat-divider .ann-pin.has-comment {
  background: var(--amber-500); border-color: var(--amber-500); color: var(--navy-900);
}

/* Aggregate rows */
.comp-trad-table tr.agg-row td {
  background: var(--bg-soft);
  font-weight: 600;
}

.comp-trad-table tr.agg-row td.s1 { background: #DDE6F2 !important; }
.comp-trad-table tr.agg-row td.s2 { background: #FBE0BA !important; }
.comp-trad-table tr.agg-row td.s3 { background: #CFE5BE !important; }

.comp-trad-table tr.agg-row .agg-label {
  text-align: right;
  font-weight: 700;
  font-family: var(--f-serif);
  color: var(--navy-900);
  font-size: 0.88rem;
  padding-right: 0.9rem;
}

.comp-trad-table tr.agg-row.total td {
  background: var(--navy-50);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--navy-900);
  border-top: 2px solid var(--navy-900);
  border-bottom: 2px solid var(--navy-900);
}

.comp-trad-table tr.agg-row.total td.s1 { background: #C7D5E9 !important; }
.comp-trad-table tr.agg-row.total td.s2 { background: #FAD9B0 !important; }
.comp-trad-table tr.agg-row.total td.s3 { background: #BCDDA6 !important; }

.comp-trad-table tr.agg-row.terms-row td { font-weight: 500; }

/* L-rank row */
.comp-trad-table tr.l-rank td {
  background: var(--navy-900) !important;
  color: var(--amber-500);
  font-weight: 700;
  font-size: 1.05rem;
  text-align: center;
  font-family: var(--f-serif);
  padding: 0.65rem;
  letter-spacing: 2px;
}

/* Approval Note */
.comp-approval-note {
  padding: 1.4rem 1.6rem;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--line);
}

.approval-note-title {
  text-align: center;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--navy-900);
  margin-bottom: 0.8rem;
  border-bottom: 2px solid var(--navy-900);
  padding-bottom: 0.5rem;
  font-family: var(--f-serif);
}

.approval-intro {
  font-size: 0.9rem;
  color: var(--ink-700);
  margin-bottom: 0.9rem;
  font-style: italic;
}

.approval-note-section {
  margin-bottom: 0.85rem;
}

.approval-note-section h4 {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--navy-900);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.3rem;
  font-family: var(--f-sans);
}

.approval-note-section p {
  font-size: 0.88rem;
  color: var(--ink-700);
  line-height: 1.55;
  text-align: justify;
}

.approval-note-section p strong { color: var(--navy-900); }
.approval-note-section p code {
  font-size: 0.85rem;
  background: #fff;
  border: 1px solid var(--line);
  padding: 1px 5px;
}

/* Signature row */
.comp-signatures {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
  padding: 1.4rem 1.6rem;
  background: #fff;
}

.sig-block {
  border-top: 1.5px solid var(--ink-700);
  padding-top: 0.5rem;
}

.sig-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--navy-900);
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.sig-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy-900);
  font-family: var(--f-serif);
}

.sig-role {
  font-size: 0.78rem;
  color: var(--ink-500);
  font-style: italic;
  margin-top: 2px;
}

/* ============================================================
   COMPARATIVE ANALYSIS — tabs + (legacy simpler layout, retained for reference)
   ============================================================ */
.panel-title-inline {
  font-family: var(--f-serif);
  font-size: 1.4rem;
  font-weight: bold;
  color: var(--navy-900);
  margin-bottom: 0.2rem;
}

.comparative-tabs {
  display: flex;
  gap: 0.4rem;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  padding: 0.4rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
}

.comp-tab {
  background: transparent;
  border: none;
  padding: 0.7rem 1rem;
  border-radius: var(--radius);
  cursor: pointer;
  font-family: var(--f-sans);
  font-size: 0.88rem;
  color: var(--ink-500);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
  transition: all 0.12s ease;
}

.comp-tab:hover { background: var(--bg-soft); color: var(--navy-900); }

.comp-tab.active {
  background: var(--navy-900);
  color: #fff;
  font-weight: 600;
}

.comp-tab.active .comp-tab-letter { color: var(--amber-500); }

.comp-tab-letter {
  font-family: var(--f-serif);
  font-weight: bold;
  font-size: 1rem;
  color: var(--amber-600);
}

.comp-sheet {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: 1rem;
}

.comp-sheet-head {
  background: var(--navy-900);
  color: #fff;
  padding: 1.1rem 1.4rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.comp-sheet-title {
  font-family: var(--f-serif);
  font-size: 1.3rem;
  font-weight: bold;
  color: #fff;
}

.comp-sheet-subtitle {
  font-size: 0.85rem;
  color: var(--amber-100);
  font-style: italic;
  margin-top: 2px;
}

.comp-kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border-bottom: 1px solid var(--line);
}

.comp-kpi {
  background: var(--bg-card);
  padding: 0.85rem 1.1rem;
}

.comp-kpi-label {
  font-size: 0.72rem;
  color: var(--ink-500);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.comp-kpi-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--navy-900);
  margin-top: 2px;
}

.comp-supplier-overview {
  background: var(--amber-50);
  border-bottom: 1px solid var(--line);
  padding: 0.9rem 1.4rem;
}

.comp-supplier-overview-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--amber-600);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}

.comp-supplier-overview-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.comp-supplier-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: #fff;
  border: 1px solid var(--amber-500);
  border-radius: 18px;
  padding: 0.32rem 0.85rem;
  font-size: 0.84rem;
  color: var(--navy-900);
}

.comp-supplier-chip .count {
  background: var(--navy-900);
  color: var(--amber-500);
  font-weight: 700;
  font-size: 0.72rem;
  border-radius: 10px;
  padding: 1px 8px;
  margin-left: 2px;
}

.comp-sheet-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}

.comp-sheet-table thead th {
  background: var(--navy-50);
  color: var(--navy-900);
  padding: 0.55rem 0.7rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  border-bottom: 2px solid var(--navy-500);
  font-weight: 700;
  text-align: left;
  position: sticky;
  top: 0;
  z-index: 2;
}

.comp-sheet-table td {
  padding: 0.5rem 0.7rem;
  border-bottom: 1px solid var(--line);
  color: var(--ink-700);
  vertical-align: middle;
}

.comp-sheet-table td.num,
.comp-sheet-table th.num { text-align: right; font-variant-numeric: tabular-nums; }

.comp-sheet-table tr.cat-header td {
  background: var(--navy-900);
  color: #fff;
  padding: 0.5rem 0.9rem;
  font-weight: 600;
  font-size: 0.85rem;
  font-family: var(--f-serif);
  letter-spacing: 0.3px;
}

.comp-sheet-table tr.item-meta td {
  background: var(--amber-50);
  font-weight: 600;
  color: var(--navy-900);
  padding-top: 0.6rem;
  padding-bottom: 0.6rem;
  font-size: 0.86rem;
  border-top: 2px solid var(--amber-500);
}

.comp-sheet-table tr.rank-row td:first-child {
  font-weight: 700;
  font-size: 0.9rem;
  text-align: center;
  width: 50px;
}

.comp-sheet-table tr.rank-row.r1 td { background: #FAFBFD; }
.comp-sheet-table tr.rank-row.r2 td { background: #FFFFFF; }
.comp-sheet-table tr.rank-row.r3 td { background: #FFFFFF; }

.rank-medal { font-size: 1.1rem; }

.variance-pill {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 3px;
  font-size: 0.74rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.variance-pill.best     { background: var(--green-100); color: var(--green-700); }
.variance-pill.neutral  { background: var(--bg-soft);   color: var(--ink-500); }
.variance-pill.worse    { background: #FCEEED;          color: var(--red-700); }

.comp-no-bids {
  background: var(--bg-soft);
  font-style: italic;
  color: var(--ink-500);
  padding: 0.5rem 0.7rem;
}

/* Highlighted column for the active criterion */
.comp-sheet-table td.criterion-highlight,
.comp-sheet-table th.criterion-highlight {
  background: var(--amber-50) !important;
}

.comp-sheet-table tr.rank-row.r1 td.criterion-highlight { background: #FEF0DA !important; }

/* Annotation pin */
.ann-pin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: 1px dashed var(--line);
  border-radius: 5px;
  background: transparent;
  cursor: pointer;
  font-size: 0.95rem;
  color: var(--ink-300);
  transition: all 0.12s ease;
  vertical-align: middle;
}

.ann-pin:hover {
  border-color: var(--amber-500);
  color: var(--amber-600);
  background: var(--amber-50);
}

.ann-pin.has-comment {
  background: var(--amber-100);
  border: 1.5px solid var(--amber-500);
  color: var(--amber-600);
}

.ann-pin.has-comment:hover {
  background: var(--amber-500);
  color: #fff;
}

/* Annotation badge counter */
#globalAnnotationBadge {
  display: inline-block;
  background: var(--amber-500);
  color: var(--navy-900);
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 10px;
  padding: 1px 7px;
  margin-left: 4px;
}

/* Annotation modal */
.annotation-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(13, 34, 64, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 1rem;
}

.annotation-modal {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 580px;
  display: flex;
  flex-direction: column;
  animation: modal-in 0.18s ease-out;
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(-12px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.annotation-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 1.1rem 1.4rem 0.7rem;
  border-bottom: 1px solid var(--line);
}

.annotation-modal h3 {
  font-family: var(--f-serif);
  color: var(--navy-900);
  font-size: 1.1rem;
}

.btn-icon-dark {
  background: transparent;
  border: none;
  font-size: 1.1rem;
  color: var(--ink-500);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
}

.btn-icon-dark:hover { background: var(--bg-soft); color: var(--navy-900); }

.annotation-modal textarea {
  margin: 0.8rem 1.4rem;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-family: var(--f-sans);
  font-size: 0.93rem;
  color: var(--ink-900);
  resize: vertical;
  min-height: 100px;
}

.annotation-modal textarea:focus {
  outline: 2px solid var(--amber-100);
  border-color: var(--amber-500);
}

.annotation-modal-footer {
  display: flex;
  gap: 0.5rem;
  padding: 0.9rem 1.4rem 1.1rem;
  border-top: 1px solid var(--line);
  align-items: center;
}

/* ============================================================
   LOGIN / AUTH SCREEN — Split-screen hero design
   ============================================================ */
.login-shell {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  min-height: 100vh;
  background: var(--navy-900);
}

/* LEFT HERO PANEL */
.login-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-hero-bg {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.login-hero-content {
  position: relative;
  z-index: 1;
  padding: 3.5rem 4rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100vh;
  box-sizing: border-box;
  width: 100%;
  max-width: 700px;
}

.hero-by-line {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-top: 0.4rem;
}

.hero-by {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.5);
  letter-spacing: 2px;
  font-weight: 600;
}

.hero-thembian-logo {
  height: 32px;
  width: auto;
  border-radius: 4px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.35);
}

.hero-wordmark {
  font-family: var(--f-serif);
  font-size: 6.2rem;
  font-weight: bold;
  color: #fff;
  letter-spacing: -3px;
  line-height: 1;
  margin: 0;
  margin-top: auto;
  text-shadow: 0 8px 30px rgba(242,160,92,0.18);
}

.hero-wordmark .amber {
  color: var(--amber-500);
}

.hero-tagline {
  font-family: var(--f-serif);
  font-style: italic;
  font-size: 1.5rem;
  color: rgba(255,255,255,0.85);
  margin: 0.9rem 0 1.4rem;
  line-height: 1.35;
  max-width: 540px;
}

.hero-tagline .amber {
  color: var(--amber-500);
  font-style: normal;
  font-weight: bold;
}

.hero-lede {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.7);
  line-height: 1.55;
  max-width: 520px;
  margin: 0 0 1.6rem;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
  margin-bottom: 1.6rem;
  max-width: 520px;
}

.hero-stat {
  border-left: 2px solid var(--amber-500);
  padding-left: 0.9rem;
}

.hero-stat-value {
  font-family: var(--f-serif);
  font-size: 1.8rem;
  font-weight: bold;
  color: #fff;
  line-height: 1.1;
}

.hero-stat-label {
  font-size: 0.72rem;
  color: rgba(242,160,92,0.85);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-top: 4px;
  font-weight: 600;
}

.hero-trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  align-items: center;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.5);
  margin-bottom: 0.5rem;
}

.hero-trust-row span {
  white-space: nowrap;
}

/* RIGHT FORM PANEL */
.login-form-panel {
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 2.5rem;
  box-sizing: border-box;
  min-height: 100vh;
}

.login-form-inner {
  width: 100%;
  max-width: 420px;
}

.form-title {
  font-family: var(--f-serif);
  font-size: 1.8rem;
  color: var(--navy-900);
  margin: 0 0 0.4rem;
  font-weight: bold;
}

.form-sub {
  color: var(--ink-500);
  font-size: 0.9rem;
  margin: 0 0 1.5rem;
  line-height: 1.5;
}

.login-role-pills {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
  background: var(--bg-soft);
  padding: 0.4rem;
  border-radius: 10px;
  margin-bottom: 1.4rem;
}

.role-pill {
  background: transparent;
  border: none;
  padding: 0.7rem 0.6rem;
  border-radius: 7px;
  cursor: pointer;
  font-family: var(--f-sans);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink-500);
  transition: all 0.12s ease;
  text-align: left;
}

.role-pill:hover {
  color: var(--navy-900);
  background: rgba(255,255,255,0.7);
}

.role-pill.active {
  background: var(--navy-900);
  color: #fff;
  box-shadow: 0 4px 12px rgba(13, 34, 64, 0.22);
}

.pill-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
}

.pill-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.pill-name {
  font-weight: 600;
  font-size: 0.9rem;
}

.pill-meta {
  font-size: 0.7rem;
  opacity: 0.75;
  font-style: italic;
  margin-top: 2px;
}

.login-fields {
  margin-bottom: 1.2rem;
}

.login-fields .form-field {
  margin-bottom: 0.85rem;
}

.login-fields .form-field label {
  display: block;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--navy-900);
  margin-bottom: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.login-fields input,
.login-fields select {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: var(--f-sans);
  font-size: 0.95rem;
  color: var(--ink-900);
  background: #fff;
  box-sizing: border-box;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

.login-fields input:focus,
.login-fields select:focus {
  outline: none;
  border-color: var(--amber-500);
  box-shadow: 0 0 0 3px rgba(242,160,92,0.18);
}

.login-fields input[readonly] {
  background: var(--bg-soft);
  color: var(--ink-500);
  cursor: not-allowed;
}

.login-submit-unified {
  width: 100%;
  padding: 0.85rem;
  font-size: 1rem;
  font-weight: 700;
  background: var(--navy-900);
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.12s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-submit-unified:hover {
  background: #0A1A33;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(13,34,64,0.22);
}

.login-submit-unified:active {
  transform: translateY(0);
}

.login-helper-row {
  display: flex;
  justify-content: center;
  margin-top: 0.8rem;
}

.login-foot-note {
  margin-top: 1.6rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 0.82rem;
  color: var(--ink-500);
}

.login-foot-note a {
  color: var(--amber-600);
  font-weight: 600;
  text-decoration: none;
}

.login-foot-note a:hover {
  color: var(--amber-700);
  text-decoration: underline;
}

/* Responsive — stack vertically on smaller screens */
@media (max-width: 960px) {
  .login-shell {
    grid-template-columns: 1fr;
  }
  .login-hero {
    min-height: 360px;
  }
  .login-hero-content {
    min-height: 360px;
    padding: 2rem;
  }
  .hero-wordmark {
    font-size: 4rem;
  }
  .hero-tagline {
    font-size: 1.2rem;
  }
  .hero-stats {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.8rem;
  }
  .hero-stat-value {
    font-size: 1.3rem;
  }
}

/* ============================================================
   LANDING PAGES (Buyer + Supplier dashboards between login and workflow)
   ============================================================ */
.landing-page {
  background: var(--bg-page);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.landing-hero {
  background: linear-gradient(135deg, var(--navy-900) 0%, #0A1A33 100%);
  padding: 2.5rem 2rem 6rem;
  position: relative;
  overflow: hidden;
}

.landing-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image:
    radial-gradient(circle at 80% 30%, rgba(242,160,92,0.18), transparent 50%),
    radial-gradient(circle at 15% 70%, rgba(242,160,92,0.08), transparent 45%);
  pointer-events: none;
}

.landing-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  flex-wrap: wrap;
}

.landing-greeting {
  color: #fff;
}

.landing-greeting .welcome {
  font-size: 0.78rem;
  color: var(--amber-500);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.landing-greeting h1 {
  font-family: var(--f-serif);
  font-size: 2.4rem;
  font-weight: bold;
  margin: 0 0 0.4rem;
  color: #fff;
  line-height: 1.1;
}

.landing-greeting .subtitle {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.7);
  margin-top: 0.3rem;
  line-height: 1.5;
  max-width: 580px;
}

.landing-greeting .tag-row {
  margin-top: 0.7rem;
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.landing-greeting .greeting-tag {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.18);
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 0.74rem;
  color: rgba(255,255,255,0.85);
}

.landing-logout {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.landing-logout-btn {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  padding: 0.55rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  font-family: var(--f-sans);
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.12s ease;
}

.landing-logout-btn:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.35);
}

/* KPI cards row that floats over the hero */
.landing-kpis {
  max-width: 1280px;
  margin: -3.5rem auto 0;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  position: relative;
  z-index: 2;
}

.landing-kpi {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 1.1rem 1.2rem;
  box-shadow: 0 12px 30px rgba(13,34,64,0.10);
  border: 1px solid var(--line);
}

.landing-kpi-icon {
  font-size: 1.5rem;
  margin-bottom: 0.3rem;
}

.landing-kpi-label {
  font-size: 0.72rem;
  color: var(--ink-500);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  font-weight: 700;
  margin-bottom: 4px;
}

.landing-kpi-value {
  font-family: var(--f-serif);
  font-size: 1.7rem;
  font-weight: bold;
  color: var(--navy-900);
  line-height: 1.1;
}

.landing-kpi-sub {
  font-size: 0.78rem;
  color: var(--ink-500);
  margin-top: 4px;
  font-style: italic;
}

/* Body of the landing — action cards + recent activity */
.landing-body {
  max-width: 1280px;
  margin: 2rem auto 0;
  padding: 0 2rem 3rem;
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 2rem;
}

.landing-section h2 {
  font-family: var(--f-serif);
  font-size: 1.2rem;
  color: var(--navy-900);
  margin: 0 0 0.4rem;
}

.landing-section .section-sub {
  color: var(--ink-500);
  font-size: 0.86rem;
  margin-bottom: 1rem;
}

.landing-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem;
}

.landing-action-card {
  background: #fff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  padding: 1.3rem 1.4rem;
  text-align: left;
  cursor: pointer;
  transition: all 0.14s ease;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  position: relative;
  overflow: hidden;
}

.landing-action-card:hover {
  border-color: var(--amber-500);
  box-shadow: 0 14px 30px rgba(13,34,64,0.10);
  transform: translateY(-2px);
}

.landing-action-card.primary {
  background: linear-gradient(135deg, var(--navy-900) 0%, #0A1A33 100%);
  color: #fff;
  border-color: var(--navy-900);
}

.landing-action-card.primary:hover {
  border-color: var(--amber-500);
  box-shadow: 0 14px 36px rgba(13,34,64,0.30);
}

.landing-action-card.disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.landing-action-card.disabled:hover {
  transform: none;
  border-color: var(--line);
  box-shadow: var(--shadow-sm);
}

.landing-action-icon {
  font-size: 1.8rem;
  width: 48px;
  height: 48px;
  background: var(--amber-50);
  color: var(--navy-900);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.landing-action-card.primary .landing-action-icon {
  background: rgba(242,160,92,0.15);
  color: var(--amber-500);
}

.landing-action-title {
  font-family: var(--f-serif);
  font-size: 1.05rem;
  font-weight: bold;
  color: var(--navy-900);
  margin: 0;
}

.landing-action-card.primary .landing-action-title {
  color: #fff;
}

.landing-action-desc {
  font-size: 0.84rem;
  color: var(--ink-500);
  line-height: 1.45;
  margin: 0;
}

.landing-action-card.primary .landing-action-desc {
  color: rgba(255,255,255,0.7);
}

.landing-action-badge {
  position: absolute;
  top: 14px; right: 14px;
  background: var(--amber-500);
  color: var(--navy-900);
  font-weight: 700;
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 10px;
  letter-spacing: 0.4px;
}

.landing-action-cta {
  margin-top: auto;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--amber-600);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.landing-action-card.primary .landing-action-cta {
  color: var(--amber-500);
}

.landing-action-card.disabled .landing-action-cta {
  color: var(--ink-500);
}

/* Recent activity column */
.landing-activity {
  background: #fff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  padding: 1.3rem;
}

.activity-item {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--line);
}

.activity-item:last-child { border-bottom: none; }

.activity-icon {
  width: 30px;
  height: 30px;
  background: var(--bg-soft);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.activity-icon.success { background: var(--green-100); }
.activity-icon.warn { background: var(--amber-100); }

.activity-content {
  flex: 1;
}

.activity-text {
  font-size: 0.88rem;
  color: var(--ink-900);
  line-height: 1.4;
}

.activity-text strong { color: var(--navy-900); }

.activity-meta {
  font-size: 0.74rem;
  color: var(--ink-500);
  margin-top: 2px;
}

@media (max-width: 960px) {
  .landing-kpis { grid-template-columns: repeat(2, 1fr); }
  .landing-body { grid-template-columns: 1fr; }
  .landing-actions { grid-template-columns: 1fr; }
}

/* ============================================================
   SUPPLIER PORTAL
   ============================================================ */
#supplierApp .user-pill.supplier-pill .user-avatar {
  background: var(--amber-500);
  color: var(--navy-900);
}

/* RFQ Inbox cards */
.rfq-inbox-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-left: 4px solid var(--amber-500);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  margin-bottom: 0.8rem;
  padding: 1.1rem 1.3rem;
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 1.2rem;
  align-items: center;
  cursor: pointer;
  transition: all 0.14s ease;
}

.rfq-inbox-card:hover {
  border-color: var(--amber-500);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.rfq-inbox-card.submitted {
  border-left-color: var(--green-700);
  opacity: 0.95;
}

.rfq-inbox-card.declined {
  border-left-color: var(--red-700);
  opacity: 0.7;
}

.rfq-inbox-status {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.7rem;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  white-space: nowrap;
}

.rfq-inbox-status.active     { background: var(--amber-100); color: var(--amber-600); }
.rfq-inbox-status.submitted  { background: var(--green-100); color: var(--green-700); }
.rfq-inbox-status.declined   { background: var(--red-100);   color: var(--red-700); }

.rfq-inbox-meta-block .rfq-inbox-title {
  font-family: var(--f-serif);
  font-size: 1.1rem;
  font-weight: bold;
  color: var(--navy-900);
}

.rfq-inbox-meta-block .rfq-inbox-sub {
  font-size: 0.82rem;
  color: var(--ink-500);
  margin-top: 2px;
}

.rfq-inbox-stat {
  text-align: right;
  font-size: 0.78rem;
  color: var(--ink-500);
}

.rfq-inbox-stat-value {
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy-900);
  font-variant-numeric: tabular-nums;
}

.rfq-inbox-cta {
  background: var(--navy-900);
  color: #fff;
  padding: 0.5rem 0.9rem;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
}

/* RFQ Detail */
.supp-rfq-banner {
  background: var(--navy-900);
  color: #fff;
  padding: 1.2rem 1.5rem;
  border-radius: var(--radius-lg);
  margin-bottom: 1rem;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 1.5rem;
  align-items: center;
}

.supp-rfq-banner-block .label {
  font-size: 0.72rem;
  color: var(--amber-500);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.supp-rfq-banner-block .value {
  font-family: var(--f-serif);
  font-size: 1rem;
  font-weight: bold;
  margin-top: 2px;
}

.supp-rfq-banner-block .value.big {
  font-size: 1.3rem;
}

.read-only-banner {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.7rem 1rem;
  background: var(--amber-50);
  border: 1px solid var(--amber-500);
  border-radius: 7px;
  margin-bottom: 1rem;
  font-size: 0.88rem;
  color: var(--amber-700);
}

.read-only-banner .icon { font-size: 1.1rem; }

/* RFQ items table (read-only) */
.rfq-items-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}

.rfq-items-table thead th {
  background: var(--navy-50);
  color: var(--navy-900);
  padding: 0.6rem 0.7rem;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  border-bottom: 2px solid var(--navy-500);
  font-weight: 700;
  text-align: left;
}

.rfq-items-table td {
  padding: 0.5rem 0.7rem;
  border-bottom: 1px solid var(--line);
}

.rfq-items-table td.num,
.rfq-items-table th.num { text-align: right; font-variant-numeric: tabular-nums; }

.rfq-items-table tr.cat-divider-row td {
  background: var(--navy-900);
  color: #fff;
  font-weight: 600;
  padding: 0.5rem 0.9rem;
  font-family: var(--f-serif);
}

.rfq-items-table tr.item-row:hover {
  background: var(--bg-soft);
}

.spec-link {
  color: var(--amber-600);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px dashed currentColor;
}

.spec-link:hover {
  color: var(--amber-700);
  border-bottom-style: solid;
}

.spec-link::after {
  content: ' ↗';
  font-size: 0.85em;
}

/* Q&A thread */
.qa-thread {
  margin-top: 0.8rem;
}

.qa-message {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 0.7rem;
  padding: 0.9rem 1rem;
  border-radius: 8px;
  margin-bottom: 0.7rem;
}

.qa-message.question {
  background: var(--bg-soft);
  border-left: 3px solid var(--navy-900);
}

.qa-message.answer {
  background: var(--amber-50);
  border-left: 3px solid var(--amber-500);
  margin-left: 2rem;
}

.qa-avatar {
  width: 36px;
  height: 36px;
  background: var(--navy-900);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
}

.qa-message.answer .qa-avatar {
  background: var(--amber-500);
  color: var(--navy-900);
}

.qa-meta {
  font-size: 0.78rem;
  color: var(--ink-500);
  margin-bottom: 0.25rem;
}

.qa-meta strong { color: var(--navy-900); }

.qa-tag {
  display: inline-block;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 1px 6px;
  font-size: 0.7rem;
  font-weight: 600;
  margin-left: 4px;
}

.qa-tag.item { background: var(--amber-100); border-color: var(--amber-500); color: var(--amber-700); }
.qa-tag.global { background: var(--navy-50); color: var(--navy-900); }

.qa-body {
  color: var(--ink-900);
  line-height: 1.5;
  font-size: 0.92rem;
}

.qa-attachment {
  margin-top: 0.5rem;
  font-size: 0.82rem;
  color: var(--ink-500);
}

.qa-attachment a {
  color: var(--amber-600);
  text-decoration: none;
  font-weight: 600;
}

.qa-pending-pill {
  display: inline-block;
  background: var(--bg-soft);
  color: var(--ink-500);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 1px 7px;
  font-size: 0.7rem;
  font-weight: 600;
  margin-left: 6px;
}

.qa-compose {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1rem;
  margin-top: 1rem;
}

.qa-compose-row {
  display: flex;
  gap: 0.7rem;
  margin-bottom: 0.6rem;
  align-items: center;
}

.qa-compose-row select,
.qa-compose-row input[type="file"] {
  padding: 0.5rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 5px;
  font-family: var(--f-sans);
  font-size: 0.88rem;
}

.qa-compose textarea {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-family: var(--f-sans);
  font-size: 0.92rem;
  resize: vertical;
  min-height: 80px;
  box-sizing: border-box;
}

/* FAQs accordion */
.faq-category {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  margin-bottom: 0.7rem;
  overflow: hidden;
}

.faq-category-title {
  background: var(--navy-50);
  padding: 0.7rem 1rem;
  font-family: var(--f-serif);
  font-weight: bold;
  color: var(--navy-900);
  border-bottom: 1px solid var(--line);
}

.faq-item {
  border-bottom: 1px solid var(--line);
}

.faq-item:last-child { border-bottom: none; }

.faq-question {
  padding: 0.85rem 1rem;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-weight: 600;
  color: var(--navy-900);
  font-size: 0.92rem;
}

.faq-question:hover { background: var(--bg-soft); }

.faq-chevron {
  margin-left: auto;
  color: var(--ink-500);
  transition: transform 0.18s ease;
}

.faq-item.open .faq-chevron { transform: rotate(90deg); }

.faq-answer {
  display: none;
  padding: 0 1rem 1rem 2.2rem;
  color: var(--ink-700);
  line-height: 1.55;
  font-size: 0.9rem;
  border-top: 1px dashed var(--line);
  margin-top: 0;
  padding-top: 0.7rem;
}

.faq-item.open .faq-answer { display: block; }

/* Quotation Template */
.quot-context-bar {
  background: var(--navy-900);
  color: #fff;
  padding: 0.9rem 1.3rem;
  border-radius: var(--radius-lg);
  margin-bottom: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.quot-context-bar .ctx-label {
  font-size: 0.72rem;
  color: var(--amber-500);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.quot-context-bar .ctx-value {
  font-family: var(--f-serif);
  font-weight: bold;
  font-size: 1rem;
}

.quot-table-wrap {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: 1rem;
}

.quot-section-head {
  background: var(--amber-50);
  border-bottom: 1px solid var(--amber-500);
  padding: 0.8rem 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.quot-section-head .num {
  width: 28px;
  height: 28px;
  background: var(--amber-500);
  color: var(--navy-900);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
}

.quot-section-head .title {
  font-family: var(--f-serif);
  font-weight: bold;
  color: var(--navy-900);
  font-size: 1rem;
}

.quot-section-head .subtitle {
  color: var(--ink-500);
  font-size: 0.82rem;
  margin-left: auto;
}

.quot-items-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}

.quot-items-table thead th {
  background: var(--navy-50);
  color: var(--navy-900);
  padding: 0.5rem 0.6rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  border-bottom: 2px solid var(--navy-500);
  font-weight: 700;
  text-align: left;
  white-space: nowrap;
}

.quot-items-table tbody td {
  padding: 0.4rem 0.5rem;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.quot-items-table tbody td.num,
.quot-items-table thead th.num { text-align: right; }

.quot-items-table tr.cat-divider-row td {
  background: var(--navy-900);
  color: #fff;
  font-weight: 600;
  padding: 0.45rem 0.9rem;
  font-family: var(--f-serif);
  font-size: 0.88rem;
}

.quot-input {
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0.32rem 0.45rem;
  font-family: var(--f-sans);
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
  width: 100%;
  box-sizing: border-box;
}

.quot-input:focus {
  outline: 2px solid var(--amber-100);
  border-color: var(--amber-500);
}

.quot-input.num { text-align: right; }

.quot-input.has-value {
  background: var(--amber-50);
  border-color: var(--amber-500);
  font-weight: 600;
  color: var(--navy-900);
}

select.quot-input {
  padding: 0.32rem 0.4rem;
  background: #fff;
}

/* Aggregate panel */
.quot-aggregate {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  margin-bottom: 1rem;
  overflow: hidden;
}

.quot-aggregate-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
}

.quot-agg-row {
  display: grid;
  grid-template-columns: 180px 1fr;
  background: var(--bg-card);
  align-items: center;
  padding: 0.65rem 1rem;
  gap: 1rem;
}

.quot-agg-row .agg-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--navy-900);
}

.quot-agg-row.computed {
  background: var(--amber-50);
}

.quot-agg-row.computed .agg-label {
  color: var(--amber-700);
}

.quot-agg-row.total {
  background: var(--navy-900);
  color: #fff;
}

.quot-agg-row.total .agg-label,
.quot-agg-row.total .agg-value-display {
  color: #fff;
}

.agg-value-display {
  font-family: var(--f-serif);
  font-weight: bold;
  font-size: 1.05rem;
  color: var(--navy-900);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.quot-actions-row {
  background: var(--bg-soft);
  padding: 1rem 1.3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
}

.quot-summary-pills {
  display: flex;
  gap: 0.7rem;
}

.quot-summary-pill {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.45rem 0.85rem;
  font-size: 0.85rem;
}

.quot-summary-pill .num {
  font-weight: 700;
  color: var(--navy-900);
  margin-left: 4px;
  font-variant-numeric: tabular-nums;
}

/* My Documents */
.doc-upload-zone {
  border: 2px dashed var(--amber-500);
  border-radius: var(--radius-lg);
  background: var(--amber-50);
  padding: 2rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.14s ease;
  margin-bottom: 1rem;
}

.doc-upload-zone:hover {
  background: var(--amber-100);
}

.doc-upload-zone.dragover {
  border-color: var(--amber-700);
  background: var(--amber-100);
}

.doc-upload-icon {
  font-size: 2.4rem;
  margin-bottom: 0.5rem;
}

.doc-upload-text {
  color: var(--navy-900);
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.doc-upload-hint {
  color: var(--ink-500);
  font-size: 0.82rem;
}

/* ============================================================
   SELECTED-STRATEGY ACTION CARD (Scenarios tab → Continue CTA)
   ============================================================ */
.selection-action-card {
  background: var(--navy-900);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 30px rgba(13, 34, 64, 0.25);
  margin-top: 1rem;
  position: sticky;
  bottom: 1rem;
  z-index: 12;
  overflow: hidden;
  border: 1px solid var(--navy-900);
}

.selection-action-inner {
  padding: 1rem 1.4rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.4rem;
  flex-wrap: wrap;
}

.selection-badge {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  color: #fff;
}

.selection-tick {
  width: 38px;
  height: 38px;
  background: var(--amber-500);
  color: var(--navy-900);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.15rem;
  flex-shrink: 0;
}

.selection-label {
  font-size: 0.7rem;
  color: var(--amber-500);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 700;
}

.selection-name {
  font-family: var(--f-serif);
  font-weight: bold;
  font-size: 1.2rem;
  color: #fff;
}

.selection-meta {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.65);
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
}

.selection-action-card .btn-primary {
  background: var(--amber-500);
  color: var(--navy-900);
  border-color: var(--amber-500);
  font-weight: 700;
}

.selection-action-card .btn-primary:hover {
  background: var(--amber-600);
  border-color: var(--amber-600);
}

.selection-action-card .btn-secondary {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.35);
}

.selection-action-card .btn-secondary:hover {
  background: rgba(255,255,255,0.08);
  border-color: #fff;
}

/* ============================================================
   FINAL FoP — VIEW TOGGLE + SUPPLIER-WISE PANEL
   ============================================================ */
.view-toggle {
  display: flex;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  padding: 0.35rem;
  gap: 0.3rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-sm);
  max-width: max-content;
}

.view-toggle-btn {
  background: transparent;
  border: none;
  padding: 0.55rem 1rem;
  border-radius: var(--radius);
  cursor: pointer;
  font-family: var(--f-sans);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink-500);
  white-space: nowrap;
  transition: all 0.12s ease;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.view-toggle-btn:hover {
  color: var(--navy-900);
  background: var(--bg-soft);
}

.view-toggle-btn.active {
  background: var(--navy-900);
  color: #fff;
}

.view-toggle-hint {
  color: var(--ink-300);
  font-weight: 400;
  font-style: italic;
  font-size: 0.82rem;
}

.view-toggle-btn.active .view-toggle-hint {
  color: rgba(255,255,255,0.65);
}

/* Supplier-wise cards */
.supplier-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 1rem 1.2rem;
  margin-bottom: 0.65rem;
  display: grid;
  grid-template-columns: 50px 1fr auto;
  gap: 1.2rem;
  align-items: center;
  transition: box-shadow 0.14s ease;
}

.supplier-card:hover {
  box-shadow: var(--shadow-md);
}

.supplier-card.top-3 {
  border-left: 4px solid var(--amber-500);
}

.supplier-card.top-3.rank-1 {
  background: linear-gradient(to right, #FEF5EA, var(--bg-card) 35%);
}

.supplier-rank {
  font-family: var(--f-serif);
  font-size: 1.6rem;
  font-weight: bold;
  color: var(--ink-500);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
}

.supplier-rank .medal {
  font-size: 1.7rem;
  margin-bottom: 2px;
}

.supplier-rank .rank-label {
  font-size: 0.7rem;
  color: var(--ink-500);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 700;
}

.supplier-info-block .name {
  font-family: var(--f-serif);
  font-size: 1.05rem;
  font-weight: bold;
  color: var(--navy-900);
}

.supplier-info-block .meta {
  font-size: 0.78rem;
  color: var(--ink-500);
  margin-top: 2px;
}

.supplier-info-block .tags {
  margin-top: 0.4rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.supplier-tag {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1px 7px;
  font-size: 0.72rem;
  color: var(--ink-700);
}

.supplier-tag.primary {
  background: var(--amber-100);
  border-color: var(--amber-500);
  color: var(--amber-700);
}

.supplier-metrics {
  display: grid;
  grid-template-columns: repeat(5, auto);
  gap: 1.4rem;
  align-items: center;
}

.sm-cell {
  text-align: right;
}

.sm-cell .lbl {
  font-size: 0.7rem;
  color: var(--ink-500);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.sm-cell .val {
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy-900);
  font-variant-numeric: tabular-nums;
  margin-top: 2px;
}

.sm-cell .val.score {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 4px;
  background: var(--green-100);
  color: var(--green-700);
}

.sm-cell .val.score.warn {
  background: var(--amber-100);
  color: var(--amber-700);
}

.sm-cell .val.score.bad {
  background: var(--red-100);
  color: var(--red-700);
}

/* ============================================================
   APPROVAL PACKAGE SUMMARY (Send for Approval ack)
   ============================================================ */
.approval-package-summary {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  margin-top: 1rem;
  overflow: hidden;
}

.aps-head {
  background: var(--navy-50);
  padding: 0.7rem 1.1rem;
  border-bottom: 1px solid var(--line);
  font-family: var(--f-serif);
  font-weight: bold;
  color: var(--navy-900);
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.aps-head .aps-pill {
  background: var(--amber-500);
  color: var(--navy-900);
  font-weight: 700;
  font-size: 0.7rem;
  letter-spacing: 0.4px;
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  margin-left: auto;
}

.aps-section {
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid var(--line);
}

.aps-section:last-child { border-bottom: none; }

.aps-section-label {
  font-size: 0.7rem;
  color: var(--ink-500);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.aps-strategy-block {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.aps-strategy-letter {
  width: 36px;
  height: 36px;
  background: var(--navy-900);
  color: var(--amber-500);
  font-family: var(--f-serif);
  font-weight: bold;
  font-size: 1.1rem;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.aps-strategy-name {
  font-family: var(--f-serif);
  font-weight: bold;
  color: var(--navy-900);
  font-size: 1rem;
}

.aps-strategy-rule {
  color: var(--ink-500);
  font-size: 0.82rem;
  font-style: italic;
  margin-top: 2px;
}

.aps-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  margin-top: 0.4rem;
}

.aps-stat .lbl {
  font-size: 0.7rem;
  color: var(--ink-500);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.aps-stat .val {
  font-family: var(--f-serif);
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--navy-900);
  font-variant-numeric: tabular-nums;
}

.aps-suppliers {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.aps-supplier-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0.3rem 0.8rem;
  font-size: 0.85rem;
}

.aps-supplier-chip.top {
  background: var(--amber-50);
  border-color: var(--amber-500);
}

.aps-supplier-chip .chip-rank {
  font-weight: 700;
  color: var(--amber-700);
}

.aps-supplier-chip .chip-meta {
  color: var(--ink-500);
  font-size: 0.76rem;
  margin-left: 3px;
}

.aps-category-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.aps-cat-pill {
  background: var(--navy-50);
  color: var(--navy-900);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 0.78rem;
}

.aps-cat-pill .count {
  background: var(--navy-900);
  color: var(--amber-500);
  border-radius: 3px;
  padding: 1px 5px;
  font-size: 0.7rem;
  font-weight: 700;
  margin-left: 4px;
}

/* ============================================================
   FOOTER + TOAST
   ============================================================ */
.footer {
  display: flex;
  justify-content: space-between;
  padding: 1.2rem 1.6rem;
  border-top: 1px solid var(--line);
  margin-top: 2rem;
  background: #fff;
}
.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 100;
}
.toast {
  background: var(--navy-900);
  color: #fff;
  padding: 0.7rem 1.1rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  font-size: 0.88rem;
  animation: toast-in 0.25s ease;
}
.toast.success { background: var(--green-700); }
.toast.warn    { background: var(--amber-600); }
.toast.error   { background: var(--red-700); }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* =================================================================
   KF2 — EDITORIAL LOGIN + LANDING REDESIGN
   Appended at end of stylesheet so these rules win the cascade
   over any earlier .login-* / .landing-* / .role-pill rules.
   ================================================================= */

:root {
  --kf2-navy:        #0D2240;
  --kf2-navy-soft:   #1A3358;
  --kf2-navy-deep:   #050D1F;
  --kf2-amber:       #F2A05C;
  --kf2-amber-soft:  #F4B57A;
  --kf2-amber-deep:  #C97935;
  --kf2-bone:        #F4EEE2;
  --kf2-bone-soft:   #EAE3D4;
  --kf2-bone-edge:   #DDD5C2;
  --kf2-ink:         #0D2240;
  --kf2-ink-mute:    rgba(13, 34, 64, 0.65);
  --kf2-ink-soft:    rgba(13, 34, 64, 0.45);
  --kf2-rule:        rgba(13, 34, 64, 0.14);
  --kf2-rule-soft:   rgba(13, 34, 64, 0.06);
}

/* Force the body background bone when login/landing is showing */
body:has(#loginApp:not([hidden])),
body:has(#buyerLandingApp:not([hidden])),
body:has(#supplierLandingApp:not([hidden])) {
  background: var(--kf2-bone);
}

/* Scoped reset for KF2 surfaces */
#loginApp .kf2-login-shell *,
#buyerLandingApp .kf2-landing *,
#supplierLandingApp .kf2-landing * {
  box-sizing: border-box;
}

/* ========== LOGIN ============================================== */

.kf2-login-shell {
  font-family: 'DM Sans', sans-serif;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  min-height: 100vh;
  background: var(--kf2-bone);
  color: var(--kf2-ink);
  -webkit-font-smoothing: antialiased;
  position: relative;
  overflow: hidden;
}

/* Grain overlay over entire login */
.kf2-login-shell::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: 0.28;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* THEATRE (left) */
.kf2-theatre {
  position: relative;
  overflow: hidden;
  background: var(--kf2-navy-deep);
}
.kf2-scene {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.06);
  transition: opacity 1.1s cubic-bezier(.22,.61,.36,1), transform 8s cubic-bezier(.22,.61,.36,1);
}
.kf2-scene.kf2-active {
  opacity: 1;
  transform: scale(1.0);
}
.kf2-scene--buyer    { background-image: url("scene-buyer.jpg"); }
.kf2-scene--supplier { background-image: url("scene-supplier.jpg"); }

/* Navy + warmth tint over the photograph */
.kf2-theatre::before {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(5,13,31,0.55) 0%, rgba(13,34,64,0.30) 28%, rgba(13,34,64,0.30) 60%, rgba(5,13,31,0.92) 100%),
    linear-gradient(90deg, rgba(5,13,31,0.55) 0%, rgba(13,34,64,0) 40%),
    radial-gradient(circle at 80% 30%, rgba(242,160,92,0.18), transparent 50%);
  z-index: 2;
  pointer-events: none;
}

.kf2-theatre-content {
  position: relative;
  z-index: 3;
  min-height: 100vh;
  padding: 48px 60px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: var(--kf2-bone);
}

.kf2-edition {
  position: absolute;
  left: 30px;
  top: 50%;
  transform: translateY(-50%) rotate(-90deg);
  transform-origin: left center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.3em;
  color: var(--kf2-bone);
  opacity: 0.6;
  white-space: nowrap;
  z-index: 4;
}

/* MASTHEAD (KinFast prominent) */
.kf2-brandlock { max-width: 640px; }
.kf2-by-line {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  padding: 6px 14px 6px 12px;
  background: rgba(13, 34, 64, 0.55);
  border: 1px solid rgba(242, 160, 92, 0.25);
  border-radius: 999px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.kf2-by-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--kf2-amber-soft);
  opacity: 0.9;
}
.kf2-thembian-logo {
  height: 22px;
  width: auto;
  display: block;
  border-radius: 3px;
}
.kf2-thembian-logo--small { height: 16px; }

.kf2-wordmark {
  font-family: 'Instrument Serif', serif;
  font-size: 132px;
  font-weight: 400;
  line-height: 0.88;
  letter-spacing: -0.04em;
  color: var(--kf2-bone);
  margin: 0;
}
.kf2-wordmark em {
  font-style: italic;
  color: var(--kf2-amber);
}
.kf2-tagline {
  font-family: 'Instrument Serif', serif;
  font-size: 28px;
  font-style: italic;
  font-weight: 400;
  line-height: 1.2;
  margin-top: 24px;
  color: var(--kf2-bone);
  opacity: 0.92;
}
.kf2-tagline em {
  color: var(--kf2-amber);
  font-style: italic;
}
.kf2-lede {
  margin-top: 20px;
  font-size: 15px;
  line-height: 1.55;
  opacity: 0.78;
  max-width: 480px;
  color: var(--kf2-bone);
}

/* EPIGRAPH bottom */
.kf2-epigraph {
  max-width: 560px;
}
.kf2-epigraph-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid rgba(244, 238, 226, 0.18);
  border-bottom: 1px solid rgba(244, 238, 226, 0.18);
  padding: 22px 0;
}
.kf2-estat {
  padding-left: 18px;
  border-left: 1px solid rgba(244, 238, 226, 0.18);
}
.kf2-estat:first-child { border-left: 0; padding-left: 0; }
.kf2-estat-num {
  font-family: 'Instrument Serif', serif;
  font-size: 44px;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--kf2-bone);
}
.kf2-estat-num small {
  font-size: 22px;
  margin-left: 3px;
  opacity: 0.7;
}
.kf2-estat-lbl {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--kf2-amber-soft);
  opacity: 0.85;
  margin-top: 10px;
}

.kf2-trust-row {
  margin-top: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--kf2-bone);
  opacity: 0.7;
}
.kf2-trust-dot {
  width: 3px; height: 3px;
  background: var(--kf2-amber);
  border-radius: 50%;
}

/* ATRIUM (right) */
.kf2-atrium {
  position: relative;
  background: var(--kf2-bone);
  display: flex;
  flex-direction: column;
  padding: 44px 60px;
  min-height: 100vh;
}

.kf2-atrium-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8vh;
}
.kf2-top-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--kf2-ink);
  opacity: 0.6;
}
.kf2-top-help {
  font-size: 13px;
  color: var(--kf2-ink-mute);
}
.kf2-top-link {
  color: var(--kf2-ink);
  text-decoration: none;
  border-bottom: 1px solid var(--kf2-ink);
  padding-bottom: 1px;
  transition: color 0.2s, border-color 0.2s;
}
.kf2-top-link:hover { color: var(--kf2-amber-deep); border-color: var(--kf2-amber-deep); }

.kf2-form-wrap {
  max-width: 460px;
  width: 100%;
  margin: 0 auto;
  flex: 1;
}

.kf2-step-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--kf2-navy);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.kf2-step-label::before {
  content: ""; width: 24px; height: 1px; background: var(--kf2-navy);
}

.kf2-headline {
  font-family: 'Instrument Serif', serif;
  font-size: 56px;
  line-height: 1.0;
  font-weight: 400;
  letter-spacing: -0.015em;
  margin: 0 0 14px;
  color: var(--kf2-ink);
}
.kf2-verb {
  font-style: italic;
  color: var(--kf2-navy);
  transition: color 0.4s;
}
.kf2-verb.kf2-verb--supplier { color: var(--kf2-amber-deep); }

.kf2-sub {
  color: var(--kf2-ink-mute);
  font-size: 15px;
  line-height: 1.55;
  margin: 0 0 36px;
  max-width: 420px;
}

/* Role toggle (custom on top of native .role-pill) */
.kf2-role-toggle {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--kf2-bone-soft);
  border: 1px solid var(--kf2-bone-edge);
  border-radius: 6px;
  padding: 4px;
  margin-bottom: 32px;
  gap: 0;
}
.kf2-role-thumb {
  position: absolute;
  top: 4px; bottom: 4px;
  left: 4px;
  width: calc(50% - 4px);
  background: var(--kf2-navy);
  border-radius: 4px;
  transition: left 0.45s cubic-bezier(.65,0,.35,1), background 0.45s;
  z-index: 0;
}
.kf2-role-toggle.kf2-supplier-active .kf2-role-thumb {
  left: 50%;
  background: var(--kf2-navy);
}

/* Override the default .role-pill style inside our toggle */
.kf2-role-toggle .role-pill {
  position: relative;
  z-index: 1;
  background: none;
  border: 0;
  padding: 14px 16px;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 10px;
  align-items: baseline;
  text-align: left;
  color: var(--kf2-ink);
  opacity: 0.55;
  transition: color 0.3s, opacity 0.3s;
  min-width: 0;
}
.kf2-role-toggle .role-pill.active {
  color: var(--kf2-bone);
  opacity: 1;
}
.kf2-role-num {
  grid-row: 1 / span 2;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  opacity: 0.75;
  align-self: center;
}
.kf2-role-name {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.kf2-role-meta {
  font-size: 10px;
  letter-spacing: 0.02em;
  opacity: 0.7;
  font-family: 'JetBrains Mono', monospace;
  text-transform: uppercase;
}

/* Fields */
.kf2-fields { margin-bottom: 20px; }
.kf2-field { position: relative; margin-bottom: 22px; }
.kf2-field-label {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--kf2-ink);
  opacity: 0.6;
  margin-bottom: 10px;
}
.kf2-field-input {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--kf2-rule);
  padding: 8px 0 12px;
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  color: var(--kf2-ink);
  outline: none;
  transition: border-color 0.3s;
  border-radius: 0;
  -webkit-appearance: none;
  appearance: none;
}
.kf2-field-input:focus { border-bottom-color: var(--kf2-ink); }
.kf2-field-input[type="email"]:read-only { opacity: 0.6; cursor: not-allowed; }
select.kf2-field-input {
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%230D2240' stroke-width='1.4' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 2px center;
  padding-right: 24px;
  cursor: pointer;
}

/* Submit button */
.kf2-submit {
  width: 100%;
  background: var(--kf2-navy);
  color: var(--kf2-bone);
  border: 0;
  padding: 20px 24px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.3s, color 0.3s;
  border-radius: 4px;
  margin-top: 4px;
}
.kf2-submit:hover { background: var(--kf2-amber-deep); }
.kf2-submit-arrow { transition: transform 0.3s; }
.kf2-submit:hover .kf2-submit-arrow { transform: translateX(6px); }

.kf2-helper-row {
  margin-top: 18px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--kf2-ink);
  opacity: 0.5;
  text-align: center;
}

.kf2-atrium-foot {
  display: flex;
  justify-content: space-between;
  padding-top: 32px;
  border-top: 1px solid var(--kf2-rule);
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--kf2-ink);
  opacity: 0.55;
  margin-top: 32px;
}

/* Reveal animations on login */
.kf2-brandlock,
.kf2-epigraph,
.kf2-atrium-top,
.kf2-step-label,
.kf2-headline,
.kf2-sub,
.kf2-role-toggle,
#buyerLoginPane,
#supplierLoginPane,
.kf2-submit,
.kf2-helper-row,
.kf2-atrium-foot {
  opacity: 0;
  transform: translateY(14px);
  animation: kf2Rise 0.9s cubic-bezier(.22,.61,.36,1) forwards;
}
.kf2-brandlock     { animation-delay: 0.1s; }
.kf2-epigraph      { animation-delay: 0.5s; }
.kf2-atrium-top    { animation-delay: 0.1s; }
.kf2-step-label    { animation-delay: 0.2s; }
.kf2-headline      { animation-delay: 0.3s; }
.kf2-sub           { animation-delay: 0.4s; }
.kf2-role-toggle   { animation-delay: 0.5s; }
#buyerLoginPane,
#supplierLoginPane { animation-delay: 0.6s; }
.kf2-submit        { animation-delay: 0.7s; }
.kf2-helper-row    { animation-delay: 0.8s; }
.kf2-atrium-foot   { animation-delay: 0.85s; }
@keyframes kf2Rise { to { opacity: 1; transform: translateY(0); } }

/* ========== LANDING (shared by buyer + supplier) ============== */

.kf2-landing {
  font-family: 'DM Sans', sans-serif;
  background: var(--kf2-bone);
  color: var(--kf2-ink);
  min-height: 100vh;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

.kf2-landing::after {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 200;
  opacity: 0.22;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* NAV */
.kf2-lnav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(244, 238, 226, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--kf2-bone-edge);
}
.kf2-lnav-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 16px 48px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 32px;
}
.kf2-lnav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.kf2-lnav-wordmark {
  font-family: 'Instrument Serif', serif;
  font-size: 28px;
  letter-spacing: -0.01em;
  color: var(--kf2-ink);
  line-height: 1;
}
.kf2-lnav-wordmark em {
  font-style: italic;
  color: var(--kf2-navy);
}
.kf2-landing--supplier .kf2-lnav-wordmark em {
  color: var(--kf2-amber-deep);
}
.kf2-lnav-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--kf2-navy);
  border: 1px solid var(--kf2-navy);
  padding: 4px 8px;
  border-radius: 2px;
}
.kf2-lnav-tag--supplier {
  color: var(--kf2-amber-deep);
  border-color: var(--kf2-amber-deep);
}
.kf2-lnav-by {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-self: start;
  padding-left: 24px;
  border-left: 1px solid var(--kf2-rule);
}
.kf2-lnav-by .kf2-by-label {
  color: var(--kf2-ink);
  opacity: 0.6;
}
.kf2-lnav-user {
  display: flex;
  align-items: center;
  gap: 16px;
}
.kf2-lnav-user-info {
  text-align: right;
}
.kf2-lnav-name {
  font-family: 'Instrument Serif', serif;
  font-size: 18px;
  line-height: 1.1;
  color: var(--kf2-ink);
}
.kf2-lnav-sub {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--kf2-ink);
  opacity: 0.55;
  margin-top: 4px;
}
.kf2-lnav-avatar {
  width: 38px; height: 38px;
  background: var(--kf2-navy);
  color: var(--kf2-bone);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Instrument Serif', serif;
  font-size: 17px;
}
.kf2-lnav-avatar--supplier { background: var(--kf2-amber-deep); }
.kf2-lnav-logout {
  width: 38px; height: 38px;
  background: transparent;
  border: 1px solid var(--kf2-bone-edge);
  border-radius: 50%;
  color: var(--kf2-ink);
  font-size: 14px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.kf2-lnav-logout:hover {
  border-color: var(--kf2-navy);
  background: var(--kf2-navy);
  color: var(--kf2-bone);
}

/* HERO */
.kf2-lhero {
  max-width: 1440px;
  margin: 0 auto;
  padding: 56px 48px 28px;
}
.kf2-lhero-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}
.kf2-breadcrumb,
.kf2-lhero-date {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--kf2-ink);
  opacity: 0.55;
}
.kf2-breadcrumb span { color: var(--kf2-navy); opacity: 1; }
.kf2-breadcrumb--supplier span { color: var(--kf2-amber-deep); }

.kf2-lhero-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 48px;
  align-items: end;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--kf2-rule);
}
.kf2-lhero-headline {
  font-family: 'Instrument Serif', serif;
  font-size: 88px;
  line-height: 0.96;
  letter-spacing: -0.02em;
  font-weight: 400;
  color: var(--kf2-ink);
  margin: 0;
}
.kf2-lhero-headline em {
  font-style: italic;
  color: var(--kf2-navy);
}
.kf2-lhero-headline--supplier em { color: var(--kf2-amber-deep); }

.kf2-lhero-sub {
  color: var(--kf2-ink-mute);
  font-size: 16px;
  line-height: 1.55;
  margin: 0 0 18px;
  max-width: 460px;
}

.kf2-tag-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Restyle the JS-injected .greeting-tag */
.kf2-landing .greeting-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid var(--kf2-rule);
  color: var(--kf2-ink);
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  letter-spacing: 0.01em;
  padding: 6px 12px;
  border-radius: 999px;
  opacity: 0.85;
}

/* IMAGE STRIP */
.kf2-lstrip {
  margin: 36px 48px 0;
  height: 220px;
  background-size: cover;
  background-position: center 40%;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  padding: 0 48px;
  border-radius: 4px;
}
.kf2-lstrip--buyer {
  background-image:
    linear-gradient(90deg, rgba(5,13,31,0.75) 0%, rgba(5,13,31,0.15) 55%),
    url("scene-buyer.jpg");
}
.kf2-lstrip--supplier {
  background-image:
    linear-gradient(90deg, rgba(5,13,31,0.78) 0%, rgba(5,13,31,0.20) 55%),
    url("scene-supplier.jpg");
}
.kf2-lstrip-content {
  color: var(--kf2-bone);
  max-width: 560px;
  position: relative;
  z-index: 2;
}
.kf2-lstrip-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  margin-bottom: 12px;
  color: var(--kf2-amber-soft);
  display: flex;
  align-items: center;
  gap: 10px;
}
.kf2-lstrip-label::before {
  content: ""; width: 24px; height: 1px; background: var(--kf2-amber-soft);
}
.kf2-lstrip-title {
  font-family: 'Instrument Serif', serif;
  font-size: 32px;
  line-height: 1.1;
  margin: 0 0 8px;
}
.kf2-lstrip-title em {
  font-style: italic;
  color: var(--kf2-amber-soft);
}
.kf2-lstrip-sub {
  font-size: 14px;
  opacity: 0.85;
  max-width: 440px;
}

/* SECTIONS */
.kf2-lsection {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 48px;
}
.kf2-lsection-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-top: 56px;
  padding-bottom: 4px;
  gap: 24px;
}
.kf2-lsection-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--kf2-navy);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.kf2-lsection-eyebrow::before {
  content: ""; width: 24px; height: 1px; background: var(--kf2-navy);
}
.kf2-lsection-eyebrow--supplier { color: var(--kf2-amber-deep); }
.kf2-lsection-eyebrow--supplier::before { background: var(--kf2-amber-deep); }
.kf2-lsection-title {
  font-family: 'Instrument Serif', serif;
  font-size: 38px;
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--kf2-ink);
}
.kf2-lsection-aside {
  font-size: 13px;
  color: var(--kf2-ink-mute);
  max-width: 320px;
  text-align: right;
}

/* KPIs — restyle the JS-injected .landing-kpi inside our wrapper */
.kf2-lkpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--kf2-rule);
  border-top: 1px solid var(--kf2-rule);
  border-bottom: 1px solid var(--kf2-rule);
}
.kf2-lkpis .landing-kpi {
  background: var(--kf2-bone);
  padding: 28px 28px 30px;
  position: relative;
  transition: background 0.3s;
  display: block;
}
.kf2-lkpis .landing-kpi:hover { background: var(--kf2-bone-soft); }
.kf2-lkpis .landing-kpi-icon {
  font-size: 14px;
  margin-bottom: 14px;
  opacity: 0.55;
  filter: grayscale(0.5);
}
.kf2-lkpis .landing-kpi-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--kf2-ink);
  opacity: 0.6;
  margin-bottom: 18px;
}
.kf2-lkpis .landing-kpi-value {
  font-family: 'Instrument Serif', serif;
  font-size: 52px;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--kf2-ink);
}
.kf2-lkpis .landing-kpi-sub {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  color: var(--kf2-ink-mute);
  margin-top: 12px;
  letter-spacing: 0.01em;
}
.kf2-landing--supplier .kf2-lkpis .landing-kpi-icon { color: var(--kf2-amber-deep); }

/* ACTIONS */
.kf2-lactions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--kf2-rule);
  border-top: 1px solid var(--kf2-rule);
  border-bottom: 1px solid var(--kf2-rule);
  margin-top: 12px;
}
.kf2-lcard {
  background: var(--kf2-bone);
  padding: 28px 28px 32px;
  cursor: pointer;
  transition: background 0.3s, transform 0.3s;
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 240px;
  /* explicitly reset legacy .landing-action-card chrome */
  border: 0;
  border-radius: 0;
  box-shadow: none;
  text-align: left;
  gap: 0;
  overflow: visible;
}
.kf2-lcard:hover {
  background: var(--kf2-bone-soft);
  transform: none;
  box-shadow: none;
  border-color: transparent;
}
.kf2-lcard.disabled {
  cursor: not-allowed;
  opacity: 0.45;
}
.kf2-lcard.disabled:hover { background: var(--kf2-bone); }

.kf2-lcard.primary {
  background: var(--kf2-navy);
  color: var(--kf2-bone);
}
.kf2-lcard.primary:hover { background: var(--kf2-navy-soft); }
.kf2-lcard--supplier.primary { background: var(--kf2-amber-deep); }
.kf2-lcard--supplier.primary:hover { background: #b06a2d; }

.kf2-lcard-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.22em;
  opacity: 0.55;
  margin-bottom: 24px;
}
.kf2-lcard.primary .kf2-lcard-num { color: var(--kf2-amber-soft); opacity: 0.95; }

.kf2-lcard-badge {
  position: absolute;
  top: 24px;
  right: 24px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 4px 8px;
  border: 1px solid var(--kf2-amber-deep);
  color: var(--kf2-amber-deep);
  border-radius: 2px;
  background: var(--kf2-bone);
}
.kf2-lcard--supplier .kf2-lcard-badge { color: var(--kf2-navy); border-color: var(--kf2-navy); }
.kf2-lcard.primary .kf2-lcard-badge {
  background: rgba(244, 238, 226, 0.12);
  border-color: var(--kf2-amber-soft);
  color: var(--kf2-amber-soft);
}
.kf2-lcard-badge--phase2 {
  background: var(--kf2-ink) !important;
  color: var(--kf2-bone) !important;
  border-color: var(--kf2-ink) !important;
}

.kf2-lcard-title {
  font-family: 'Instrument Serif', serif;
  font-size: 26px;
  line-height: 1.15;
  font-weight: 400;
  letter-spacing: -0.005em;
  margin: 0 0 10px;
}
.kf2-lcard-desc {
  font-size: 13px;
  line-height: 1.5;
  color: var(--kf2-ink-mute);
  margin: 0 0 auto;
  padding-bottom: 16px;
}
.kf2-lcard.primary .kf2-lcard-desc { color: rgba(244, 238, 226, 0.78); }
.kf2-lcard-cta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--kf2-navy);
  padding-top: 16px;
  border-top: 1px solid var(--kf2-rule);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: gap 0.3s;
}
.kf2-lcard:not(.disabled):hover .kf2-lcard-cta { gap: 14px; }
.kf2-lcard.primary .kf2-lcard-cta {
  color: var(--kf2-amber-soft);
  border-top-color: rgba(244, 238, 226, 0.2);
}
.kf2-landing--supplier .kf2-lcard:not(.primary) .kf2-lcard-cta { color: var(--kf2-amber-deep); }
.kf2-landing--supplier .kf2-lcard--supplier.primary .kf2-lcard-cta { color: var(--kf2-bone); }

/* ACTIVITY */
.kf2-lactivity {
  border-top: 1px solid var(--kf2-rule);
  margin-top: 12px;
}
.kf2-lactivity .activity-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 20px;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid var(--kf2-rule);
  background: transparent;
  border-left: 0;
  border-right: 0;
  border-radius: 0;
}
.kf2-lactivity .activity-icon {
  width: 36px; height: 36px;
  background: var(--kf2-bone-soft);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  color: var(--kf2-ink);
  border: 1px solid var(--kf2-rule);
}
.kf2-lactivity .activity-icon.success {
  background: rgba(74, 107, 78, 0.12);
  border-color: rgba(74, 107, 78, 0.3);
}
.kf2-lactivity .activity-icon.warn {
  background: rgba(242, 160, 92, 0.14);
  border-color: rgba(242, 160, 92, 0.4);
}
.kf2-lactivity .activity-content { min-width: 0; }
.kf2-lactivity .activity-text {
  font-family: 'Instrument Serif', serif;
  font-size: 19px;
  line-height: 1.3;
  color: var(--kf2-ink);
  letter-spacing: -0.005em;
}
.kf2-lactivity .activity-text strong {
  font-style: italic;
  color: var(--kf2-navy);
  font-weight: 400;
}
.kf2-landing--supplier .kf2-lactivity .activity-text strong { color: var(--kf2-amber-deep); }
.kf2-lactivity .activity-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--kf2-ink);
  opacity: 0.55;
  margin-top: 6px;
  text-transform: uppercase;
}

/* FOOTER */
.kf2-lfoot {
  max-width: 1440px;
  margin: 64px auto 0;
  padding: 32px 48px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--kf2-rule);
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--kf2-ink);
  opacity: 0.55;
}

/* Reveal animations on landing */
.kf2-landing .kf2-lhero-meta,
.kf2-landing .kf2-lhero-grid,
.kf2-landing .kf2-lstrip,
.kf2-landing .kf2-lkpis,
.kf2-landing .kf2-lactions,
.kf2-landing .kf2-lactivity,
.kf2-landing .kf2-lfoot {
  opacity: 0;
  transform: translateY(14px);
  animation: kf2Rise 0.85s cubic-bezier(.22,.61,.36,1) forwards;
}
.kf2-landing .kf2-lhero-meta  { animation-delay: 0.05s; }
.kf2-landing .kf2-lhero-grid  { animation-delay: 0.15s; }
.kf2-landing .kf2-lstrip      { animation-delay: 0.30s; }
.kf2-landing .kf2-lkpis       { animation-delay: 0.40s; }
.kf2-landing .kf2-lactions    { animation-delay: 0.50s; }
.kf2-landing .kf2-lactivity   { animation-delay: 0.60s; }
.kf2-landing .kf2-lfoot       { animation-delay: 0.70s; }

/* ========== RESPONSIVE ========================================== */

@media (max-width: 1180px) {
  .kf2-lkpis,
  .kf2-lactions { grid-template-columns: repeat(2, 1fr); }
  .kf2-lhero-headline { font-size: 64px; }
  .kf2-wordmark { font-size: 96px; }
}

@media (max-width: 960px) {
  .kf2-login-shell { grid-template-columns: 1fr; }
  .kf2-theatre {
    min-height: 480px;
    height: 50vh;
  }
  .kf2-theatre-content { padding: 32px 28px; min-height: 0; }
  .kf2-edition { display: none; }
  .kf2-wordmark { font-size: 72px; }
  .kf2-tagline { font-size: 22px; }
  .kf2-atrium { padding: 32px 28px; }
  .kf2-atrium-top { margin-bottom: 32px; }
  .kf2-headline { font-size: 40px; }

  .kf2-lnav-inner { padding: 12px 24px; grid-template-columns: 1fr auto; }
  .kf2-lnav-by { display: none; }
  .kf2-lhero, .kf2-lsection { padding-left: 24px; padding-right: 24px; }
  .kf2-lstrip { margin-left: 24px; margin-right: 24px; padding: 0 24px; height: 180px; }
  .kf2-lhero-grid { grid-template-columns: 1fr; gap: 24px; }
  .kf2-lhero-headline { font-size: 52px; }
  .kf2-lfoot { padding: 24px; flex-direction: column; gap: 12px; }
}

@media (max-width: 640px) {
  .kf2-lkpis,
  .kf2-lactions { grid-template-columns: 1fr; }
  .kf2-wordmark { font-size: 60px; }
  .kf2-lhero-headline { font-size: 40px; }
  .kf2-epigraph-stats { grid-template-columns: 1fr 1fr; row-gap: 16px; }
  .kf2-estat:nth-child(3) { grid-column: span 2; border-left: 0; padding-left: 0; }
}


/* Back-nav affordance — completed steps are clickable */
.step.done { cursor: pointer; transition: opacity 0.18s; }
.step.done:hover { opacity: 0.78; }
.step.done:hover .step-circle { box-shadow: 0 0 0 3px rgba(13, 34, 64, 0.08); }

/* =====================================================
   Stronger active state for supplier menu tabs
   ===================================================== */
#supplierApp .menu-tab {
  position: relative;
  padding: 1rem 1.4rem;
  color: var(--ink-500);
  font-weight: 500;
  border-bottom-width: 3px;
  transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}
#supplierApp .menu-tab:hover:not(.active):not(:disabled) {
  background: rgba(13, 34, 64, 0.04);
  color: var(--navy-900);
}
#supplierApp .menu-tab.active {
  color: var(--navy-900);
  font-weight: 700;
  background: linear-gradient(180deg, rgba(242, 160, 92, 0.10) 0%, rgba(242, 160, 92, 0.02) 100%);
  border-bottom: 4px solid var(--amber-500);
  margin-bottom: -1px;
}
#supplierApp .menu-tab.active::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--amber-500);
}

/* =====================================================
   Supplier "Next step" footer bar (clarifies where to go)
   ===================================================== */
.supp-next-step-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: linear-gradient(135deg, var(--navy-900) 0%, #1A3358 100%);
  color: #fff;
  padding: 1rem 1.4rem;
  border-radius: 10px;
  margin: 1.5rem 0 0;
  box-shadow: 0 10px 24px rgba(13, 34, 64, 0.18);
}
.supp-next-step-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.supp-next-step-eyebrow {
  font-family: var(--f-mono, monospace);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--amber-300, #F4B57A);
  opacity: 0.95;
}
.supp-next-step-text {
  font-size: 0.95rem;
  font-weight: 500;
}
.supp-next-step-text strong { font-weight: 700; color: #fff; }
.supp-next-step-btn {
  background: var(--amber-500);
  color: var(--navy-900);
  border: 0;
  padding: 0.7rem 1.4rem;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
  transition: background 0.2s, transform 0.2s;
}
.supp-next-step-btn:hover {
  background: #F4B57A;
  transform: translateX(2px);
}
.supp-next-step-btn.muted {
  background: rgba(255,255,255,0.12);
  color: #fff;
}
.supp-next-step-btn.muted:hover { background: rgba(255,255,255,0.20); }


/* =====================================================
   QUOTATION — Submit panel & Acknowledgment
   ===================================================== */

/* Money inputs: right-align + readable size */
.quot-input-money {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum';
}

/* Submit panel — replaces the small actions row */
.quot-submit-panel {
  margin: 1.4rem 0 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1.5rem 1.6rem 1.6rem;
  box-shadow: 0 6px 18px rgba(13, 34, 64, 0.06);
}
.quot-step-head {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  margin-bottom: 1.1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}
.quot-step-num {
  flex: 0 0 36px;
  height: 36px;
  background: var(--amber-500);
  color: var(--navy-900);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--f-serif);
  font-size: 1.1rem;
  font-weight: 700;
}
.quot-step-title {
  margin: 0 0 4px;
  color: var(--navy-900);
  font-family: var(--f-serif);
  font-size: 1.25rem;
  font-weight: 600;
}
.quot-step-sub {
  color: var(--ink-500);
  font-size: 0.92rem;
}

/* Summary recap rows */
.quot-submit-summary {
  background: var(--bg-soft);
  border-radius: 8px;
  padding: 0.9rem 1.1rem;
  margin-bottom: 1.1rem;
  border: 1px solid var(--line);
}
.qss-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.35rem 0;
  font-size: 0.95rem;
}
.qss-row span { color: var(--ink-500); }
.qss-row strong { color: var(--navy-900); font-variant-numeric: tabular-nums; font-feature-settings: 'tnum'; font-weight: 600; }
.qss-row.qss-total {
  margin-top: 0.4rem;
  padding-top: 0.6rem;
  border-top: 1px solid var(--line);
  font-size: 1.05rem;
}
.qss-row.qss-total span { color: var(--navy-900); font-weight: 600; }
.qss-row.qss-total strong { color: var(--navy-900); font-size: 1.25rem; font-family: var(--f-serif); }

/* T&C checkbox row */
.quot-tc-row {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 1rem 1.1rem;
  background: var(--amber-50, #FFF8EE);
  border: 1px solid var(--amber-300, #F4B57A);
  border-radius: 8px;
  margin-bottom: 1rem;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.quot-tc-row:hover {
  background: #FFF1DC;
  border-color: var(--amber-500);
}
.quot-tc-row input[type="checkbox"] {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: var(--amber-500);
  margin-top: 2px;
}
.quot-tc-text {
  flex: 1;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--navy-900);
}
.quot-tc-text strong { font-weight: 700; }

/* Action buttons */
.quot-submit-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.7rem;
  margin-bottom: 0.5rem;
}
.quot-submit-actions .btn-large {
  min-width: 220px;
  font-size: 1.02rem;
  padding: 0.85rem 1.6rem;
}
.quot-submit-actions .btn-primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  background: var(--ink-300);
  color: #fff;
}
.quot-submit-hint {
  text-align: right;
  font-size: 0.82rem;
  color: var(--ink-500);
  font-style: italic;
}
.quot-submit-hint.quot-submit-hint--ready {
  color: #1F7A4D;
  font-style: normal;
}
.quot-submit-hint.quot-submit-hint--ready::before {
  content: "✓ ";
  font-weight: 700;
}

/* =====================================================
   Acknowledgment panel (shown after successful submit)
   ===================================================== */
.quot-ack-panel {
  margin: 1.6rem 0 0;
  background: linear-gradient(180deg, #fff 0%, #F7FBF8 100%);
  border: 1px solid #B8DCC4;
  border-radius: 12px;
  padding: 1.8rem 1.8rem 1.6rem;
  box-shadow: 0 12px 30px rgba(31, 122, 77, 0.10);
  animation: ackRise 0.5s cubic-bezier(.22,.61,.36,1);
}
@keyframes ackRise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.quot-ack-head {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid #D6EBDD;
}
.quot-ack-icon {
  flex: 0 0 56px;
  width: 56px; height: 56px;
  background: #1F7A4D;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  font-weight: 700;
  box-shadow: 0 6px 16px rgba(31, 122, 77, 0.25);
}
.quot-ack-title {
  margin: 4px 0 4px;
  color: #1A5238;
  font-family: var(--f-serif);
  font-size: 1.55rem;
  font-weight: 600;
}
.quot-ack-sub {
  color: var(--ink-500);
  font-size: 0.95rem;
  max-width: 640px;
}

.quot-ack-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin: 1.2rem 0;
  background: #fff;
  border: 1px solid #D6EBDD;
  border-radius: 8px;
  overflow: hidden;
}
.quot-ack-cell {
  padding: 0.95rem 1.1rem;
  border-right: 1px solid #E6F2EB;
}
.quot-ack-cell:last-child { border-right: 0; }
.quot-ack-cell--total {
  background: linear-gradient(135deg, #1F7A4D 0%, #25895A 100%);
  color: #fff;
}
.quot-ack-label {
  font-family: var(--f-mono, monospace);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-500);
  margin-bottom: 6px;
}
.quot-ack-cell--total .quot-ack-label { color: rgba(255,255,255,0.85); }
.quot-ack-value {
  font-family: var(--f-serif);
  font-size: 1.25rem;
  color: var(--navy-900);
  line-height: 1.2;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum';
}
.quot-ack-cell--total .quot-ack-value { color: #fff; }
.quot-ack-ref {
  font-family: var(--f-mono, monospace);
  font-size: 1.0rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: var(--bg-soft);
  padding: 4px 8px;
  border-radius: 4px;
  display: inline-block;
}
.quot-ack-total {
  font-size: 1.45rem;
  letter-spacing: -0.01em;
}

.quot-ack-cta-row {
  display: flex;
  justify-content: flex-end;
  gap: 0.7rem;
  margin-top: 0.6rem;
}
.quot-ack-cta-row .btn-large {
  min-width: 200px;
}
.quot-ack-foot {
  margin-top: 0.9rem;
  font-size: 0.85rem;
  color: var(--ink-500);
  text-align: right;
}
.quot-ack-foot strong {
  font-family: var(--f-mono, monospace);
  color: var(--navy-900);
}

@media (max-width: 880px) {
  .quot-ack-grid { grid-template-columns: 1fr 1fr; }
  .quot-ack-cell { border-right: 0; border-bottom: 1px solid #E6F2EB; }
  .quot-submit-actions { flex-direction: column-reverse; }
  .quot-submit-actions .btn-large { width: 100%; }
}

