:root {
  --bg-dark: #090d16;
  --bg-card: rgba(16, 23, 38, 0.85);
  --bg-card-hover: rgba(28, 38, 59, 0.95);
  --border: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(255, 255, 255, 0.2);

  --text-main: #f8fafc;
  --text-sub: #94a3b8;
  --text-dim: #64748b;

  --cyan: #06b6d4;
  --purple: #a855f7;
  --blue: #3b82f6;
  --emerald: #10b981;
  --amber: #f59e0b;
  --rose: #f43f5e;
  --gold: #fbbf24;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
}

/* Light Theme Variables for Projectors */
body.light-mode {
  --bg-dark: #f1f5f9;
  --bg-card: rgba(255, 255, 255, 0.92);
  --bg-card-hover: #ffffff;
  --border: rgba(0, 0, 0, 0.1);
  --border-focus: rgba(0, 0, 0, 0.25);

  --text-main: #0f172a;
  --text-sub: #475569;
  --text-dim: #64748b;

  --cyan: #0284c7;
  --purple: #9333ea;
  --blue: #2563eb;
  --emerald: #059669;
  --amber: #d97706;
  --gold: #b45309;
}

body.light-mode {
  background-color: var(--bg-dark);
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(2, 132, 199, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 85% 85%, rgba(147, 51, 234, 0.08) 0%, transparent 40%);
}

body.light-mode .modal-box {
  background: #ffffff;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(6, 182, 212, 0.07) 0%, transparent 40%),
    radial-gradient(circle at 85% 85%, rgba(168, 85, 247, 0.07) 0%, transparent 40%);
  min-height: 100vh;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color 0.25s ease, color 0.25s ease;
}

.deck-container {
  max-width: 1600px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 100vh;
}

/* Header */
.deck-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 10px;
}

.brand-box {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-logo {
  font-size: 22px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  padding: 5px 8px;
  border-radius: var(--radius-md);
}

.brand-title {
  font-family: 'Outfit', sans-serif;
  font-size: 19px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
}

.badge-live {
  font-size: 10px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  color: #ffffff;
  padding: 2px 6px;
  border-radius: 4px;
}

.brand-desc {
  font-size: 11px;
  color: var(--text-sub);
}

.view-switch {
  display: flex;
  background: rgba(255, 255, 255, 0.04);
  padding: 3px;
  border-radius: 8px;
  border: 1px solid var(--border);
  gap: 4px;
}

.view-btn {
  background: transparent;
  border: none;
  color: var(--text-sub);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.view-btn:hover { color: var(--text-main); }
.view-btn.active {
  background: linear-gradient(135deg, #1e293b, #334155);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

body.light-mode .view-btn.active {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.btn-num {
  font-family: 'Outfit', monospace;
  font-weight: 700;
  color: var(--cyan);
}

.hot-badge {
  font-size: 9px;
  background: rgba(244, 63, 94, 0.2);
  color: #fda4af;
  border: 1px solid rgba(244, 63, 94, 0.3);
  padding: 1px 4px;
  border-radius: 3px;
}

.header-right-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tool-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--text-sub);
  font-size: 11px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s ease;
}

.tool-btn:hover { color: var(--text-main); background: rgba(255, 255, 255, 0.12); }

/* Main Views */
.deck-main {
  display: none;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}
.deck-main.active { display: flex; }

/* 5 Compact KPI Strip */
.kpi-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}

.kpi-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.border-cyan { border-top: 3px solid var(--cyan); }
.border-purple { border-top: 3px solid var(--purple); }
.border-blue { border-top: 3px solid var(--blue); }
.border-emerald { border-top: 3px solid var(--emerald); }
.border-amber { border-top: 3px solid var(--amber); }

.kpi-num-badge {
  position: absolute;
  top: 6px;
  right: 8px;
  font-size: 9px;
  font-weight: 700;
  color: var(--text-dim);
}

.kpi-tit { font-size: 11px; color: var(--text-sub); }
.kpi-val {
  font-family: 'Outfit', sans-serif;
  font-size: 20px;
  font-weight: 800;
  margin: 1px 0;
  display: flex;
  align-items: baseline;
  gap: 3px;
}
.kpi-val small { font-size: 12px; color: var(--text-sub); }
.kpi-sub { font-size: 10px; color: var(--text-dim); }

.text-cyan { color: var(--cyan); }
.text-purple { color: var(--purple); }
.text-blue { color: var(--blue); }
.text-emerald { color: var(--emerald); }
.text-amber { color: var(--amber); }
.text-gold { color: var(--gold); }

/* Overview Chart Grid */
.overview-chart-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 12px;
  height: 620px;
}

.deck-chart-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.card-tit { font-size: 13px; font-weight: 700; color: var(--text-main); }
.card-sub { font-size: 11px; color: var(--text-dim); margin-top: 1px; }

.head-legend {
  font-size: 11px;
  color: var(--text-sub);
  display: flex;
  align-items: center;
  gap: 6px;
}
.legend-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; }
.legend-dot.cyan { background: var(--cyan); }
.legend-dot.purple { background: var(--purple); }

.head-tag {
  font-size: 10px;
  background: rgba(255, 255, 255, 0.07);
  padding: 2px 7px;
  border-radius: 4px;
  color: var(--text-sub);
}
body.light-mode .head-tag {
  background: rgba(0, 0, 0, 0.06);
}

.badge-accent {
  font-size: 10px;
  background: rgba(245, 158, 11, 0.15);
  color: var(--amber);
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 2px 7px;
  border-radius: 4px;
  font-weight: 700;
}

.card-chart { position: relative; flex: 1; width: 100%; }
.card-chart-split { display: flex; flex: 1; gap: 8px; }
.split-half { flex: 1; position: relative; }

/* Cluster View Elements */
.urgent-banner {
  background: linear-gradient(90deg, rgba(239, 68, 68, 0.15), rgba(245, 158, 11, 0.1));
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
}
body.light-mode .urgent-banner {
  background: #fef2f2;
  border-color: #fca5a5;
}
.urgent-icon { font-size: 24px; }
.urgent-body { flex: 1; }
.urgent-tit { font-size: 13px; color: #f87171; margin-bottom: 2px; }
body.light-mode .urgent-tit { color: #dc2626; }
.urgent-tit strong { color: var(--text-main); }
.urgent-desc { font-size: 11px; color: var(--text-sub); line-height: 1.4; }
.urgent-stat { display: flex; gap: 8px; }
.stat-pill {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  flex-direction: column;
}
body.light-mode .stat-pill {
  background: #ffffff;
  border-color: #e2e8f0;
  color: #0f172a;
}
.stat-pill small { font-size: 9px; color: var(--text-dim); }

.cluster-selector-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.cluster-btn-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  text-align: left;
}
.cluster-btn-card:hover { background: var(--bg-card-hover); transform: translateY(-2px); }
.cluster-btn-card.active {
  background: rgba(30, 41, 59, 0.95);
  box-shadow: 0 0 12px -2px rgba(6, 182, 212, 0.3);
}
body.light-mode .cluster-btn-card.active {
  background: #ffffff;
  box-shadow: 0 4px 15px rgba(2, 132, 199, 0.2);
}

.cluster-btn-card.active::after {
  content: '선택됨';
  position: absolute;
  top: 6px;
  right: 8px;
  font-size: 9px;
  font-weight: 700;
  background: #0284c7;
  color: #ffffff;
  padding: 1px 5px;
  border-radius: 3px;
}

.cl-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.cl-name { font-size: 13px; font-weight: 700; color: var(--text-main); }
.cl-badge { font-size: 9px; font-weight: 700; padding: 1px 5px; border-radius: 3px; }
.cl-metrics {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--text-sub);
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px solid var(--border);
}
.cl-metrics strong { color: var(--text-main); }

.cluster-analytics-grid { display: flex; gap: 12px; height: 500px; }
.flex-1 { flex: 1; }

.cluster-action-panel { display: flex; flex-direction: column; gap: 10px; flex: 1; }
.action-card {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}
body.light-mode .action-card {
  background: #f8fafc;
}
.action-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 3px; }
.action-name { font-size: 14px; font-weight: 700; color: var(--cyan); }
.action-badge { font-size: 9px; padding: 2px 5px; border-radius: 3px; }
.action-desc { font-size: 11px; color: var(--text-sub); line-height: 1.4; margin-bottom: 8px; }
.action-metrics-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 8px; }
.action-m-box { background: rgba(255, 255, 255, 0.03); padding: 5px; border-radius: 4px; text-align: center; }
body.light-mode .action-m-box { background: #ffffff; border: 1px solid #e2e8f0; }
.action-m-box .m-lbl { font-size: 9px; color: var(--text-dim); display: block; }
.action-m-box .m-val { font-family: 'Outfit', sans-serif; font-size: 13px; font-weight: 700; color: var(--text-main); }
.strategy-banner {
  background: rgba(16, 185, 129, 0.1);
  border-left: 3px solid var(--emerald);
  padding: 6px 8px;
  font-size: 11px;
  color: #a7f3d0;
  border-radius: 0 4px 4px 0;
}
body.light-mode .strategy-banner {
  background: #ecfdf5;
  color: #065f46;
}

.cluster-subchart-box {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
body.light-mode .cluster-subchart-box {
  background: #f8fafc;
}
.subchart-tit { font-size: 11px; font-weight: 600; color: var(--text-sub); margin-bottom: 4px; }
.subchart-wrapper { flex: 1; position: relative; width: 100%; }

/* VIEW 3: Simulator Layout */
.simulator-layout-grid {
  display: flex;
  gap: 12px;
  height: 640px;
}

.sim-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 8px 0;
  flex: 1;
}

.sim-control-group {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}
body.light-mode .sim-control-group {
  background: #f8fafc;
}

.sim-control-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.sim-control-head label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
}

.sim-control-val {
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  font-weight: 800;
}

input[type=range] {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.1);
  outline: none;
  cursor: pointer;
  accent-color: var(--cyan);
}
body.light-mode input[type=range] {
  background: #cbd5e1;
}

.sim-range-labels {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--text-dim);
  margin-top: 4px;
}

.sim-result-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.sim-stat-card {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 10px;
  text-align: center;
  display: flex;
  flex-direction: column;
}
body.light-mode .sim-stat-card {
  background: #f8fafc;
}

.border-green { border-top: 3px solid var(--emerald); }
.border-blue { border-top: 3px solid var(--cyan); }
.border-gold { border-top: 3px solid var(--gold); }
.highlight-gold { background: rgba(251, 191, 36, 0.08); border-color: rgba(251, 191, 36, 0.3); }

.sim-stat-lbl { font-size: 10px; color: var(--text-dim); margin-bottom: 4px; }
.sim-stat-val { font-family: 'Outfit', sans-serif; font-size: 18px; font-weight: 800; }
.sim-stat-hint { font-size: 9px; color: var(--text-sub); margin-top: 3px; }

.sim-action-summary {
  background: rgba(245, 158, 11, 0.1);
  border-left: 3px solid var(--amber);
  padding: 10px 12px;
  font-size: 11px;
  line-height: 1.5;
  color: #fde68a;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
body.light-mode .sim-action-summary {
  background: #fef3c7;
  color: #92400e;
}

/* Elasticity scenario toolbar / range / curve */
.elas-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
}
.elas-toolbar-lbl {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-dim);
  margin-right: auto;
}
.elas-btn {
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.2s ease;
}
.elas-btn:hover { border-color: var(--amber); color: var(--amber); transform: translateY(-1px); }
.elas-btn.active {
  background: rgba(245, 158, 11, 0.18);
  border-color: var(--amber);
  color: var(--amber);
}
.elas-range {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.elas-range-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 4px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  opacity: 0.7;
  transition: all 0.2s ease;
}
.elas-range-item.on { opacity: 1; border-style: solid; border-color: var(--amber); background: rgba(245, 158, 11, 0.08); }
.elas-range-item em { font-style: normal; font-size: 10px; color: var(--text-dim); }
.elas-range-item strong { font-family: 'Outfit', sans-serif; font-size: 14px; font-weight: 800; }
.elas-range-item small { font-size: 9px; color: var(--text-sub); }
.elas-curve-box {
  position: relative;
  height: 150px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 8px;
}
.elas-caveat {
  margin: 0;
  font-size: 10px;
  line-height: 1.5;
  color: var(--text-sub);
}
.elas-caveat strong { color: var(--amber); }

/* Basket Cross-Selling Cards */
.basket-rules-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  padding-right: 4px;
  flex: 1;
}

.basket-rule-item {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.2s ease;
}
body.light-mode .basket-rule-item {
  background: #f8fafc;
}
.basket-rule-item:hover {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--border-focus);
}

.b-pair { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--text-main); }
.b-tag { font-size: 10px; background: rgba(6, 182, 212, 0.15); color: var(--cyan); padding: 2px 6px; border-radius: 4px; }
.b-metrics { display: flex; align-items: center; gap: 14px; font-size: 11px; color: var(--text-sub); }
.b-val strong { color: var(--text-main); }

/* Customer Modal */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}
.modal-overlay.active { display: flex; }

.modal-box {
  background: #111827;
  border: 1px solid var(--border-focus);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 720px;
  max-height: 85vh;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8);
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
}

.persona-tag-line {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.persona-id-pill {
  font-size: 10px;
  font-family: monospace;
  background: rgba(255, 255, 255, 0.08);
  padding: 1px 6px;
  border-radius: 3px;
  color: var(--text-dim);
}

.modal-tit { font-size: 17px; font-weight: 800; color: var(--text-main); }
.persona-bio { font-size: 12px; color: var(--text-sub); line-height: 1.4; margin-top: 4px; }

.modal-badge { font-size: 10px; background: rgba(6, 182, 212, 0.2); color: var(--cyan); padding: 2px 7px; border-radius: 4px; display: inline-block; }
.modal-close { background: none; border: none; color: var(--text-dim); font-size: 20px; cursor: pointer; }
.modal-close:hover { color: var(--text-main); }

.modal-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  background: rgba(0, 0, 0, 0.3);
  padding: 10px;
  border-radius: var(--radius-sm);
}
body.light-mode .modal-stats { background: #f8fafc; border: 1px solid #e2e8f0; }

.modal-stat-box { text-align: center; }
.modal-stat-box .lbl { font-size: 10px; color: var(--text-dim); display: block; }
.modal-stat-box .val { font-family: 'Outfit', sans-serif; font-size: 14px; font-weight: 700; color: var(--text-main); }

.modal-table-wrap { overflow-y: auto; max-height: 300px; }
.modal-table { width: 100%; border-collapse: collapse; font-size: 11px; }
.modal-table th { color: var(--text-dim); padding: 8px; border-bottom: 1px solid var(--border); text-align: left; }
.modal-table td { color: var(--text-sub); padding: 8px; border-bottom: 1px solid var(--border); }
.modal-table td.text-right, .modal-table th.text-right { text-align: right; }

.modal-empty-note {
  text-align: center;
  padding: 30px 15px !important;
  color: var(--text-dim) !important;
  font-size: 12px;
  line-height: 1.6;
}

/* Header Right in Card Head */
.card-head-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Scatter Zoom Reset Button */
.zoom-reset-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 10;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid var(--border);
  color: var(--text-sub);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  gap: 4px;
}
.zoom-reset-btn:hover {
  background: var(--bg-hover);
  color: var(--text-main);
  border-color: var(--cyan);
}
.zoom-reset-btn.active {
  border-color: var(--cyan);
  color: var(--cyan);
  box-shadow: 0 0 8px rgba(6, 182, 212, 0.3);
}
body.light-mode .zoom-reset-btn {
  background: rgba(255, 255, 255, 0.9);
  border-color: #cbd5e1;
  color: #475569;
}
body.light-mode .zoom-reset-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
}

/* In-memory Customer Search UI */
.cust-search {
  position: relative;
  width: 270px;
}
.cust-search-icon {
  position: absolute;
  left: 9px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  pointer-events: none;
  opacity: 0.6;
}
.cust-search-input {
  width: 100%;
  padding: 5px 24px 5px 26px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-size: 11px;
  outline: none;
  transition: all 0.2s ease;
}
body.light-mode .cust-search-input {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #0f172a;
}
.cust-search-input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 2px rgba(6, 182, 212, 0.2);
  background: rgba(0, 0, 0, 0.5);
}
body.light-mode .cust-search-input:focus {
  background: #ffffff;
}
.cust-search-clear {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 12px;
  cursor: pointer;
  padding: 2px 4px;
}
.cust-search-clear:hover {
  color: var(--text-main);
}
.cust-search-results {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 260px;
  overflow-y: auto;
  background: #0f172a;
  border: 1px solid var(--border-focus);
  border-radius: var(--radius-sm);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  z-index: 100;
  list-style: none;
  padding: 4px 0;
  margin: 0;
}
body.light-mode .cust-search-results {
  background: #ffffff;
  border-color: #cbd5e1;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}
.cust-search-results.open {
  display: block;
}
.cust-search-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  font-size: 11px;
  cursor: pointer;
  transition: background 0.15s ease;
}
.cust-search-item:hover, .cust-search-item.active {
  background: rgba(6, 182, 212, 0.12);
}
body.light-mode .cust-search-item:hover, body.light-mode .cust-search-item.active {
  background: #e0f2fe;
}
.cust-search-item .cs-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.cust-search-item strong {
  color: var(--text-main);
  font-family: monospace;
  font-size: 11px;
}
.cust-search-item .cs-meta {
  color: var(--text-sub);
  font-size: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}
.cust-search-item .cs-spend {
  font-family: 'Outfit', sans-serif;
  color: var(--cyan);
  font-weight: 700;
  font-size: 11px;
}
.cust-search-note {
  padding: 8px 10px;
  font-size: 10px;
  color: var(--text-dim);
  text-align: center;
  border-top: 1px dashed var(--border);
}

/* Footer */
.deck-footer {
  padding-top: 6px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-dim);
}

/* Print CSS for Clean Slide Report Printing / PDF Save */
@media print {
  @page {
    size: A4 landscape;
    margin: 10mm 12mm;
  }
  *, *::before, *::after {
    box-shadow: none !important;
    text-shadow: none !important;
  }
  body {
    background: #ffffff !important;
    color: #0f172a !important;
    font-size: 11pt !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  .deck-container {
    max-width: 100% !important;
    padding: 0 !important;
    gap: 16px !important;
  }
  .header-right-tools, .view-switch, .modal-overlay, .deck-footer, .zoom-reset-btn, .cust-search, #btn-reset-zoom {
    display: none !important;
  }
  .deck-header {
    border-bottom: 2px solid #0f172a !important;
    padding-bottom: 8px !important;
    margin-bottom: 8px !important;
  }
  .brand-title {
    color: #0f172a !important;
    font-size: 18pt !important;
  }
  .brand-desc {
    color: #475569 !important;
    font-size: 10pt !important;
  }
  /* Print all 3 views sequentially as distinct pages */
  .deck-main {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    page-break-after: always !important;
    break-after: page !important;
    min-height: auto !important;
    height: auto !important;
  }
  .deck-main:last-of-type {
    page-break-after: auto !important;
    break-after: auto !important;
  }
  .overview-chart-grid, .cluster-analytics-grid, .simulator-layout-grid {
    height: auto !important;
    display: grid !important;
    gap: 12px !important;
  }
  .overview-chart-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .cluster-analytics-grid, .simulator-layout-grid {
    grid-template-columns: 1fr 1fr !important;
  }
  .deck-chart-card, .kpi-box, .cluster-btn-card, .action-card, .sim-stat-card {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: none !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
    color: #0f172a !important;
  }
  .kpi-val, .card-tit, .cl-name, .sim-stat-val, .action-name {
    color: #0f172a !important;
  }
  .kpi-tit, .kpi-sub, .card-sub, .cl-desc, .sim-stat-lbl, .action-desc {
    color: #475569 !important;
  }
  .urgent-banner {
    background: #fef2f2 !important;
    border: 1px solid #fecaca !important;
    color: #991b1b !important;
    page-break-inside: avoid !important;
  }
  .urgent-tit strong {
    color: #991b1b !important;
  }
  .urgent-desc {
    color: #7f1d1d !important;
  }
  .sim-action-summary {
    background: #fffbeb !important;
    border-left: 3px solid #f59e0b !important;
    color: #92400e !important;
  }
}

@media (max-width: 1200px) {
  .overview-chart-grid, .cluster-analytics-grid, .simulator-layout-grid {
    flex-direction: column;
    height: auto;
  }
}
