/* ==========================================================================
   ADSPEND PRO — MULTI-VIEW STYLESHEET (HARDWARE + COMPACT NO-SLIDERS)
   ========================================================================== */

:root {
  /* Studio Background */
  --desk-bg: #1a1e26;
  --desk-gradient: radial-gradient(circle at 50% 30%, #28303e 0%, #12151d 100%);

  /* Metallic Calculator */
  --metal-silver: linear-gradient(145deg, #e4e7eb 0%, #cbd3dc 45%, #b4bcc6 100%);
  --metal-border: #ffffff;
  --metal-shadow: 0 30px 70px -15px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.25);

  /* Amber Vintage LCD Glow */
  --lcd-frame: #0d0f14;
  --lcd-bg: radial-gradient(ellipse at center, #ffa726 0%, #fb8c00 70%, #ef6c00 100%);
  --lcd-text: #1a1600;

  /* Keypad Button Colors */
  --key-cream: linear-gradient(180deg, #fbf7f0 0%, #e6ddd2 100%);
  --key-cream-border: #d5c8ba;
  --key-orange: linear-gradient(180deg, #fb923c 0%, #ea580c 100%);
  --key-orange-border: #c2410c;
  --key-peach: linear-gradient(180deg, #ffedd5 0%, #fed7aa 100%);
  --key-peach-border: #fdba74;
  --key-grey: linear-gradient(180deg, #a8b0bd 0%, #8892a0 100%);
  --key-grey-border: #6d7888;
  --key-black: linear-gradient(180deg, #2b303a 0%, #181b22 100%);
  --key-black-border: #0f1217;

  /* Thermal Paper Receipt */
  --paper-bg: #ffffff;
  --paper-text: #000000;
  --paper-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 2px 4px rgba(0, 0, 0, 0.2);

  /* Compact Dashboard Colors (White & Blue) */
  --c-bg: #f8fafc;
  --c-card: #ffffff;
  --c-border: #e2e8f0;
  --c-blue: #2563eb;
  --c-blue-light: #eff6ff;
  --c-blue-border: #bfdbfe;
  --c-green: #059669;
  --c-green-bg: #ecfdf5;
  --c-red: #dc2626;

  /* Fonts */
  --font-lcd: 'Chivo Mono', monospace;
  --font-sans: 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-receipt: 'Chivo Mono', monospace;
}

/* Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

body.studio-desk-scene, body {
  font-family: var(--font-sans);
  background: var(--desk-gradient);
  background-color: var(--desk-bg);
  color: #ffffff;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 14px 16px 24px;
  position: relative;
  overflow-x: hidden;
}

/* Ambient Overhead Light */
.ambient-glow {
  position: fixed;
  top: -150px;
  left: 50%;
  transform: translateX(-50%);
  width: 950px;
  height: 550px;
  background: radial-gradient(ellipse, rgba(255, 255, 255, 0.08) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
}

/* ==========================================================================
   TOP UTILITIES & VIEW SWITCHER BAR
   ========================================================================== */

.top-nav-shelf {
  width: 100%;
  max-width: 1060px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  background: rgba(18, 22, 30, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  margin-bottom: 24px;
  position: relative;
  z-index: 10;
  gap: 12px;
  flex-wrap: wrap;
}

.shelf-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tm-logo-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, #ea580c 0%, #f59e0b 100%);
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(234, 88, 12, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.tm-logo-text {
  font-family: var(--font-lcd);
  font-size: 0.82rem;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: -0.05em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.shelf-title {
  font-family: var(--font-lcd);
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #f8fafc;
}

.shelf-title strong {
  color: #ea580c;
}

/* View Mode Pill Switcher */
.view-mode-pill-toggle {
  display: flex;
  background: #0d1118;
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 3px;
  border-radius: 8px;
  gap: 3px;
}

.view-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: 0.15s ease;
}

.view-btn:hover {
  color: #fff;
}

.view-btn.active {
  background: #2563eb;
  color: #fff;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.4);
}

.shelf-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.shelf-select-wrap {
  display: flex;
  align-items: center;
  background: #0d1118;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  padding: 0 6px;
  height: 28px;
}

.shelf-sym {
  font-family: var(--font-lcd);
  font-weight: 800;
  color: #f59e0b;
  font-size: 0.85rem;
  margin-right: 2px;
}

.shelf-select-wrap select {
  background: transparent;
  border: none;
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 14px 2px 2px;
  cursor: pointer;
  outline: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='8' height='5' viewBox='0 0 8 5' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L4 4L7 1' stroke='%23F59E0B' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 2px center;
}

.shelf-select-wrap select option {
  background: #1e2430;
  color: #fff;
}

.btn-shelf {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 28px;
  padding: 0 10px;
  background: #1f2737;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: 0.15s ease;
}

.btn-shelf:hover {
  background: #2b364c;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
}

/* Preset Dropdown */
.shelf-dropdown-wrap { position: relative; }
.dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  width: 240px;
  background: #161c28;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 6px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
  z-index: 50;
  display: none;
  flex-direction: column;
  gap: 2px;
}
.dropdown-menu.show { display: flex; }
.dropdown-item {
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  padding: 6px 8px;
  border-radius: 4px;
  color: #fff;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}
.dropdown-item strong { font-size: 0.78rem; color: #f8fafc; }
.dropdown-item small { font-size: 0.68rem; color: #94a3b8; }
.dropdown-item:hover { background: rgba(245, 158, 11, 0.15); }
.dropdown-item:hover strong { color: #f59e0b; }

/* ==========================================================================
   VIEW 1: EXACT PHOTO MATCH (HARDWARE POCKET CALCULATOR & TAPE)
   ========================================================================== */

.exact-photo-layout {
  display: grid;
  grid-template-columns: 370px 480px;
  gap: 48px;
  align-items: start;
  position: relative;
  z-index: 1;
}

@media (max-width: 900px) {
  .exact-photo-layout {
    grid-template-columns: 1fr;
    gap: 36px;
  }
}

/* Calculator Device Chassis */
.calculator-hardware-device {
  width: 370px;
  background: var(--metal-silver);
  border-radius: 38px;
  padding: 20px 18px 22px;
  box-shadow: var(--metal-shadow);
  border: 2px solid var(--metal-border);
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
}

/* Right Edge Hardware Power Button */
.calculator-hardware-device::after {
  content: '';
  position: absolute;
  right: -7px;
  top: 60px;
  width: 7px;
  height: 32px;
  background: linear-gradient(180deg, #9ca3af 0%, #6b7280 100%);
  border-radius: 0 4px 4px 0;
  box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4);
}

.calc-top-labels {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 6px;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 700;
  color: #374151;
  letter-spacing: 0.05em;
}

/* Glowing Amber LCD */
.calc-lcd-screen {
  background: var(--lcd-bg);
  border-radius: 18px;
  padding: 12px 14px;
  border: 4px solid var(--lcd-frame);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.6), 0 2px 4px rgba(255, 255, 255, 0.4);
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--lcd-text);
  font-family: var(--font-lcd);
}

.lcd-row-top {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.lcd-row-main {
  display: flex;
  align-items: baseline;
  margin: 2px 0;
}

.lcd-currency-sign {
  font-size: 1.9rem;
  font-weight: 900;
  line-height: 1;
  margin-right: 2px;
}

.lcd-main-digits {
  font-size: 2.75rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1;
}

.lcd-row-bottom-1, .lcd-row-bottom-2 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.68rem;
  font-weight: 800;
}

.lcd-mode-selector {
  text-align: center;
  font-size: 0.65rem;
  font-weight: 800;
  color: #4b5563;
  font-family: var(--font-lcd);
}

.lcd-mode-selector strong {
  color: #ea580c;
}

/* COMPLETE 5-ROW KEYPAD (WITH 7, 8, 9, 4, 5, 6, 1, 2, 3, 0, .) */
.photo-keypad-matrix {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  padding: 2px;
}

.calc-btn {
  width: 62px;
  height: 56px;
  border-radius: 28px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  font-family: var(--font-sans);
  font-size: 1.15rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2), inset 0 1px 1px rgba(255, 255, 255, 0.5), inset 0 -2px 3px rgba(0, 0, 0, 0.2);
  transition: transform 0.05s ease, box-shadow 0.05s ease;
}

.calc-btn:active {
  transform: translateY(2px);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.calc-btn.btn-cream {
  background: var(--key-cream);
  border-color: var(--key-cream-border);
  color: #1f2937;
  font-size: 0.92rem;
}

.calc-btn.btn-orange {
  background: var(--key-orange);
  border-color: var(--key-orange-border);
  color: #111827;
  font-weight: 800;
  font-size: 1.05rem;
}

.calc-btn.btn-peach {
  background: var(--key-peach);
  border-color: var(--key-peach-border);
  color: #1f2937;
  font-size: 1.3rem;
}

.calc-btn.btn-grey {
  background: var(--key-grey);
  border-color: var(--key-grey-border);
  color: #111827;
  font-size: 1.25rem;
  font-weight: 700;
}

.calc-btn.btn-black {
  background: var(--key-black);
  border-color: var(--key-black-border);
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 800;
}

/* Device Direct Numeric Inputs Box */
.device-sliders-panel {
  background: rgba(255, 255, 255, 0.4);
  border-radius: 12px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.direct-input-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.direct-input-box label {
  font-size: 0.72rem;
  font-weight: 700;
  color: #374151;
}

.hw-input-wrap {
  display: flex;
  align-items: center;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 2px 6px;
  width: 130px;
}

.hw-prefix, .hw-suffix {
  font-family: var(--font-lcd);
  font-size: 0.75rem;
  font-weight: 700;
  color: #64748b;
}

.hw-num-input {
  flex: 1;
  background: transparent;
  border: none;
  color: #0f172a;
  font-family: var(--font-lcd);
  font-size: 0.85rem;
  font-weight: 800;
  padding: 2px 4px;
  text-align: right;
  outline: none;
  width: 100%;
}

/* Right Thermal Paper Receipt */
.receipt-and-distribution-column {
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: relative;
}

.spool-housing {
  width: 100%;
  height: 24px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.spool-metal-bar {
  position: absolute;
  left: -20px;
  right: -20px;
  height: 10px;
  background: linear-gradient(180deg, #9ca3af 0%, #4b5563 50%, #1f2937 100%);
  border-radius: 5px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

.paper-roll-cylinder {
  width: 80%;
  height: 24px;
  background: linear-gradient(180deg, #ffffff 0%, #e5e7eb 50%, #d1d5db 100%);
  border-radius: 12px;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.35);
  position: relative;
  z-index: 2;
}

.thermal-paper-sheet {
  background: var(--paper-bg);
  color: var(--paper-text);
  font-family: var(--font-receipt);
  padding: 24px 28px;
  box-shadow: var(--paper-shadow);
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
  margin-top: -12px;
}

.receipt-headline {
  font-size: 1.15rem;
  font-weight: 900;
  text-align: left;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}

/* Editable Date & Campaign Lines on Receipt */
.receipt-meta-editable-line {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #333333;
}

.r-meta-prefix {
  font-weight: 700;
  color: #111;
}

.receipt-inline-input {
  background: transparent;
  border: none;
  border-bottom: 1px dashed transparent;
  color: #111827;
  font-family: var(--font-receipt);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 1px 4px;
  outline: none;
  transition: 0.15s ease;
}

.receipt-inline-input:hover, .receipt-inline-input:focus {
  background: #f1f5f9;
  border-bottom-color: #2563eb;
}

.campaign-name-input {
  font-weight: 800;
  color: #1e3a8a;
  flex: 1;
}

.receipt-dashed-line {
  font-family: var(--font-receipt);
  font-size: 0.85rem;
  color: #333333;
  margin: 4px 0;
  letter-spacing: -0.05em;
  user-select: none;
}

.receipt-data-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.95rem;
  font-weight: 700;
}

.receipt-data-row.bold-row { font-weight: 900; }
.receipt-data-row.indent-row { padding-left: 12px; font-size: 0.9rem; }
.receipt-section-title { font-size: 0.95rem; font-weight: 800; margin-top: 2px; }
.highlight-profit-row { font-weight: 900; font-size: 1.05rem; }

.tape-actions-row {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
}

.btn-tape-link {
  background: #f1f5f9;
  border: 1px dashed #94a3b8;
  color: #1e293b;
  font-family: var(--font-receipt);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
}
.btn-tape-link:hover { background: #e2e8f0; }

.receipt-serrated-bottom {
  position: absolute;
  bottom: -10px;
  left: 0;
  right: 0;
  height: 10px;
  background-image: radial-gradient(circle at 10px 10px, transparent 10px, #ffffff 10.5px);
  background-size: 20px 10px;
  background-repeat: repeat-x;
}

/* Revenue Distribution Bar & Bracket Below Receipt */
.distribution-bar-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 4px;
}

.dist-title-label {
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 700;
  color: #ffffff;
}

.distribution-pill-bar {
  height: 28px;
  background: #111827;
  border-radius: 4px;
  display: flex;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

.dist-seg {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 800;
  color: #ffffff;
  white-space: nowrap;
  padding: 0 6px;
  transition: width 0.2s ease;
}

.seg-orange { background: #ea580c; }
.seg-blue { background: #0284c7; }
.seg-green { background: #16a34a; }

.dimension-bracket {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #cbd5e1;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 700;
}

.bracket-line-left, .bracket-line-right {
  flex: 1;
  height: 1px;
  background: #cbd5e1;
  position: relative;
}

.bracket-line-left::before {
  content: '';
  position: absolute;
  left: 0;
  top: -4px;
  width: 1px;
  height: 9px;
  background: #cbd5e1;
}

.bracket-line-right::after {
  content: '';
  position: absolute;
  right: 0;
  top: -4px;
  width: 1px;
  height: 9px;
  background: #cbd5e1;
}

.bracket-text { white-space: nowrap; }

/* ==========================================================================
   VIEW 2: COMPACT FINTECH DASHBOARD (Clean White & Blue, No Sliders!)
   ========================================================================== */

.compact-dashboard-layout {
  width: 100%;
  max-width: 1060px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.compact-kpi-banner {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  padding: 12px 18px;
  background: #ffffff;
  border: 1px solid var(--c-blue-border);
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.08);
  gap: 20px;
}

.kpi-card-main {
  display: flex;
  flex-direction: column;
  padding-right: 20px;
  border-right: 1px solid #e2e8f0;
}

.kpi-tag {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #64748b;
}

.kpi-profit-flex {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.kpi-main-num {
  font-family: var(--font-lcd);
  font-size: 1.85rem;
  font-weight: 900;
  color: var(--c-green);
  line-height: 1.1;
}

.kpi-margin-pill {
  font-family: var(--font-lcd);
  font-size: 0.75rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 9999px;
  background: var(--c-green-bg);
  color: var(--c-green);
  border: 1px solid #a7f3d0;
}

.kpi-sub-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.kpi-cell { display: flex; flex-direction: column; }
.kpi-lbl { font-size: 0.7rem; font-weight: 600; color: #64748b; }
.kpi-num { font-family: var(--font-lcd); font-size: 1.05rem; font-weight: 800; color: #0f172a; }
.kpi-num.blue { color: var(--c-blue); }
.kpi-num.amber { color: #d97706; }
.kpi-num.purple { color: #7c3aed; }

/* Compact Main 2-Column Grid */
.compact-main-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

@media (max-width: 800px) {
  .compact-main-grid { grid-template-columns: 1fr; }
  .compact-kpi-banner { grid-template-columns: 1fr; gap: 10px; }
  .kpi-card-main { border-right: none; border-bottom: 1px solid #e2e8f0; padding-bottom: 8px; }
  .kpi-sub-grid { grid-template-columns: 1fr 1fr; }
}

.compact-panel {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.panel-head-sm {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 8px;
  border-bottom: 1px solid #e2e8f0;
}

.panel-title-sm { font-size: 0.85rem; font-weight: 800; color: #0f172a; }
.badge-active-tag { font-size: 0.68rem; font-weight: 700; color: var(--c-blue); background: var(--c-blue-light); padding: 2px 6px; border-radius: 4px; }

.compact-inputs-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.compact-field-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.compact-field-card:focus-within {
  border-color: var(--c-blue);
  background: #ffffff;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12);
}

.field-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.compact-field-card label {
  font-size: 0.75rem;
  font-weight: 700;
  color: #334155;
  display: flex;
  align-items: center;
  gap: 6px;
}

.dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.dot-orange { background: #ea580c; }
.dot-blue { background: #2563eb; }
.dot-purple { background: #7c3aed; }

.field-val-hint { font-family: var(--font-lcd); font-size: 0.78rem; font-weight: 800; color: #0f172a; }

.field-input-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.input-with-sym {
  flex: 1;
  display: flex;
  align-items: center;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 2px 8px;
  height: 32px;
}

.input-sym { font-family: var(--font-lcd); font-size: 0.85rem; font-weight: 800; color: #64748b; }
.compact-ctrl {
  flex: 1;
  background: transparent;
  border: none;
  color: #0f172a;
  font-family: var(--font-lcd);
  font-size: 0.95rem;
  font-weight: 800;
  padding: 2px 4px;
  outline: none;
  width: 100%;
}

.btn-step-group { display: flex; gap: 3px; }
.step-btn {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #334155;
  font-family: var(--font-lcd);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 7px;
  border-radius: 4px;
  cursor: pointer;
}
.step-btn:hover { background: var(--c-blue-light); color: var(--c-blue); border-color: var(--c-blue); }

/* Custom Overheads in Compact Mode */
.compact-custom-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-top: 1px solid #e2e8f0;
  padding-top: 8px;
}

.custom-head-row { display: flex; justify-content: space-between; align-items: center; }
.custom-sec-title { font-size: 0.75rem; font-weight: 800; color: #0f172a; }
.btn-add-chip { background: var(--c-blue-light); border: 1px dashed var(--c-blue); color: var(--c-blue); font-size: 0.7rem; font-weight: 700; padding: 2px 8px; border-radius: 4px; cursor: pointer; }

.compact-custom-list { display: flex; flex-direction: column; gap: 4px; }
.compact-custom-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #0f172a;
}

/* Compact Financial Ledger */
.btn-copy-sm {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #334155;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
}
.btn-copy-sm:hover { background: var(--c-blue-light); color: var(--c-blue); }

.compact-ledger-rows { display: flex; flex-direction: column; gap: 4px; }
.c-ledger-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 8px;
  background: #f8fafc;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #334155;
}
.c-ledger-row.rev { font-weight: 800; color: #0f172a; }
.c-ledger-row.subtotal { border-top: 1px dashed #cbd5e1; background: transparent; margin-top: 2px; }
.c-ledger-row.profit { background: var(--c-green-bg); border: 1px solid #a7f3d0; margin-top: 4px; padding: 8px 10px; }

.positive { color: var(--c-blue); }
.negative { color: var(--c-red); }
.profit-highlight { font-family: var(--font-lcd); font-size: 1.15rem; font-weight: 900; color: var(--c-green); }

/* Compact Matrix Table */
.compact-matrix-box { display: flex; flex-direction: column; gap: 4px; border-top: 1px solid #e2e8f0; padding-top: 8px; }
.matrix-head-sm { font-size: 0.75rem; font-weight: 800; color: #0f172a; }
.table-scroll-wrap { width: 100%; overflow-x: auto; }
.compact-table { width: 100%; border-collapse: collapse; font-size: 0.72rem; }
.compact-table th { text-align: left; padding: 4px 6px; background: #f1f5f9; font-weight: 800; color: #475569; border-bottom: 1px solid #cbd5e1; }
.compact-table td { padding: 5px 6px; border-bottom: 1px solid #f1f5f9; font-family: var(--font-lcd); font-weight: 700; color: #0f172a; }
.compact-table tr.current-target-row { background: var(--c-blue-light); }
.compact-table tr.current-target-row td { color: var(--c-blue); font-weight: 800; }

/* ==========================================================================
   MODAL COMPONENT & TOASTS
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
}
.modal-backdrop.hidden { display: none; }
.modal-dialog {
  width: 100%;
  max-width: 380px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  color: #111;
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid #e2e8f0;
}
.modal-title { font-size: 0.95rem; font-weight: 800; font-family: var(--font-sans); color: #0f172a; }
.btn-close { background: transparent; border: none; font-size: 1.1rem; cursor: pointer; color: #64748b; }
.modal-body { padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.form-group { display: flex; flex-direction: column; gap: 4px; }
.form-group label { font-size: 0.75rem; font-weight: 800; color: #334155; }
.form-ctrl {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 8px 10px;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  outline: none;
}
.type-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.radio-card {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 8px;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 700;
  color: #334155;
}
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 10px 16px;
  border-top: 1px solid #e2e8f0;
  background: #f8fafc;
}
.btn-modal-sec {
  background: transparent;
  border: 1px solid #cbd5e1;
  padding: 6px 12px;
  border-radius: 6px;
  font-weight: 700;
  cursor: pointer;
}
.btn-modal-pri {
  background: #ea580c;
  color: #fff;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  font-weight: 800;
  cursor: pointer;
}

/* Toast */
.toast-container {
  position: fixed;
  bottom: 18px;
  right: 18px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.toast-message {
  background: #111827;
  border: 1px solid #ea580c;
  color: #fff;
  padding: 8px 14px;
  border-radius: 6px;
  font-family: var(--font-lcd);
  font-size: 0.78rem;
  font-weight: 800;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}

.hidden { display: none !important; }

/* ========================================================================== 
   TERRANCE MEDIA INTEGRATION SHELL
   ========================================================================== */
.terrance-site-header{width:100%;max-width:1240px;display:flex;align-items:center;justify-content:space-between;gap:20px;padding:16px 22px;margin:0 auto 18px;background:rgba(10,13,18,.86);border:1px solid rgba(255,255,255,.10);border-radius:16px;backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);position:relative;z-index:20}
.terrance-brand{display:flex;align-items:center;gap:10px;color:#fff;text-decoration:none;line-height:1}
.terrance-brand-mark{width:36px;height:36px;display:grid;place-items:center;border-radius:10px;background:linear-gradient(135deg,#ea580c,#f59e0b);font-weight:900;font-size:20px}
.terrance-brand strong{display:block;font-size:15px;letter-spacing:-.02em}.terrance-brand small{display:block;margin-top:3px;color:#94a3b8;font-size:10px;text-transform:uppercase;letter-spacing:.14em}
.terrance-nav{display:flex;gap:26px}.terrance-nav a{color:#cbd5e1;text-decoration:none;font-size:12px;font-weight:700}.terrance-nav a:hover{color:#fff}
.terrance-contact-btn{color:#fff;text-decoration:none;font-size:12px;font-weight:800;padding:10px 15px;border-radius:10px;background:#f97316}.terrance-contact-btn:hover{background:#fb923c}
.roas-page{width:100%;max-width:1240px;margin:0 auto;position:relative}
.terrance-site-footer{width:100%;max-width:1240px;margin:34px auto 0;padding:24px 4px;display:flex;justify-content:space-between;gap:20px;color:#94a3b8;font-size:11px;border-top:1px solid rgba(255,255,255,.10)}
.terrance-site-footer strong{color:#fff;margin-right:8px}.terrance-site-footer span{display:inline}.footer-contact{display:flex;gap:18px}.footer-contact a{color:#cbd5e1;text-decoration:none}
.btn-export,.btn-save{border-color:rgba(249,115,22,.35)!important}.btn-export{color:#fdba74!important}.btn-save{color:#86efac!important}
@media print{
  body{background:#fff!important;color:#000!important;padding:0!important}.terrance-site-header,.terrance-site-footer,.top-nav-shelf,.ambient-glow,.view-mode-pill-toggle,.shelf-controls,.copy-report,.btn-tape-link,.btn-copy-sm{display:none!important}.roas-page{max-width:none}.view-section{display:block!important}.calculator-hardware-device,.thermal-paper-sheet,.compact-dashboard-shell{box-shadow:none!important}
}
@media (max-width:800px){.terrance-site-header{padding:12px 14px;border-radius:12px}.terrance-nav{display:none}.terrance-contact-btn{margin-left:auto}.terrance-site-footer{flex-direction:column}.footer-contact{flex-wrap:wrap}.roas-page{padding:0 0}.top-nav-shelf{border-radius:12px}.shelf-controls{width:100%;justify-content:flex-start}.view-mode-pill-toggle{order:3;width:100%;justify-content:center}}

/* Terrance Media supplied logo */
.terrance-brand {
  display: inline-flex;
  align-items: center;
  width: 190px;
  min-width: 190px;
  height: 54px;
  overflow: hidden;
  text-decoration: none;
}

.terrance-brand-logo {
  display: block;
  width: 180px;
  height: auto;
  max-height: 52px;
  object-fit: contain;
  object-position: left center;
}

@media (max-width: 760px) {
  .terrance-site-header {
    padding: 10px 12px;
  }

  .terrance-brand {
    width: 150px;
    min-width: 150px;
    height: 44px;
  }

  .terrance-brand-logo {
    width: 145px;
    max-height: 42px;
  }
}
