/* ═══════════════════════════════════════════════════
   Seven Sails Logistics — Freight Quote System
   Professional Design System v1.0
═══════════════════════════════════════════════════ */

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary:    #0A2463;   /* Deep Navy */
  --accent:      #3E92CC;   /* Ocean Blue */
  --gold:        #F0A500;   /* Gold */
  --success:     #00C48C;  /* Teal Green */
  --warn:        #FF6B35;  /* Orange */
  --bg:          #F4F7FB;  /* Light sky */
  --surface:     #FFFFFF;
  --border:      #DDE3EE;
  --text:        #1A202C;
  --text-muted:  #718096;
  --text-light:  #A0AEC0;
  --shadow-sm:   0 1px 3px rgba(10,36,99,.08), 0 1px 2px rgba(10,36,99,.06);
  --shadow-md:   0 4px 12px rgba(10,36,99,.12), 0 2px 4px rgba(10,36,99,.08);
  --shadow-lg:   0 10px 40px rgba(10,36,99,.16), 0 4px 8px rgba(10,36,99,.10);
  --shadow-xl:   0 20px 60px rgba(10,36,99,.20), 0 8px 16px rgba(10,36,99,.12);
  --radius-sm:   8px;
  --radius-md:   12px;
  --radius-lg:   18px;
  --radius-xl:   24px;
  --font:        'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --header-h:    64px;
  --nav-h:       52px;
}

html { font-size: 15px; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-light); }

/* ── Header ── */
.header {
  position: sticky; top: 0; z-index: 100;
  background: linear-gradient(135deg, var(--primary) 0%, #163B9E 100%);
  height: var(--header-h);
  box-shadow: var(--shadow-lg);
}
.header-inner {
  max-width: 1440px; margin: 0 auto;
  height: 100%; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
}
.logo-area { display: flex; align-items: center; gap: 14px; }
.logo-icon {
  width: 42px; height: 42px;
  background: linear-gradient(135deg, var(--gold), #FF8C00);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; color: white;
  box-shadow: 0 4px 12px rgba(240,165,0,.4);
  flex-shrink: 0;
}
.logo-text .company {
  font-size: 18px; font-weight: 800; color: #fff; letter-spacing: -0.3px;
}
.logo-text .tagline {
  font-size: 10px; color: rgba(255,255,255,.65); letter-spacing: 1.5px; text-transform: uppercase; margin-top: 1px;
}
.header-right { display: flex; align-items: center; gap: 16px; }

.fx-strip {
  display: flex; gap: 8px;
}
.fx-item {
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 20px;
  padding: 4px 12px;
  display: flex; align-items: center; gap: 6px;
}
.fx-lbl { font-size: 10px; color: rgba(255,255,255,.55); letter-spacing: .5px; text-transform: uppercase; }
.fx-val { font-size: 13px; font-weight: 700; color: #FFD700; }

/* Language toggle */
.lang-strip {
  display: flex; gap: 2px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 20px;
  padding: 3px;
}
.lang-btn {
  background: none;
  border: none;
  color: rgba(255,255,255,.65);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 16px;
  cursor: pointer;
  transition: all .2s;
  letter-spacing: .5px;
}
.lang-btn.sel {
  background: rgba(255,255,255,.22);
  color: #fff;
}
.lang-btn:hover:not(.sel) {
  color: #fff;
  background: rgba(255,255,255,.10);
}

.header-badge {
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 20px;
  padding: 5px 14px;
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: rgba(255,255,255,.80);
}
.dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--success);
  animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(0,196,140,.5); }
  50% { opacity: .8; box-shadow: 0 0 0 6px rgba(0,196,140,0); }
}

/* ── Nav Tabs ── */
.nav-tabs {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky; top: var(--header-h); z-index: 90;
  box-shadow: 0 2px 8px rgba(10,36,99,.06);
}
.nav-tabs-inner {
  max-width: 1440px; margin: 0 auto;
  padding: 0 24px;
  display: flex; gap: 2px;
}
.tab-btn {
  padding: 0 20px;
  height: var(--nav-h);
  border: none; background: transparent;
  font-family: var(--font); font-size: 13.5px; font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  display: flex; align-items: center; gap: 8px;
  position: relative;
  transition: color .2s, background .2s;
}
.tab-btn::after {
  content: '';
  position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 0; height: 3px; border-radius: 3px 3px 0 0;
  background: var(--accent);
  transition: width .25s cubic-bezier(.4,0,.2,1);
}
.tab-btn:hover { color: var(--primary); background: rgba(62,146,204,.06); }
.tab-btn.active { color: var(--primary); font-weight: 700; }
.tab-btn.active::after { width: 100%; }

/* ── Main ── */
.main {
  max-width: 1440px; margin: 0 auto;
  padding: 28px 24px 48px;
}

/* ── Pages ── */
.page { display: none; }
.page.active { display: block; animation: fadeIn .3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.page-header { margin-bottom: 24px; }
.page-header h2 { font-size: 22px; font-weight: 800; color: var(--primary); }
.page-header p { color: var(--text-muted); margin-top: 4px; font-size: 14px; }

/* ── Calculator Layout ── */
.calc-layout {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 24px;
  align-items: start;
}

/* ── Form Panel ── */
.form-panel { position: sticky; top: calc(var(--header-h) + var(--nav-h) + 20px); }

/* ── Card ── */
.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
  overflow: hidden;
}
.card-hd {
  padding: 18px 20px;
  background: linear-gradient(135deg, rgba(10,36,99,.04), rgba(62,146,204,.04));
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 14px;
}
.card-hd-icon {
  width: 40px; height: 40px; border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff; font-size: 18px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(10,36,99,.25);
}
.card-hd-title { font-size: 15px; font-weight: 700; color: var(--primary); }
.card-hd-sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.card-body { padding: 20px; }

/* ── Incoterm Grid ── */
.incoterm-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
}
.ic-btn {
  padding: 8px 4px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  cursor: pointer;
  text-align: center;
  transition: all .2s;
  font-family: var(--font);
}
.ic-btn:hover { border-color: var(--accent); background: rgba(62,146,204,.05); }
.ic-btn.sel {
  border-color: var(--primary);
  background: linear-gradient(135deg, rgba(10,36,99,.08), rgba(62,146,204,.12));
  box-shadow: 0 0 0 1px var(--primary);
}
.ic-btn b { font-size: 13px; color: var(--primary); display: block; }
.ic-btn small { font-size: 10px; color: var(--text-muted); display: block; margin-top: 2px; }
.ic-btn.sel b { color: var(--primary); }
.ic-btn.sel small { color: var(--accent); }

/* ── Mode Grid ── */
.mode-grid {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px;
}
.mode-btn {
  padding: 10px 4px 8px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  cursor: pointer;
  text-align: center;
  transition: all .2s;
  font-family: var(--font);
}
.mode-btn:hover { border-color: var(--accent); background: rgba(62,146,204,.05); }
.mode-btn.sel {
  border-color: var(--accent);
  background: linear-gradient(135deg, rgba(62,146,204,.1), rgba(62,146,204,.2));
  box-shadow: 0 0 0 1px var(--accent);
}
.mode-btn .mi { font-size: 20px; display: block; margin-bottom: 4px; }
.mode-btn .ml { font-size: 10px; font-weight: 600; color: var(--text-muted); }
.mode-btn.sel .ml { color: var(--accent); }

/* ── Labels & Fields ── */
.sec-label {
  font-size: 11px; font-weight: 700; color: var(--text-muted);
  letter-spacing: 1.5px; text-transform: uppercase;
  margin: 18px 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px dashed var(--border);
}
.field-grp { margin-bottom: 14px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.flabel {
  display: block;
  font-size: 12px; font-weight: 600; color: var(--text);
  margin-bottom: 6px; letter-spacing: .2px;
}
.req { color: var(--warn); }
.finput {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font); font-size: 13.5px; color: var(--text);
  background: var(--surface);
  transition: border-color .2s, box-shadow .2s;
  outline: none;
}
.finput:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(62,146,204,.15);
}
.fsel { cursor: pointer; }
.input-unit { display: flex; gap: 6px; }
.input-unit .finput { flex: 1; }
.unit-tag {
  padding: 9px 10px;
  background: var(--bg); border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 12px; font-weight: 600; color: var(--text-muted);
  white-space: nowrap;
  display: flex; align-items: center;
}
.unit-sel { width: 70px; padding: 9px 8px; }

/* ── Info Box ── */
.info-box {
  background: linear-gradient(135deg, rgba(62,146,204,.08), rgba(0,196,140,.06));
  border: 1px solid rgba(62,146,204,.2);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 13px; color: var(--text);
  margin: 12px 0;
}

/* ── Buttons ── */
.btn-calc {
  width: 100%; margin-top: 8px;
  padding: 14px 20px;
  background: linear-gradient(135deg, var(--primary), #163B9E);
  color: #fff; border: none;
  border-radius: var(--radius-md);
  font-family: var(--font); font-size: 15px; font-weight: 700;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  transition: all .2s;
  box-shadow: 0 4px 14px rgba(10,36,99,.35);
  letter-spacing: .3px;
}
.btn-calc:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(10,36,99,.4);
}
.btn-calc:active { transform: translateY(0); }
.btn-calc:disabled { opacity: .6; cursor: not-allowed; transform: none; }

.btn-pri {
  padding: 10px 20px;
  background: linear-gradient(135deg, var(--accent), #2C7AB8);
  color: #fff; border: none; border-radius: var(--radius-sm);
  font-family: var(--font); font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all .2s;
  box-shadow: 0 2px 8px rgba(62,146,204,.3);
}
.btn-pri:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(62,146,204,.4); }

.btn-sec {
  padding: 10px 18px;
  background: var(--surface);
  color: var(--text); border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font); font-size: 13px; font-weight: 500;
  cursor: pointer; transition: all .2s;
}
.btn-sec:hover { border-color: var(--accent); color: var(--accent); background: rgba(62,146,204,.04); }

.btn-add {
  padding: 8px 16px;
  background: transparent;
  color: var(--accent); border: 1.5px dashed rgba(62,146,204,.4);
  border-radius: var(--radius-sm);
  font-family: var(--font); font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all .2s;
}
.btn-add:hover { background: rgba(62,146,204,.06); border-style: solid; }

.btn-del {
  width: 28px; height: 28px;
  border: none; background: transparent;
  color: var(--text-light); font-size: 16px;
  cursor: pointer; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  transition: all .15s; flex-shrink: 0;
}
.btn-del:hover { background: rgba(255,107,53,.1); color: var(--warn); }

.btn-icon {
  width: 34px; height: 34px;
  border: 1.5px solid var(--border); background: var(--surface);
  border-radius: var(--radius-sm);
  cursor: pointer; font-size: 15px;
  display: flex; align-items: center; justify-content: center;
  transition: all .15s; color: var(--text-muted);
}
.btn-icon:hover { border-color: var(--accent); color: var(--accent); }

/* ── Spinner ── */
.spinner {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.3);
  border-top-color: #fff;
  animation: spin .7s linear infinite;
  display: none;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading .spinner { display: block; }
.loading #calcTxt { opacity: .7; }

/* ── Results Panel ── */
#resultsPanel { min-height: 500px; }

/* Empty State */
.empty-state {
  background: var(--surface);
  border: 2px dashed var(--border);
  border-radius: var(--radius-xl);
  padding: 64px 40px;
  text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.empty-icon { font-size: 64px; opacity: .2; }
.empty-title { font-size: 18px; font-weight: 700; color: var(--text-muted); }
.empty-sub { font-size: 13px; color: var(--text-light); max-width: 320px; line-height: 1.7; }

/* ── Quote Card ── */
.quote-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
  overflow: hidden;
  margin-bottom: 20px;
  transition: transform .2s, box-shadow .2s;
}
.quote-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.quote-card.best { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(240,165,0,.2), var(--shadow-lg); }

.qcard-head {
  padding: 14px 20px;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 10px;
}
.qcard-provider {
  display: flex; align-items: center; gap: 10px;
}
.qcard-logo {
  width: 36px; height: 36px;
  border-radius: 8px; font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; color: #fff;
}
.qcard-name { font-size: 14px; font-weight: 700; color: var(--primary); }
.qcard-route { font-size: 11px; color: var(--text-muted); }
.qcard-meta { display: flex; align-items: center; gap: 8px; }
.badge {
  padding: 4px 12px; border-radius: 20px;
  font-size: 11px; font-weight: 700; letter-spacing: .5px;
}
.badge-best { background: linear-gradient(135deg, var(--gold), #FF8C00); color: #fff; }
.badge-alt { background: rgba(62,146,204,.1); color: var(--accent); }
.badge-route { background: rgba(10,36,99,.07); color: var(--text-muted); }

.qcard-body { padding: 0 20px 16px; }

.qprice-row {
  display: flex; align-items: baseline; gap: 6px;
  margin-bottom: 12px;
}
.qprice-label { font-size: 12px; color: var(--text-muted); }
.qprice-val { font-size: 32px; font-weight: 800; color: var(--primary); }
.qprice-ccy { font-size: 16px; font-weight: 600; color: var(--text-muted); }
.qprice-sub { font-size: 12px; color: var(--text-muted); margin-left: 6px; }

.qdetail-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px; margin-bottom: 12px;
}
.qdetail-item {
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
}
.qdetail-label { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .8px; }
.qdetail-val { font-size: 13px; font-weight: 600; color: var(--text); margin-top: 2px; }

.upsell-row {
  background: linear-gradient(135deg, rgba(240,165,0,.06), rgba(255,140,0,.04));
  border: 1px solid rgba(240,165,0,.2);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  display: flex; align-items: center; gap: 10px;
  font-size: 12.5px; color: var(--text);
  margin-bottom: 8px;
}
.upsell-row .tag { background: var(--gold); color: #fff; padding: 2px 8px; border-radius: 10px; font-size: 10px; font-weight: 700; white-space: nowrap; }
.upsell-row .val { margin-left: auto; font-weight: 700; color: var(--primary); font-size: 13px; }

.gp-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 0;
  border-top: 1px dashed var(--border);
  margin-top: 8px;
  font-size: 13px;
}
.gp-row .lbl { color: var(--text-muted); }
.gp-row .val { font-weight: 700; color: var(--success); }
.gp-row .val.warn { color: var(--warn); }

.qcard-foot {
  padding: 12px 20px;
  background: var(--bg);
  border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
}
.qcard-transit { font-size: 12px; color: var(--text-muted); }
.qcard-actions { display: flex; gap: 8px; }

/* ── Transit Timeline ── */
.transit-timeline {
  background: linear-gradient(135deg, rgba(10,36,99,.04), rgba(62,146,204,.06));
  border: 1px solid rgba(10,36,99,.1);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 12px;
}
.transit-header {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 10px;
}
.transit-icon { font-size: 16px; }
.transit-title { font-size: 13px; font-weight: 700; color: var(--primary); }
.transit-bar-wrap {
  overflow-x: auto;
  margin-bottom: 10px;
  padding-bottom: 4px;
}
.transit-bar {
  display: flex; align-items: flex-start;
  min-width: 480px;
  position: relative;
  padding: 0 4px;
}
.transit-bar::before {
  content: '';
  position: absolute;
  top: 9px; left: 12px; right: 12px;
  height: 3px;
  background: linear-gradient(90deg, var(--success) 0%, var(--accent) 40%, rgba(10,36,99,.15) 60%, rgba(10,36,99,.08) 100%);
  border-radius: 3px;
}
.transit-step {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  position: relative; z-index: 1;
}
.step-dot {
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--border);
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 2px var(--border);
  margin-bottom: 4px;
  transition: all .2s;
}
.transit-step.done .step-dot {
  background: var(--success);
  box-shadow: 0 0 0 2px var(--success);
}
.transit-step.active .step-dot {
  background: var(--accent);
  box-shadow: 0 0 0 2px var(--accent), 0 0 8px rgba(62,146,204,.4);
  animation: pulse-dot 2s infinite;
}
.step-lbl { font-size: 10px; color: var(--text-muted); font-weight: 600; text-align: center; white-space: nowrap; }
.step-days { font-size: 11px; color: var(--accent); font-weight: 700; }
.eta-row {
  display: flex; gap: 16px; flex-wrap: wrap;
  background: rgba(255,255,255,.6);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-bottom: 6px;
}
.eta-item { display: flex; flex-direction: column; gap: 2px; }
.eta-lbl { font-size: 10px; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .5px; }
.eta-val { font-size: 13px; font-weight: 700; color: var(--primary); }
.eta-note { font-size: 11px; color: var(--text-muted); opacity: .8; }

/* ── Delivery Remarks ── */
.remark-box {
  background: linear-gradient(135deg, rgba(240,165,0,.05), rgba(255,140,0,.03));
  border: 1px solid rgba(240,165,0,.18);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin-bottom: 8px;
}
.remark-header {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 10px;
}
.remark-icon { font-size: 15px; }
.remark-title { font-size: 13px; font-weight: 700; color: var(--gold); }
.remark-list { display: flex; flex-direction: column; gap: 7px; }
.remark-item {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 12.5px; color: var(--text);
  line-height: 1.5;
}
.remark-tag {
  padding: 2px 8px; border-radius: 8px;
  font-size: 10px; font-weight: 700; white-space: nowrap;
  flex-shrink: 0; margin-top: 1px;
}
.incoterm-tag { background: var(--primary); color: #fff; }
.delivery-tag { background: var(--accent); color: #fff; }
.remark-text { line-height: 1.5; }

.btn-select {
  padding: 8px 20px;
  background: linear-gradient(135deg, var(--primary), #163B9E);
  color: #fff; border: none; border-radius: var(--radius-sm);
  font-family: var(--font); font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all .2s;
  box-shadow: 0 2px 8px rgba(10,36,99,.3);
}
.btn-select:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(10,36,99,.4); }
.btn-select.selected {
  background: linear-gradient(135deg, var(--success), #009E75);
  box-shadow: 0 2px 8px rgba(0,196,140,.3);
}

/* ── Warehouse Tab ── */
.wh-section {
  margin-bottom: 28px;
}
.wh-section-title {
  font-size: 16px; font-weight: 700; color: var(--primary);
  margin-bottom: 14px;
  display: flex; align-items: center; gap: 10px;
}
.wh-section-title::after {
  content: ''; flex: 1;
  height: 1px; background: var(--border);
}
.wh-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.wh-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: transform .2s, box-shadow .2s;
}
.wh-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.wh-card-head {
  padding: 12px 16px;
  background: linear-gradient(135deg, var(--primary), #163B9E);
  display: flex; align-items: center; justify-content: space-between;
}
.wh-name { font-size: 14px; font-weight: 700; color: #fff; }
.wh-loc { font-size: 11px; color: rgba(255,255,255,.65); margin-top: 2px; }
.wh-badge { background: rgba(255,255,255,.15); color: #fff; padding: 2px 10px; border-radius: 10px; font-size: 10px; font-weight: 700; }
.wh-card-body { padding: 14px 16px; }
.wh-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 6px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 13px;
}
.wh-row:last-child { border-bottom: none; }
.wh-row .lbl { color: var(--text-muted); }
.wh-row .val { font-weight: 600; color: var(--text); }
.wh-row .val.highlight { color: var(--accent); font-size: 14px; }

/* ── Rates Table ── */
.rt { width: 100%; border-collapse: collapse; font-size: 13px; }
.rt th {
  padding: 10px 14px;
  background: var(--bg);
  font-size: 11px; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .8px;
  text-align: left; white-space: nowrap;
  border-bottom: 1px solid var(--border);
}
.rt td { padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.rt tr:last-child td { border-bottom: none; }
.rt tbody tr:hover { background: rgba(62,146,204,.04); }
.rt .finput { padding: 6px 10px; font-size: 13px; }
.rt select.finput { padding: 6px 8px; }

/* ── History Table ── */
.history-t td:nth-child(8) { font-weight: 700; color: var(--primary); }

/* ── Toast / Save Bar ── */
.save-bar {
  position: fixed; bottom: -80px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(135deg, var(--primary), #163B9E);
  color: #fff; padding: 12px 24px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; gap: 16px;
  font-size: 14px; font-weight: 500;
  box-shadow: var(--shadow-xl);
  transition: bottom .3s cubic-bezier(.4,0,.2,1);
  z-index: 9999;
  white-space: nowrap;
}
.save-bar.show { bottom: 24px; }
.btn-save-bar {
  padding: 7px 18px;
  background: var(--gold); color: #fff; border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font); font-size: 13px; font-weight: 700;
  cursor: pointer; transition: opacity .2s;
}
.btn-save-bar:hover { opacity: .85; }
.btn-dismiss {
  background: transparent; border: 1px solid rgba(255,255,255,.3);
  color: rgba(255,255,255,.7); padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-family: var(--font); font-size: 13px;
  cursor: pointer; transition: all .2s;
}
.btn-dismiss:hover { background: rgba(255,255,255,.1); color: #fff; }

/* ── Toast ── */
.toast-wrap {
  position: fixed; top: 20px; right: 20px; z-index: 99999;
  display: flex; flex-direction: column; gap: 10px;
  pointer-events: none;
}
.toast {
  background: var(--surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  border-left: 4px solid var(--accent);
  padding: 12px 18px;
  font-size: 13.5px; font-weight: 500; color: var(--text);
  display: flex; align-items: center; gap: 10px;
  animation: toastIn .3s cubic-bezier(.4,0,.2,1), toastOut .3s ease 2.7s forwards;
  max-width: 360px;
}
.toast.success { border-color: var(--success); }
.toast.error { border-color: var(--warn); }
.toast-icon { font-size: 18px; }
@keyframes toastIn { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: translateX(0); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(30px); } }

/* ── Selected Quote Panel ── */
#selectedPanel { margin-top: 20px; }

/* ── Print / Export ── */
.print-quote {
  background: var(--surface);
  border: 2px solid var(--primary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  padding: 28px;
  margin-top: 20px;
}
.print-header {
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 2px solid var(--border);
  padding-bottom: 16px; margin-bottom: 20px;
}
.print-co { font-size: 22px; font-weight: 800; color: var(--primary); }
.print-sub { font-size: 12px; color: var(--text-muted); }
.print-row { display: flex; justify-content: space-between; padding: 6px 0; font-size: 13px; border-bottom: 1px solid var(--border); }
.print-row .lbl { color: var(--text-muted); }
.print-row .val { font-weight: 600; }
.print-total { font-size: 20px; font-weight: 800; color: var(--primary); text-align: right; margin-top: 16px; }

/* ── Currency Switcher ── */
.ccy-switch {
  display: flex; align-items: center; gap: 6px;
  background: var(--bg); border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); padding: 4px;
}
.ccy-opt {
  padding: 4px 12px; border-radius: 6px;
  font-size: 12px; font-weight: 600;
  cursor: pointer; border: none; background: transparent;
  color: var(--text-muted); transition: all .15s;
  font-family: var(--font);
}
.ccy-opt.sel { background: var(--surface); color: var(--primary); box-shadow: var(--shadow-sm); }

/* ── Auto-update indicator ── */
.auto-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(0,196,140,.1); color: var(--success);
  padding: 4px 10px; border-radius: 10px;
  font-size: 11px; font-weight: 600;
}
.auto-badge .dot { width: 6px; height: 6px; }

/* ── Responsive ── */
@media (max-width: 900px) {
  .calc-layout { grid-template-columns: 1fr; }
  .form-panel { position: static; }
  .incoterm-grid { grid-template-columns: repeat(4, 1fr); }
  .mode-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 600px) {
  .header-inner { padding: 0 14px; }
  .fx-strip { display: none; }
  .main { padding: 16px 14px 40px; }
  .nav-tabs-inner { padding: 0 14px; overflow-x: auto; }
  .tab-btn { padding: 0 14px; font-size: 12px; white-space: nowrap; }
  .field-row { grid-template-columns: 1fr; }
  .incoterm-grid { grid-template-columns: repeat(2, 1fr); }
}
