/* IDEAL Slider — page chrome flips to dark aurora (matching isd.tools portal);
   form/sketch internals stay on a light white card for data-entry readability.
   The legacy clinical-blue palette below still drives the form internals. */

:root {
  /* ---- form internals (unchanged: clinical blue on white card) ---- */
  --bg: #E8F0FA;
  --bg-deep: #DCE7F5;
  --surface: #FFFFFF;
  --surface-2: #E5EDF7;
  --text: #0F172A;
  --text-muted: #4D6485;
  --text-faint: #8DA3C2;
  --border: #D4E1F0;
  --border-strong: #B7CCE3;
  --border-blue: #BFD9F4;

  --accent: #2563EB;
  --accent-hover: #1D4ED8;
  --accent-soft: #DBEAFE;
  --accent-softer: #EFF6FF;

  --teal: #0E7490;

  --red: #DC2626;
  --yellow: #D97706;
  --green: #059669;

  --shadow-sm: 0 1px 2px rgba(15,23,42,0.04);
  --shadow: 0 1px 3px rgba(15,23,42,0.06), 0 1px 2px rgba(15,23,42,0.04);
  --shadow-lg: 0 8px 24px rgba(15,23,42,0.08), 0 2px 6px rgba(15,23,42,0.04);

  --r-card: 12px;
  --r-input: 8px;
  --r-chip: 6px;

  --font-ui: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Cinzel', serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  /* ---- dark chrome (topbar + body bg + list view) ---- */
  --dark-bg-0: #0d1c1f;
  --dark-bg-1: #142528;
  --dark-bg-2: #1d3438;
  --dark-text: #efe9dd;
  --dark-muted: #9a9285;
  --dark-dim: #5a5346;
  --gold: #c8a96a;
  --gold-bright: #d4b888;
  --line-warm: rgba(200, 169, 106, 0.12);
  --line-warm-strong: rgba(200, 169, 106, 0.35);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--dark-bg-0);
  color: var(--dark-text);
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

button { font-family: inherit; cursor: pointer; }

/* ---------- Aurora background (drifting blobs, fixed behind everything) ---------- */

.aurora {
  position: fixed;
  inset: -10%;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.aurora .blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  will-change: transform;
}
.aurora .b1 {
  width: 620px; height: 620px;
  background: radial-gradient(circle at center, #2E5960 0%, transparent 70%);
  top: -180px; left: -160px;
  opacity: 0.45;
  animation: drift1 28s ease-in-out infinite;
}
.aurora .b2 {
  width: 520px; height: 520px;
  background: radial-gradient(circle at center, #c8a96a 0%, transparent 70%);
  top: 30%; right: -160px;
  opacity: 0.20;
  animation: drift2 34s ease-in-out infinite;
}
.aurora .b3 {
  width: 580px; height: 580px;
  background: radial-gradient(circle at center, #b87253 0%, transparent 70%);
  bottom: -200px; left: 30%;
  opacity: 0.18;
  animation: drift3 40s ease-in-out infinite;
}
@keyframes drift1 {
  0%, 100% { transform: translate(0,0) scale(1); }
  50%      { transform: translate(80px,60px) scale(1.1); }
}
@keyframes drift2 {
  0%, 100% { transform: translate(0,0) scale(1); }
  50%      { transform: translate(-100px,40px) scale(1.08); }
}
@keyframes drift3 {
  0%, 100% { transform: translate(0,0) scale(1); }
  50%      { transform: translate(60px,-50px) scale(1.12); }
}

/* ---------- Topbar (dark, frosted, gold brand) ---------- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  padding: 0 28px;
  background: rgba(13, 28, 31, 0.55);
  border-bottom: 1px solid var(--line-warm);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 12px;
  color: inherit;
}
.brand-mark { display: none; }
.brand-prefix {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.18em;
  color: var(--gold);
  padding-right: 12px;
  border-right: 1px solid var(--line-warm-strong);
  text-shadow: 0 0 24px rgba(200, 169, 106, 0.25);
}
.brand-text {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 17px;
  letter-spacing: 0.10em;
  color: var(--dark-text);
}
.brand-tag {
  font-size: 10px;
  font-weight: 600;
  color: var(--dark-muted);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  padding: 3px 9px;
  border: 1px solid var(--line-warm);
  border-radius: 999px;
  background: rgba(29, 52, 56, 0.55);
}
a.brand:hover .brand-text { color: var(--gold-bright); }
a.brand:hover .brand-prefix { color: var(--gold-bright); }

.topbar-right {
  display: flex;
  align-items: center;
  gap: 14px;
}
.viewer-email {
  font-size: 12px;
  color: var(--dark-muted);
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* topbar-scoped ghost button (sign out) — dark theme, no leak into form's Cancel button */
.topbar .btn-ghost {
  background: rgba(29, 52, 56, 0.5);
  border: 1px solid var(--line-warm);
  color: var(--dark-muted);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.topbar .btn-ghost:hover {
  background: rgba(29, 52, 56, 0.8);
  border-color: color-mix(in srgb, var(--gold) 45%, var(--line-warm));
  color: var(--gold);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 16px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: white;
  font-weight: 600;
  font-size: 14px;
  border-radius: var(--r-input);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn:disabled,
.btn[disabled] {
  background: var(--border-strong);
  border-color: var(--border-strong);
  color: white;
  cursor: not-allowed;
  opacity: 0.7;
}

/* Place Order button — maroon so it visually matches the tab + order page */
.btn.btn-order {
  background: #A21C2C;
  border-color: #A21C2C;
}
.btn.btn-order:hover {
  background: #7F1024;
  border-color: #7F1024;
}
.btn.btn-order:disabled,
.btn.btn-order[disabled] {
  background: var(--border-strong);
  border-color: var(--border-strong);
}
/* Armed (second-click) state — pulsing brighter red to signal "click again to fire" */
.btn.btn-order.btn-order-armed {
  background: #DC2626;
  border-color: #DC2626;
  letter-spacing: 0.08em;
  animation: btn-order-armed-pulse 1.1s ease-in-out infinite;
}
.btn.btn-order.btn-order-armed:hover {
  background: #B91C1C;
  border-color: #B91C1C;
}
@keyframes btn-order-armed-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.55); }
  50%      { box-shadow: 0 0 0 8px rgba(220, 38, 38, 0); }
}

/* Generic armed state for the default (blue) buttons — pulsing brighter blue.
   Same UX cue as the order button but in the regular accent palette. */
.btn.btn-armed {
  background: #1D4ED8;
  border-color: #1D4ED8;
  letter-spacing: 0.08em;
  animation: btn-armed-pulse 1.1s ease-in-out infinite;
}
.btn.btn-armed:hover {
  background: #1E40AF;
  border-color: #1E40AF;
}
@keyframes btn-armed-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.55); }
  50%      { box-shadow: 0 0 0 8px rgba(37, 99, 235, 0); }
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text-muted);
  font-weight: 500;
  font-size: 13px;
  border-radius: var(--r-input);
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.btn-ghost:hover { background: var(--surface-2); color: var(--text); border-color: var(--border-blue); }
.btn-ghost.btn-sm { padding: 5px 10px; font-size: 12px; }

/* ---------- Main / hero ---------- */

main {
  max-width: 880px;
  margin: 0 auto;
  padding: 48px 24px;
  position: relative;
  z-index: 1;
}

.hero {
  background: var(--surface);
  border: 1px solid var(--border-blue);
  border-radius: var(--r-card);
  padding: 40px 36px;
  box-shadow: var(--shadow);
}
.hero h1 {
  margin: 0 0 8px;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--text);
}
.hero .sub {
  margin: 0 0 24px;
  color: var(--text-muted);
  font-size: 15px;
}
.hero .actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.coming-soon {
  margin-top: 24px;
  padding: 16px 18px;
  background: var(--accent-softer);
  border: 1px dashed var(--border-blue);
  border-radius: var(--r-input);
  color: var(--text-muted);
  font-size: 13px;
}

.signin-card {
  max-width: 420px;
  margin: 80px auto 0;
  background: var(--surface);
  border: 1px solid var(--border-blue);
  border-radius: var(--r-card);
  padding: 32px;
  text-align: center;
  box-shadow: var(--shadow-lg);
}
.signin-card h1 {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
}
.signin-card .sub {
  color: var(--text-muted);
  margin: 0 0 24px;
  font-size: 14px;
}

.loading {
  text-align: center;
  color: var(--dark-muted);
  padding: 80px 24px;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.error {
  max-width: 720px;
  margin: 32px auto;
  padding: 16px 18px;
  background: rgba(220, 38, 38, 0.10);
  border: 1px solid rgba(220, 38, 38, 0.45);
  border-radius: var(--r-input);
  color: #fca5a5;
  font-size: 14px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* ---------- List view (dark) ---------- */

.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line-warm);
}
.page-head h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--dark-text);
  text-shadow: 0 0 28px rgba(200, 169, 106, 0.18);
}
/* "+ New Slider" primary button on dark — give it a gold glow */
.page-head .btn {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--dark-bg-0);
  box-shadow: 0 0 24px -8px rgba(200, 169, 106, 0.55);
}
.page-head .btn:hover {
  background: var(--gold-bright);
  border-color: var(--gold-bright);
}

.empty {
  background: linear-gradient(180deg, rgba(29, 52, 56, 0.55) 0%, rgba(13, 28, 31, 0.40) 100%);
  border: 1px dashed var(--line-warm-strong);
  border-radius: var(--r-card);
  padding: 56px 24px;
  text-align: center;
  color: var(--dark-muted);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.empty p { margin: 0 0 16px; }
.empty .btn {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--dark-bg-0);
}
.empty .btn:hover {
  background: var(--gold-bright);
  border-color: var(--gold-bright);
}

.empty-tab {
  background: var(--surface);
  border: 1px dashed var(--border-blue);
  border-radius: var(--r-card);
  padding: 32px 24px;
  text-align: center;
  color: var(--text-muted);
}
.empty-tab p { margin: 0; }

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px 18px;
  max-width: 640px;
}
.our-cost-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 18px;
  max-width: 640px;
}
.our-cost-actual { grid-column: 1; grid-row: 1; }
.our-cost-calc   { grid-column: 2; grid-row: 1; }
.our-cost-quote  { grid-column: 1; grid-row: 2; }
@media (max-width: 600px) {
  .our-cost-grid { grid-template-columns: 1fr; }
  .our-cost-actual,
  .our-cost-calc,
  .our-cost-quote { grid-column: 1; grid-row: auto; }
}
.field .field-hint {
  font-size: 12px;
  color: var(--text-muted);
}
.input-readonly {
  background: var(--accent-softer) !important;
  color: var(--text-muted) !important;
  cursor: not-allowed;
}
.field-grand-total {
  grid-column: 1 / -1;
  margin-top: 8px;
  padding: 14px 16px;
  background: var(--accent-softer);
  border: 1px solid var(--accent);
  border-radius: var(--r-card);
}
.field-grand-total .field-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.input-grand-total {
  font-weight: 700 !important;
  color: var(--text) !important;
  font-size: 28px !important;
  padding: 14px 16px !important;
  background: var(--surface) !important;
  border-color: var(--accent) !important;
  letter-spacing: -0.01em;
  cursor: default !important;
}
.field-grand-total .field-hint {
  color: var(--text-muted);
  font-size: 12px;
}

.pricing-warning {
  margin-top: 8px;
  padding: 8px 12px;
  background: rgba(220, 38, 38, 0.08);
  border: 1px solid rgba(220, 38, 38, 0.30);
  border-radius: var(--r-input);
  color: var(--red);
  font-weight: 600;
  font-size: 13px;
}

.specs-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: linear-gradient(180deg, rgba(29, 52, 56, 0.78) 0%, rgba(13, 28, 31, 0.55) 100%);
  border: 1px solid var(--line-warm);
  border-radius: var(--r-card);
  overflow: hidden;
  box-shadow: 0 18px 36px -16px rgba(0, 0, 0, 0.7);
  font-size: 13px;
  color: var(--dark-text);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.specs-table thead th {
  text-align: left;
  font-weight: 700;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--gold);
  padding: 14px 16px;
  background: rgba(13, 28, 31, 0.45);
  border-bottom: 1px solid var(--line-warm-strong);
}
.specs-table tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line-warm);
  vertical-align: middle;
  color: var(--dark-text);
}
.specs-table tbody td.mono,
.specs-table tbody td.muted { color: var(--dark-muted); }
.specs-table tbody td.strong { color: var(--dark-text); font-weight: 600; }
.specs-table tbody tr:last-child td { border-bottom: none; }
.specs-table tbody tr.row-link { cursor: pointer; transition: background 0.18s; }
.specs-table tbody tr.row-link:hover {
  background: rgba(200, 169, 106, 0.08);
}
.specs-table tbody tr.row-link:hover td.muted { color: var(--dark-text); }
.pricing-cell { text-align: center; font-size: 16px; }
.th-center { text-align: center; }
.status-link {
  text-decoration: none;
  display: inline-block;
  line-height: 1;
}
.status-link:hover { transform: scale(1.18); transition: transform 0.12s ease-out; }

.notes-row {
  margin-bottom: 24px;
}
.notes-textarea {
  width: 100%;
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
  padding: 10px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-input);
  background: var(--surface);
  resize: vertical;
  min-height: 90px;
  line-height: 1.5;
  transition: border-color 0.12s, box-shadow 0.12s;
}
.notes-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.mono { font-family: var(--font-mono); color: var(--text-muted); }
.strong { font-weight: 600; }
.muted { color: var(--text-muted); }

/* ---------- Form ---------- */

.spec-form {
  background: var(--surface);
  border: 1px solid var(--line-warm);
  border-radius: var(--r-card);
  padding: 0 32px 24px;
  box-shadow:
    0 24px 48px -20px rgba(0, 0, 0, 0.55),
    0 6px 14px -8px rgba(0, 0, 0, 0.35);
  position: relative;
}

/* ---------- Tab bar ---------- */
.tab-bar {
  display: flex;
  gap: 4px;
  margin: 0 -32px 28px;
  padding: 0 24px;
  border-bottom: 1px solid var(--border-blue);
  background: var(--surface-2);
  border-radius: var(--r-card) var(--r-card) 0 0;
}
.tab {
  appearance: none;
  background: transparent;
  border: none;
  padding: 16px 18px 14px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
  transition: color 0.12s, border-color 0.12s;
}
.tab:hover { color: var(--text); }
.tab-active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* Place Order tab — distinct maroon styling so it doesn't look like Quote */
.tab.tab-order {
  color: #A21C2C;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.tab.tab-order:hover { color: #7F1024; }
.tab.tab-order.tab-active {
  color: #7F1024;
  border-bottom-color: #A21C2C;
}
.tab-panel { display: none; }
.tab-panel-active { display: block; }

.tab-empty {
  text-align: center;
  padding: 60px 24px;
  color: var(--text-muted);
}
.tab-empty-title {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
.tab-empty-sub {
  margin: 0 auto;
  max-width: 420px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-faint);
}

/* ---------- Vendor cards ---------- */
.vendor-list {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 12px;
  margin: 4px 0 18px;
}
.vendor-list .vendor-card { flex: 1 1 240px; }
@media (max-width: 720px) {
  .vendor-list { flex-direction: column; }
  .vendor-list .vendor-card { flex: 1 1 auto; }
}

.po-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 4px 0 18px;
  max-width: 320px;
}
.po-row label {
  font-weight: 600;
  font-size: 13px;
  color: var(--text);
}
.po-hint {
  font-size: 12px;
  color: var(--text-muted);
}
.vendor-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-input);
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s, box-shadow 0.12s;
}
.vendor-card:hover {
  border-color: var(--border-blue);
  background: var(--accent-softer);
}
.vendor-card-selected {
  border-color: var(--accent);
  background: var(--accent-softer);
  box-shadow: 0 0 0 1px var(--accent);
}
/* Place Order tab — maroon selection ring instead of blue */
.vendor-list-order .vendor-card-selected {
  border-color: #A21C2C;
  background: rgba(162, 28, 44, 0.06);
  box-shadow: 0 0 0 1px #A21C2C;
}
.vendor-list-order .vendor-card-selected .vendor-radio-indicator { border-color: #A21C2C; }
.vendor-list-order .vendor-card-selected .vendor-radio-indicator::after { background: #A21C2C; }
.vendor-radio-indicator {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border-strong);
  border-radius: 50%;
  flex-shrink: 0;
  position: relative;
  transition: border-color 0.12s;
}
.vendor-card-selected .vendor-radio-indicator { border-color: var(--accent); }
.vendor-card-selected .vendor-radio-indicator::after {
  content: "";
  position: absolute;
  inset: 3px;
  background: var(--accent);
  border-radius: 50%;
}
.vendor-info { flex: 1; min-width: 0; }
.vendor-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
}
.vendor-email {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
  font-family: var(--font-mono);
}

.vendor-actions {
  display: flex;
  justify-content: flex-start;
  margin-top: 8px;
}

/* Order status banner (Place Order tab) */
.order-status {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-radius: 12px;
  margin-bottom: 24px;
  border: 1px solid transparent;
}
.order-status-empty {
  background: rgba(148, 163, 184, 0.10);
  border-color: rgba(148, 163, 184, 0.30);
}
.order-status-placed {
  background: rgba(16, 122, 87, 0.10);
  border-color: rgba(16, 122, 87, 0.45);
}
.order-status-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #107a57;
  color: white;
  font-weight: 700;
  font-size: 18px;
  flex-shrink: 0;
}
.order-status-text { display: flex; flex-direction: column; gap: 2px; }
.order-status-title {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
}
.order-status-placed .order-status-title { color: #0a5c41; }
.order-status-sub {
  font-size: 12px;
  color: var(--text-muted);
}

.section-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 28px 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-blue);
}
.section-head:first-of-type { margin-top: 0; }
.section-head h2 {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
}
.section-hint {
  font-size: 12px;
  color: var(--text-muted);
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px 18px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.field-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.01em;
}
.field input[type="text"],
.field select {
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
  padding: 9px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-input);
  background: var(--surface);
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color 0.12s, box-shadow 0.12s;
}
.field input[type="text"]:focus,
.field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.field select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path fill='%234D6485' d='M0 0l5 6 5-6z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

.oop-field .oop-row {
  display: grid;
  grid-template-columns: minmax(80px, 0.7fr) 1.3fr;
  gap: 8px;
}

/* ---------- Lower form: 2-col split with rendering pane on right ---------- */

.form-bottom {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: 28px;
  margin-top: 28px;
  align-items: start;
}
.form-bottom-left {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.form-bottom-left .section-head:first-child { margin-top: 0; }
.form-bottom-right {
  position: sticky;
  top: 80px;
}
.rendering-pane {
  background: #F4F6F9;
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  min-height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.rendering-placeholder {
  text-align: center;
  color: var(--text-muted);
  max-width: 280px;
}
.rendering-placeholder svg {
  color: var(--text-faint);
  margin-bottom: 12px;
}
.rendering-placeholder .rp-title {
  font-weight: 600;
  color: var(--text);
  font-size: 14px;
  margin-bottom: 6px;
}
.rendering-placeholder .rp-sub {
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-faint);
}

@media (max-width: 900px) {
  .form-bottom {
    grid-template-columns: 1fr;
  }
  .form-bottom-right {
    position: static;
  }
  .rendering-pane {
    min-height: 240px;
  }
}

.calc-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 14px;
}
.calc-row .calc-pill { margin-top: 0; }
@media (max-width: 640px) {
  .calc-row { grid-template-columns: 1fr; }
}

.calc-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding: 10px 14px;
  background: var(--accent-softer);
  border: 1px solid var(--border-blue);
  border-radius: var(--r-input);
  font-size: 13px;
}
.calc-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
}
.calc-value {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 15px;
  color: var(--text);
  padding: 2px 8px;
  background: var(--surface);
  border: 1px solid var(--border-blue);
  border-radius: var(--r-chip);
  min-width: 60px;
  text-align: center;
}
.calc-hint {
  color: var(--text-faint);
  font-size: 12px;
}

.req-mark {
  color: var(--red);
  margin-left: 4px;
  font-weight: 600;
}

.form-error {
  margin-top: 20px;
  padding: 10px 14px;
  background: var(--red-bg);
  border: 1px solid var(--red-border);
  border-radius: var(--r-input);
  color: var(--red);
  font-size: 13px;
}

.missing-hint {
  margin-top: 20px;
  padding: 10px 14px;
  background: #FFF7ED;
  border: 1px solid #FED7AA;
  border-radius: var(--r-input);
  color: #9A3412;
  font-size: 13px;
  line-height: 1.5;
}
.missing-hint strong {
  font-weight: 600;
  color: #7C2D12;
}
.missing-hint .missing-list {
  margin: 6px 0 0;
  padding-left: 20px;
}
.missing-hint .missing-list li {
  margin: 2px 0;
}

.action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border-blue);
}
.action-bar .btn { margin-left: auto; }
.action-bar .btn-ghost + .meta-line { margin-left: 12px; }
.meta-line {
  font-size: 12px;
  color: var(--text-faint);
  flex: 1;
}
