/* ==========================================================================
   RIOSIN TECHNOLOGIES — EXECUTIVE COMMERCIAL PRICING PLATFORM
   Enterprise Design System — Dark/Light Executive Modern Palette
   ========================================================================== */

:root {
  /* Brand Primary */
  --primary: #0256B8;
  --primary-hover: #004394;
  --primary-light: #EBF3FF;
  --primary-glow: rgba(2, 86, 184, 0.2);

  /* Accents */
  --teal: #00B8A9;
  --teal-light: #E6FAF8;
  --teal-dark: #00877C;
  --emerald: #10B981;
  --emerald-light: #ECFDF5;
  --amber: #F59E0B;
  --amber-light: #FFFBEB;
  --rose: #EF4444;
  --rose-light: #FEF2F2;
  --indigo: #6366F1;
  --indigo-light: #EEF2FF;
  --purple: #8B5CF6;
  --purple-light: #F3E8FF;

  /* Executive Dark Slate Theme (Topbar & Hero) */
  --navy-950: #050B14;
  --navy-900: #0A1628;
  --navy-850: #0F1E36;
  --navy-800: #15294A;
  --navy-700: #1E3A68;
  --navy-border: rgba(255, 255, 255, 0.1);

  /* Clean Surface Canvas */
  --bg-page: #F6F8FB;
  --bg-surface: #FFFFFF;
  --bg-muted: #F1F4F9;
  --bg-subtle: #E2E8F0;
  --border-light: #E2E8F0;
  --border-strong: #CBD5E1;

  /* Typography */
  --text-main: #0B132B;
  --text-muted: #475569;
  --text-light: #94A3B8;

  /* Geometry & Shadows */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --shadow-card: 0 2px 6px rgba(11, 19, 43, 0.04), 0 8px 24px rgba(11, 19, 43, 0.05);
  --shadow-hover: 0 12px 32px rgba(11, 19, 43, 0.09), 0 4px 12px rgba(11, 19, 43, 0.04);
  --shadow-modal: 0 24px 64px rgba(5, 11, 20, 0.35);
  --shadow-telemetry: 0 8px 30px rgba(2, 86, 184, 0.15);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 14px; }
body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Scrollbars */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-page); }
::-webkit-scrollbar-thumb { background: #CBD5E1; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #94A3B8; }

/* ── EXECUTIVE ACCESS BANNER (SECURITY GATE) ── */
.security-banner {
  background: linear-gradient(90deg, #0A1628 0%, #15294A 100%);
  color: #fff;
  padding: 6px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 600;
  border-bottom: 1px solid var(--navy-border);
}
.sec-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(16, 185, 129, 0.15);
  color: #34D399;
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 2px 8px;
  border-radius: 100px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
}
.sec-badge.presentation {
  background: rgba(245, 158, 11, 0.18);
  color: #FBBF24;
  border-color: rgba(245, 158, 11, 0.4);
}
.pulse-dot {
  width: 6px; height: 6px; border-radius: 50%; background: #34D399;
  box-shadow: 0 0 6px #34D399;
  animation: pulse 2s infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.4; transform: scale(1.3); } }

/* ── APP HEADER ── */
.app-header {
  width: 100%;
  height: 68px;
  background: var(--navy-900);
  border-bottom: 1px solid var(--navy-border);
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  backdrop-filter: blur(16px);
}
.brand-group {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}
.brand-mark {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--teal) 100%);
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 900;
  font-size: 20px;
  box-shadow: 0 4px 16px rgba(2, 86, 184, 0.45);
}
.brand-meta h1 {
  font-size: 16.5px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.3px;
  line-height: 1.1;
}
.brand-meta h1 span { color: var(--teal); font-weight: 700; }
.brand-meta p {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.55);
  font-weight: 500;
}

/* Nav Switcher */
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.app-mode-nav {
  display: flex;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--navy-border);
  padding: 3px;
  border-radius: var(--radius-sm);
  gap: 3px;
}
.mode-btn {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: inherit;
  white-space: nowrap;
}
.mode-btn:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }
.mode-btn.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 10px rgba(2, 86, 184, 0.5);
}
.mode-btn.presentation-active {
  background: linear-gradient(135deg, #D97706, #B45309);
  color: #fff;
  box-shadow: 0 2px 10px rgba(217, 119, 6, 0.5);
}

/* Topbar Action Buttons */
.btn-lock {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #F87171;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
  font-family: inherit;
}
.btn-lock:hover {
  background: rgba(239, 68, 68, 0.25);
  color: #fff;
}
.user-profile-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--navy-border);
  padding: 5px 12px;
  border-radius: 100px;
  color: #fff;
  font-size: 12px;
}
.user-avatar-circle {
  width: 24px;
  height: 24px;
  background: linear-gradient(135deg, var(--teal), var(--primary));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
}

/* ── CONFIDENTIAL COMMERCIAL TELEMETRY BAR (EXECUTIVE ONLY) ── */
.telemetry-bar {
  background: linear-gradient(135deg, #071224 0%, #0D2040 100%);
  border-bottom: 1px solid var(--navy-border);
  padding: 14px 32px;
  color: #fff;
  box-shadow: var(--shadow-telemetry);
  position: relative;
  overflow: hidden;
}
.telemetry-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 24px;
  align-items: center;
}
.telemetry-label-col {
  display: flex;
  align-items: center;
  gap: 12px;
}
.telemetry-shield-icon {
  width: 36px;
  height: 36px;
  background: rgba(2, 86, 184, 0.25);
  border: 1px solid rgba(2, 86, 184, 0.5);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #38BDF8;
  font-size: 16px;
}
.telemetry-label-txt h4 {
  font-size: 12.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #38BDF8;
}
.telemetry-label-txt p {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
}

.telemetry-stats-deck {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 8px 16px;
  border-radius: var(--radius-md);
  overflow-x: auto;
}
.t-metric {
  padding: 2px 12px;
  text-align: center;
  white-space: nowrap;
}
.t-metric + .t-metric {
  border-left: 1px solid rgba(255, 255, 255, 0.1);
}
.t-val {
  font-size: 1.35rem;
  font-weight: 800;
  font-family: 'JetBrains Mono', monospace;
  line-height: 1.1;
  display: block;
}
.t-val.primary { color: #38BDF8; }
.t-val.margin-good { color: #34D399; }
.t-val.margin-warn { color: #FBBF24; }
.t-val.margin-alert { color: #F87171; }
.t-lbl {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 700;
  margin-top: 3px;
}

.telemetry-actions-col {
  display: flex;
  align-items: center;
  gap: 10px;
}
.btn-presentation-toggle {
  background: rgba(245, 158, 11, 0.15);
  border: 1.5px solid rgba(245, 158, 11, 0.4);
  color: #FBBF24;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
  font-family: inherit;
  white-space: nowrap;
}
.btn-presentation-toggle:hover {
  background: #F59E0B;
  color: #000;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
}
.btn-presentation-toggle.active {
  background: #F59E0B;
  color: #000;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.6);
}

/* ── PRESENTATION MODE WATERMARK BANNER ── */
.presentation-watermark {
  display: none;
  background: linear-gradient(90deg, #B45309 0%, #D97706 100%);
  color: #fff;
  padding: 10px 32px;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  border-bottom: 2px solid #92400E;
}
body.presentation-mode .presentation-watermark { display: block; }
body.presentation-mode .confidential-data { display: none !important; }

/* ── MAIN WORKSPACE CONTAINER ── */
.app-container {
  width: 100%;
  padding: 24px 32px 80px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 440px;
  gap: 28px;
  align-items: start;
}
@media (min-width: 1800px) {
  .app-container {
    grid-template-columns: minmax(0, 1fr) 480px;
    padding: 28px 48px 90px;
  }
}

/* ── VIEW SECTIONS ── */
.view-panel { display: none; }
.view-panel.active { display: block; }

/* ── SECTION CARDS ── */
.panel-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  margin-bottom: 20px;
  overflow: hidden;
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
}
.panel-card:hover {
  box-shadow: var(--shadow-hover);
  border-color: #CBD5E1;
}
.panel-header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(to right, #FFFFFF, #FAFBFD);
}
.panel-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}
.panel-icon-badge {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.pib-blue { background: var(--primary-light); color: var(--primary); }
.pib-teal { background: var(--teal-light); color: var(--teal); }
.pib-amber { background: var(--amber-light); color: var(--amber); }
.pib-indigo { background: var(--indigo-light); color: var(--indigo); }
.pib-emerald { background: var(--emerald-light); color: var(--emerald); }
.pib-purple { background: var(--purple-light); color: var(--purple); }

.panel-header-txt h3 {
  font-size: 14.5px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.2px;
}
.panel-header-txt p {
  font-size: 11.5px;
  color: var(--text-muted);
}
.step-badge {
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  background: var(--bg-muted);
  color: var(--text-muted);
  padding: 4px 12px;
  border-radius: 100px;
  border: 1px solid var(--border-light);
}

.panel-body { padding: 20px 24px; }

/* ── PRESETS STRIP ── */
.presets-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.preset-lbl {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
  margin-right: 4px;
}
.preset-chip {
  background: var(--bg-surface);
  border: 1.5px solid var(--border-light);
  color: var(--text-main);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
}
.preset-chip:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}
.preset-chip.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 2px 8px var(--primary-glow);
}

/* ── 30 TARGET COUNTRIES & 22 CURRENCIES SELECTOR ── */
.market-selector-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
.field-box label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.field-select {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  color: var(--text-main);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
}
.field-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.quick-currency-deck {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.cur-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 13px;
  border-radius: 100px;
  border: 1.5px solid var(--border-light);
  background: var(--bg-surface);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
  font-family: inherit;
}
.cur-chip:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}
.cur-chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #FFFFFF;
  box-shadow: 0 3px 10px var(--primary-glow);
}

.rate-telemetry-badge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-muted);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  margin-top: 12px;
  font-size: 11.5px;
  color: var(--text-muted);
}
.rate-telemetry-left {
  display: flex;
  align-items: center;
  gap: 8px;
}
.btn-refresh-fx {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  color: var(--text-main);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s;
}
.btn-refresh-fx:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* ── DELIVERY MODEL SELECTOR ── */
.delivery-model-deck {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
.dm-card {
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  cursor: pointer;
  transition: all 0.2s;
  background: var(--bg-surface);
  position: relative;
}
.dm-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}
.dm-card.selected {
  border-color: var(--primary);
  background: color-mix(in srgb, var(--primary) 4%, white);
  box-shadow: 0 0 0 3px var(--primary-glow);
}
.dm-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.dm-name {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-main);
}
.dm-badge {
  font-size: 9.5px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 100px;
  background: var(--emerald-light);
  color: var(--emerald);
}
.dm-desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.35;
}
.dm-rate-preview {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--border-light);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--primary);
  font-family: 'JetBrains Mono', monospace;
}

/* ── SERVICE CARDS GRID ── */
.services-deck {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
}
.service-card {
  background: var(--bg-surface);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.service-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--accent-color, var(--primary));
  opacity: 0;
  transition: opacity 0.22s;
}
.service-card:hover {
  border-color: var(--accent-color, var(--primary));
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}
.service-card:hover::before { opacity: 1; }
.service-card.selected {
  border-color: var(--accent-color, var(--primary));
  background: color-mix(in srgb, var(--accent-color, var(--primary)) 4%, white);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-color, var(--primary)) 20%, transparent), var(--shadow-hover);
}
.service-card.selected::before { opacity: 1; }

.service-badge-popular {
  position: absolute;
  top: 0;
  right: 12px;
  background: linear-gradient(135deg, #F59E0B, #D97706);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 3px 8px;
  border-radius: 0 0 6px 6px;
}

.service-icon-box {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--accent-color, var(--primary)) 12%, white);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  font-size: 20px;
  color: var(--accent-color, var(--primary));
}
.service-card-title {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.25;
  margin-bottom: 4px;
}
.service-card-desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.35;
  margin-bottom: 12px;
  min-height: 30px;
}
.service-card-footer {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-top: 1px solid var(--border-light);
  padding-top: 10px;
}
.service-base-tag {
  font-size: 10px;
  color: var(--text-light);
  font-weight: 700;
  text-transform: uppercase;
}
.service-price-val {
  font-size: 14.5px;
  font-weight: 800;
  color: var(--accent-color, var(--primary));
  font-family: 'JetBrains Mono', monospace;
}

/* ── COMPLEXITY SLIDERS DECK ── */
.sliders-quad {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px 24px;
}
.slider-control-group {
  background: var(--bg-muted);
  padding: 14px 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
}
.slider-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.slider-head label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
}
.slider-badge-val {
  font-size: 12px;
  font-weight: 800;
  font-family: 'JetBrains Mono', monospace;
  background: var(--primary-light);
  color: var(--primary);
  padding: 2px 10px;
  border-radius: 100px;
}
.custom-range {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: #CBD5E1;
  outline: none;
  cursor: pointer;
  margin: 8px 0 4px;
}
.custom-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  border: 3px solid #FFFFFF;
  box-shadow: 0 2px 8px rgba(2, 86, 184, 0.4);
  transition: transform 0.12s;
}
.custom-range::-webkit-slider-thumb:hover { transform: scale(1.2); }
.slider-bounds {
  display: flex;
  justify-content: space-between;
  font-size: 10.5px;
  color: var(--text-light);
  font-weight: 600;
}

/* Multiplier Selectors */
.selectors-deck {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 18px;
}

/* ── ADD-ONS DECK ── */
.addons-deck {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}
.addon-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}
.addon-item:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}
.addon-item.selected {
  border-color: var(--primary);
  background: var(--primary-light);
  box-shadow: 0 2px 8px var(--primary-glow);
}
.addon-lead {
  display: flex;
  align-items: center;
  gap: 12px;
}
.addon-icon-circle {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  background: var(--bg-muted);
  flex-shrink: 0;
}
.addon-copy h4 {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
}
.addon-copy p {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}
.addon-tail {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.addon-cost {
  font-size: 12px;
  font-weight: 800;
  color: var(--primary);
  font-family: 'JetBrains Mono', monospace;
  white-space: nowrap;
}
.switch-pill {
  width: 38px;
  height: 22px;
  background: var(--border-strong);
  border-radius: 100px;
  position: relative;
  transition: background 0.25s;
}
.addon-item.selected .switch-pill { background: var(--primary); }
.switch-pill::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  background: #FFFFFF;
  border-radius: 50%;
  top: 3px;
  left: 3px;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.addon-item.selected .switch-pill::after { transform: translateX(16px); }

/* ── SUPPORT / RETAINER TIERS ── */
.support-tier-deck {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}
.support-card {
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px 14px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  background: var(--bg-surface);
  position: relative;
}
.support-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}
.support-card.selected {
  border-color: var(--primary);
  background: var(--primary-light);
  box-shadow: 0 0 0 3px var(--primary-glow);
}
.support-icon { font-size: 24px; margin-bottom: 6px; display: block; }
.support-tier-name { font-size: 13px; font-weight: 800; color: var(--text-main); display: block; }
.support-tier-price { font-size: 14.5px; font-weight: 800; color: var(--primary); margin: 4px 0 2px; display: block; font-family: 'JetBrains Mono', monospace; }
.support-tier-hrs { font-size: 11px; color: var(--text-muted); }

/* ── MICROSOFT LICENSING MATRIX DECK ── */
.ms-licensing-wrap {
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-surface);
}
.ms-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}
.ms-table th {
  background: var(--bg-muted);
  padding: 10px 14px;
  text-align: left;
  font-weight: 700;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-muted);
}
.ms-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-light);
}
.ms-qty-input {
  width: 75px;
  padding: 4px 8px;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-xs);
  font-size: 12px;
  font-family: 'JetBrains Mono', monospace;
  text-align: right;
}
.ms-notice-box {
  background: #FFFBEB;
  border-left: 4px solid #F59E0B;
  padding: 12px 16px;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  font-size: 11.5px;
  color: #92400E;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ── RIGHT STICKY EXECUTIVE SUMMARY CARD ── */
.quote-column {
  position: sticky;
  top: 88px;
}
.enterprise-bill-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.ebc-head {
  background: linear-gradient(145deg, #071224 0%, #0D2040 100%);
  padding: 24px 22px;
  color: #fff;
  text-align: center;
  position: relative;
}
.ebc-tag {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 6px;
  display: block;
}
.ebc-price-display {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
}
.ebc-currency { font-size: 1.6rem; font-weight: 700; color: #38BDF8; }
.ebc-amount {
  font-size: 3.2rem;
  font-weight: 900;
  color: #FFFFFF;
  line-height: 1;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: -1.5px;
}
.ebc-sub-equiv {
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.55);
  margin-top: 6px;
}
.ebc-saving-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34D399;
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 100px;
  margin-top: 10px;
}

.ebc-body { padding: 18px 20px; }
.ebc-items-list {
  min-height: 120px;
  max-height: 280px;
  overflow-y: auto;
}
.bill-line {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 12.5px;
}
.bill-line-title {
  color: var(--text-muted);
  display: flex;
  align-items: flex-start;
  gap: 8px;
  flex: 1;
  line-height: 1.35;
}
.bill-bullet {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-top: 5px;
  flex-shrink: 0;
}
.bill-line-price {
  font-weight: 700;
  color: var(--text-main);
  font-family: 'JetBrains Mono', monospace;
  white-space: nowrap;
}

/* Discount & Subtotal */
.discount-field-box {
  display: flex;
  gap: 6px;
  margin: 14px 0 10px;
}
.discount-input {
  flex: 1;
  padding: 8px 12px;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  font-size: 12px;
  font-family: inherit;
  border-right: none;
}
.discount-input:focus { outline: none; border-color: var(--primary); }
.discount-btn {
  background: var(--primary);
  color: #fff;
  border: none;
  font-size: 12px;
  font-weight: 700;
  padding: 0 16px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  cursor: pointer;
  transition: background 0.15s;
}
.discount-btn:hover { background: var(--primary-hover); }

.discount-applied-row {
  display: none;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  font-size: 12.5px;
  color: var(--emerald);
  font-weight: 700;
}

.ebc-grand-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0 6px;
  border-top: 2px solid var(--text-main);
  margin-top: 8px;
}
.ebc-grand-total span:first-child { font-size: 14px; font-weight: 800; color: var(--text-main); }
.ebc-grand-total span:last-child {
  font-size: 19px;
  font-weight: 900;
  color: var(--primary);
  font-family: 'JetBrains Mono', monospace;
}

/* Margin telemetry mini-box (Confidential only) */
.ebc-internal-margin-card {
  background: #0F1E36;
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-top: 14px;
  color: #fff;
  border: 1px solid var(--navy-border);
}
.eimc-title {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #38BDF8;
  font-weight: 800;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.eimc-row {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  padding: 3px 0;
  color: rgba(255, 255, 255, 0.7);
}
.eimc-row strong { color: #fff; font-family: 'JetBrains Mono', monospace; }
.eimc-margin-pill {
  background: rgba(16, 185, 129, 0.2);
  color: #34D399;
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 800;
}

.ebc-actions {
  padding: 0 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.btn-cta-proposal {
  width: 100%;
  padding: 13px;
  border-radius: var(--radius-sm);
  border: none;
  background: linear-gradient(135deg, var(--primary) 0%, #004394 100%);
  color: #fff;
  font-size: 13.5px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(2, 86, 184, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
  font-family: inherit;
}
.btn-cta-proposal:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(2, 86, 184, 0.45);
}
.btn-sec-export {
  width: 100%;
  padding: 10px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-light);
  background: var(--bg-surface);
  color: var(--text-main);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  transition: all 0.18s;
  font-family: inherit;
}
.btn-sec-export:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

/* ── SOW / PROPOSAL SHEET (BOARDROOM QUALITY) ── */
.sow-sheet {
  background: #FFFFFF;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 48px 56px;
  box-shadow: var(--shadow-card);
  max-width: 980px;
  margin: 0 auto;
}
.sow-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 24px;
  border-bottom: 2px solid var(--text-main);
  margin-bottom: 30px;
}
.sow-co-info h2 { font-size: 26px; font-weight: 900; color: var(--primary); }
.sow-co-info p { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }
.sow-quote-meta { text-align: right; }
.sow-quote-meta .sow-no { font-size: 17px; font-weight: 900; font-family: 'JetBrains Mono', monospace; color: var(--text-main); }
.sow-quote-meta .sow-date { font-size: 12px; color: var(--text-muted); margin-top: 3px; }

.sow-section-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-main);
  margin: 28px 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-left: 3px solid var(--primary);
  padding-left: 10px;
}
.sow-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 13px;
}
.sow-table th {
  background: var(--bg-muted);
  padding: 10px 14px;
  text-align: left;
  font-weight: 800;
  border-bottom: 1px solid var(--border-strong);
}
.sow-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-light);
}

.sow-sign-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid var(--border-light);
}
.sign-box {
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 20px;
  background: var(--bg-muted);
}
.sign-box h5 { font-size: 12px; font-weight: 800; text-transform: uppercase; color: var(--text-muted); margin-bottom: 12px; }
.sign-line { height: 1px; background: var(--border-strong); margin: 30px 0 10px; }
.sign-label { font-size: 11px; color: var(--text-light); }

/* ── MODAL DIALOGS (EXECUTIVE AUTH & SOW CAPTURE) ── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 11, 20, 0.75);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-backdrop.open { display: flex; }
.modal-container {
  background: var(--bg-surface);
  border-radius: var(--radius-xl);
  max-width: 520px;
  width: 100%;
  box-shadow: var(--shadow-modal);
  overflow: hidden;
  animation: modalIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-top {
  background: linear-gradient(135deg, #071224 0%, #0F2347 100%);
  padding: 24px;
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.modal-top h3 { font-size: 1.3rem; font-weight: 800; }
.modal-top p { font-size: 12px; color: rgba(255, 255, 255, 0.6); margin-top: 3px; }
.modal-close-btn {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: background 0.15s;
}
.modal-close-btn:hover { background: rgba(255, 255, 255, 0.3); }

.modal-content { padding: 24px; }
.input-control {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-family: inherit;
  color: var(--text-main);
  background: var(--bg-surface);
  margin-bottom: 12px;
}
.input-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

/* Toast */
.toast-msg {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #0B132B;
  color: #fff;
  padding: 14px 22px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 700;
  box-shadow: var(--shadow-modal);
  z-index: 3000;
  display: flex;
  align-items: center;
  gap: 10px;
  transform: translateY(80px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.toast-msg.show { transform: translateY(0); opacity: 1; }
.toast-msg.success { background: #059669; }
.toast-msg.error { background: #DC2626; }

/* ── RESPONSIVE & PRINT ── */
@media (max-width: 1180px) {
  .app-container { grid-template-columns: 1fr; padding: 18px 20px; }
  .quote-column { position: static; }
  .telemetry-inner { grid-template-columns: 1fr; }
  .delivery-model-deck { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .app-header { padding: 0 16px; }
  .security-banner { padding: 6px 16px; }
  .telemetry-bar { padding: 14px 16px; }
  .services-deck { grid-template-columns: 1fr; }
  .market-selector-grid { grid-template-columns: 1fr; }
  .app-mode-nav { display: none; }
}
@media print {
  .app-header, .security-banner, .telemetry-bar, .quote-column, .presets-strip, .btn-sec-export, .btn-cta-proposal, .modal-backdrop { display: none !important; }
  .app-container { display: block; padding: 0; }
  .sow-sheet { border: none; box-shadow: none; padding: 0; max-width: 100%; }
}
