/* ==========================================================================
   THE CAPITALIST: KONGLOMERAT NUSANTARA
   Bloomberg Terminal Dark Theme & High-Fidelity UI Styling
   ========================================================================== */

:root {
  --bg-app: #080b11;
  --bg-surface: #0f172a;
  --bg-card: #131d31;
  --bg-card-hover: #1e293b;
  --border-color: #24344d;
  --border-focus: #ff9900;
  
  --amber-primary: #ff9900;
  --amber-glow: rgba(255, 153, 0, 0.4);
  --bull-green: #00ff66;
  --bull-glow: rgba(0, 255, 102, 0.35);
  --bear-red: #ff3333;
  --bear-glow: rgba(255, 51, 51, 0.35);
  --cyan-accent: #00e5ff;
  --purple-accent: #c084fc;

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

  --font-mono: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  -webkit-user-select: none;
}

body.terminal-body {
  background-color: var(--bg-app);
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.4;
  overflow: hidden;
  height: 100vh;
  width: 100vw;
}

/* ==========================================================================
   1. APP SHELL LAYOUT
   ========================================================================== */
.terminal-app-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100vw;
  background: radial-gradient(circle at 50% 0%, #172554 0%, #080b11 75%);
}

/* Header Status Bar */
.terminal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  background: rgba(15, 23, 42, 0.95);
  border-bottom: 2px solid var(--border-color);
  backdrop-filter: blur(10px);
  z-index: 100;
}

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

.brand-icon {
  font-size: 24px;
}

.brand-title {
  display: block;
  font-size: 15px;
  font-weight: 900;
  color: var(--amber-primary);
  letter-spacing: 1px;
}

.brand-subtitle {
  display: block;
  font-size: 10px;
  color: var(--text-muted);
}

.header-metrics {
  display: flex;
  align-items: center;
  gap: 16px;
}

.metric-box {
  background: #090e17;
  border: 1px solid var(--border-color);
  padding: 4px 12px;
  border-radius: 4px;
  display: flex;
  flex-direction: column;
}

.metric-label {
  font-size: 9px;
  color: var(--text-dim);
  text-transform: uppercase;
  font-weight: 700;
}

.metric-val {
  font-size: 13px;
  font-weight: 800;
}

.glow-gold { color: #ffb703; text-shadow: 0 0 8px var(--amber-glow); }
.glow-green { color: var(--bull-green); text-shadow: 0 0 8px var(--bull-glow); }
.text-green { color: var(--bull-green); }
.text-red { color: var(--bear-red); }

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

.term-btn {
  background: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  padding: 6px 12px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.term-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--amber-primary);
  color: var(--amber-primary);
}

.term-btn.highlight-btn {
  background: #1e3a8a;
  border-color: #3b82f6;
}

.term-btn.highlight-btn:hover {
  background: #2563eb;
}

/* ==========================================================================
   2. NEWS TICKER BAR
   ========================================================================== */
.news-ticker-bar {
  display: flex;
  align-items: center;
  background: #05080e;
  border-bottom: 1px solid var(--border-color);
  height: 26px;
  overflow: hidden;
  font-size: 11px;
}

.ticker-tag {
  background: var(--bear-red);
  color: #fff;
  font-weight: 900;
  padding: 0 10px;
  height: 100%;
  display: flex;
  align-items: center;
  letter-spacing: 0.5px;
  font-size: 10px;
}

.ticker-marquee-wrapper {
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
}

.ticker-marquee-text {
  display: inline-block;
  padding-left: 100%;
  animation: ticker-slide 28s linear infinite;
  color: #e2e8f0;
}

.ticker-marquee-wrapper:hover .ticker-marquee-text {
  animation-play-state: paused;
}

@keyframes ticker-slide {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

/* ==========================================================================
   3. NAVIGATION TABS
   ========================================================================== */
.terminal-nav-tabs {
  display: flex;
  background: #090e17;
  border-bottom: 1px solid var(--border-color);
  padding: 0 16px;
  gap: 4px;
}

.nav-tab {
  background: transparent;
  color: var(--text-muted);
  border: none;
  border-bottom: 2px solid transparent;
  padding: 8px 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.nav-tab:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.03);
}

.nav-tab.active {
  color: var(--amber-primary);
  border-bottom-color: var(--amber-primary);
  background: rgba(255, 153, 0, 0.08);
}

/* ==========================================================================
   4. WORKSPACE CONTENT
   ========================================================================== */
.terminal-workspace {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px;
  position: relative;
}

.tab-pane {
  display: none;
  height: 100%;
}

.tab-pane.active {
  display: block;
}

/* --- TAB 1: PETA NUSANTARA LAYOUT --- */
.map-view-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 14px;
  height: calc(100vh - 190px);
}

.map-container-card {
  background: #05080e;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 0 50px rgba(0,0,0,0.8);
}

.map-header-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: #090e17;
  border-bottom: 1px solid var(--border-color);
  font-size: 11px;
}

.map-legend {
  display: flex;
  gap: 14px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
}

.legend-item .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.legend-item .dot.gold { background: var(--amber-primary); box-shadow: 0 0 6px var(--amber-glow); }
.legend-item .dot.blue { background: var(--cyan-accent); }
.legend-item .dot.green { background: var(--bull-green); }

.map-zoom-controls {
  display: flex;
  gap: 4px;
}

.map-btn {
  background: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  width: 26px;
  height: 26px;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-weight: 800;
  cursor: pointer;
}

.map-btn:hover {
  background: var(--bg-card-hover);
  color: var(--amber-primary);
}

.svg-map-viewport {
  flex: 1;
  width: 100%;
  height: 100%;
  overflow: hidden;
  cursor: grab;
  position: relative;
}

.svg-map-viewport:active {
  cursor: grabbing;
}

.svg-map-viewport svg {
  width: 100%;
  height: 100%;
  transform-origin: 0 0;
  transition: transform 0.05s linear;
}

/* SVG Island Polygons */
.islands-layer polygon {
  fill: #131d2e;
  stroke: #25364f;
  stroke-width: 1.2;
  transition: all 0.2s ease;
}

.islands-layer polygon:hover {
  fill: #1e2f4a;
  stroke: var(--cyan-accent);
}

/* Shipping Route Lines */
.routes-layer path {
  fill: none;
  stroke: url(#routeGrad);
  stroke-width: 1.8;
  stroke-dasharray: 6 8;
  animation: ship-transit 25s linear infinite;
}

@keyframes ship-transit {
  from { stroke-dashoffset: 300; }
  to { stroke-dashoffset: 0; }
}

/* Region Investment Points (Pins) */
.region-pin {
  cursor: pointer;
  transition: transform 0.2s ease;
}

.region-pin circle.pin-base {
  fill: #0ea5e9;
  stroke: #fff;
  stroke-width: 1.5;
}

.region-pin.player-has-business circle.pin-base {
  fill: var(--amber-primary);
  filter: url(#glow-gold);
}

.region-pin text.pin-label {
  fill: #e2e8f0;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: bold;
  text-shadow: 0 1px 4px #000;
}

.region-pin:hover circle.pin-base {
  transform: scale(1.3);
  stroke: var(--amber-primary);
}

/* Map Tooltip */
.map-tooltip {
  position: absolute;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid var(--amber-primary);
  border-radius: 4px;
  padding: 6px 10px;
  font-size: 11px;
  color: #fff;
  pointer-events: none;
  z-index: 100;
  box-shadow: 0 4px 15px rgba(0,0,0,0.8);
  max-width: 220px;
}

.map-tooltip.hidden {
  display: none;
}

/* Region Inspector Sidebar */
.region-inspector-sidebar {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
}

.sidebar-header {
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 10px;
}

.badge-code {
  background: var(--amber-primary);
  color: #000;
  font-weight: 900;
  font-size: 13px;
  padding: 4px 8px;
  border-radius: 4px;
}

.sidebar-titles h3 {
  font-size: 14px;
  color: #fff;
}

.sidebar-titles small {
  color: var(--text-muted);
}

.region-description {
  font-size: 11px;
  color: #cbd5e1;
  background: #090e17;
  padding: 8px 10px;
  border-radius: 4px;
  border-left: 3px solid var(--cyan-accent);
}

.region-advantages-box, .region-active-companies {
  background: #090e17;
  border: 1px solid var(--border-color);
  padding: 10px;
  border-radius: 4px;
  font-size: 11px;
}

.region-advantages-box ul {
  padding-left: 18px;
  margin-top: 6px;
  color: #a5f3fc;
}

.compact-company-list {
  margin-top: 6px;
}

.empty-note {
  color: var(--text-dim);
  font-style: italic;
}

.action-submit-btn {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #000;
  border: none;
  padding: 10px 14px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.4);
}

.action-submit-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 25px rgba(245, 158, 11, 0.7);
}

.action-submit-btn.big {
  font-size: 14px;
  padding: 12px 24px;
}

.action-submit-btn.ipo-btn {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: #fff;
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.4);
}

/* --- TAB 2: PORTOFOLIO GRID LAYOUT --- */
.portfolio-grid-layout {
  display: grid;
  grid-template-columns: 1fr 1.4fr 1.2fr;
  gap: 14px;
}

.term-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 14px;
  display: flex;
  flex-direction: column;
}

.card-title {
  font-size: 12px;
  font-weight: 800;
  color: var(--amber-primary);
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 6px;
}

.donut-chart-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 10px;
  justify-content: center;
}

.legend-chip {
  display: flex;
  align-items: center;
  gap: 4px;
  background: #090e17;
  padding: 2px 6px;
  border-radius: 3px;
}

.legend-chip .chip-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.portfolio-breakdown-table {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.p-row {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px dashed #1e293b;
  padding-bottom: 4px;
  font-size: 12px;
}

/* --- TAB 3: COMPANIES GRID --- */
.companies-management-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.synergy-status-panel {
  background: #064e3b;
  border: 1px solid var(--bull-green);
  padding: 10px 14px;
  border-radius: 6px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.synergy-badge {
  font-weight: 900;
  color: #fff;
  background: #047857;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11px;
}

.synergies-display-row {
  font-size: 11px;
  color: #a7f3d0;
}

.companies-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px;
}

.company-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.company-card.status-konstruksi {
  border-left: 4px solid var(--amber-primary);
}

.company-card.status-operasional {
  border-left: 4px solid var(--bull-green);
}

.comp-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.comp-name {
  font-size: 13px;
  font-weight: 800;
  color: #fff;
}

.comp-badge {
  font-size: 9px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 3px;
}

.comp-badge.konstruksi { background: #78350f; color: #fef3c7; }
.comp-badge.operasional { background: #064e3b; color: #a7f3d0; }
.comp-badge.ipo-badge { background: #1e3a8a; color: #bfdbfe; margin-left: 4px; }

.comp-metrics-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  font-size: 11px;
  background: #090e17;
  padding: 6px 8px;
  border-radius: 4px;
}

.comp-actions-row {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}

/* Barber-pole progress bar */
.term-progress-bar {
  height: 12px;
  background: #090e17;
  border-radius: 3px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  position: relative;
}

.term-progress-fill {
  height: 100%;
  background: repeating-linear-gradient(45deg, #f59e0b, #f59e0b 10px, #d97706 10px, #d97706 20px);
  animation: barber-pole 1s linear infinite;
}

@keyframes barber-pole {
  from { background-position: 0 0; }
  to { background-position: 28px 0; }
}

/* --- TAB 4: MARKETS & TABLES --- */
.market-grid-layout {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 14px;
}

.term-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
  text-align: left;
}

.term-table th {
  background: #090e17;
  color: var(--amber-primary);
  padding: 8px 10px;
  border-bottom: 2px solid var(--border-color);
  font-weight: 800;
}

.term-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #1e293b;
}

.term-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.instrument-action-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.inst-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #090e17;
  border: 1px solid var(--border-color);
  padding: 10px 12px;
  border-radius: 4px;
}

.inst-item.credit-highlight {
  border-color: #3b82f6;
  background: #0b1329;
}

.inst-info strong { display: block; font-size: 12px; color: #fff; }
.inst-info small { color: var(--text-muted); font-size: 10px; }

.btn-group {
  display: flex;
  gap: 4px;
}

.small-btn {
  background: #1e3a8a;
  color: #fff;
  border: 1px solid #3b82f6;
  padding: 5px 10px;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.small-btn:hover {
  background: #2563eb;
}

.small-btn.red-btn {
  background: #7f1d1d;
  border-color: #ef4444;
}

.small-btn.red-btn:hover {
  background: #b91c1c;
}

.small-btn.green-btn {
  background: #064e3b;
  border-color: #10b981;
}

.small-btn.green-btn:hover {
  background: #047857;
}

/* --- TAB 5: LEADERBOARD TABLE --- */
.leaderboard-table tr.is-player td {
  background: rgba(255, 153, 0, 0.15);
  font-weight: bold;
  border-left: 3px solid var(--amber-primary);
}

/* --- TAB 6: ADVISORY & BADGES --- */
.advisory-grid-layout {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 14px;
}

.advisor-content {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.economist-avatar {
  font-size: 48px;
  background: #090e17;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.economist-briefing p {
  font-size: 12px;
  margin: 8px 0;
  color: #cbd5e1;
  line-height: 1.5;
}

.radar-warning-box {
  background: #450a0a;
  border: 1px solid #dc2626;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 11px;
  color: #fecaca;
  margin-top: 10px;
}

.badges-collection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
}

.badge-card {
  background: #090e17;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 8px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  opacity: 0.4;
}

.badge-card.unlocked {
  opacity: 1;
  border-color: var(--amber-primary);
  background: rgba(255, 153, 0, 0.08);
}

.badge-icon { font-size: 24px; }
.badge-title { font-size: 10px; font-weight: 800; color: #fff; }

/* ==========================================================================
   5. FOOTER ACTION BAR
   ========================================================================= */
.terminal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  background: #090e17;
  border-top: 2px solid var(--border-color);
}

.footer-summary {
  display: flex;
  gap: 24px;
}

.f-stat span {
  font-size: 9px;
  color: var(--text-dim);
  font-weight: 700;
  display: block;
}

.f-stat strong {
  font-size: 13px;
}

.term-mega-btn {
  background: linear-gradient(135deg, #f59e0b 0%, #b45309 100%);
  color: #000;
  border: none;
  padding: 12px 28px;
  border-radius: 5px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.5);
  animation: pulse-glow 2s infinite ease-in-out;
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 15px rgba(245, 158, 11, 0.4); }
  50% { box-shadow: 0 0 30px rgba(245, 158, 11, 0.8); }
}

.term-mega-btn:hover {
  transform: scale(1.02);
}

/* ==========================================================================
   6. MODAL DIALOGS
   ========================================================================== */
.term-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(3, 7, 18, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(6px);
}

.term-modal-overlay.hidden {
  display: none !important;
}

.term-modal-card {
  background: var(--bg-surface);
  border: 2px solid var(--border-color);
  border-radius: 8px;
  width: 520px;
  max-width: 90vw;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9);
  display: flex;
  flex-direction: column;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
  font-size: 14px;
  color: var(--amber-primary);
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
}

.modal-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 70vh;
  overflow-y: auto;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-group.half {
  flex: 1;
}

.form-row {
  display: flex;
  gap: 10px;
}

.term-select, .term-input {
  background: #090e17;
  border: 1px solid var(--border-color);
  color: #fff;
  padding: 8px 10px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 12px;
}

.term-select:focus, .term-input:focus {
  border-color: var(--amber-primary);
  outline: none;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 16px;
  border-top: 1px solid var(--border-color);
  background: #090e17;
}

.modal-footer.center {
  justify-content: center;
}

/* Dossier Quarterly Slam Modal */
.dossier-card {
  border-color: var(--amber-primary);
  box-shadow: 0 0 50px rgba(255, 153, 0, 0.3);
  animation: dossier-slam 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes dossier-slam {
  0% { transform: scale(1.8) rotate(-4deg); opacity: 0; }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}

.dossier-header {
  padding: 16px;
  text-align: center;
  border-bottom: 1px solid var(--border-color);
}

.dossier-stamp {
  display: inline-block;
  border: 2px solid var(--bull-green);
  color: var(--bull-green);
  font-size: 10px;
  font-weight: 900;
  padding: 2px 8px;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.dossier-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.d-box {
  background: #090e17;
  border: 1px solid var(--border-color);
  padding: 10px;
  border-radius: 4px;
}

.d-box span { font-size: 10px; color: var(--text-muted); display: block; }
.d-box strong { font-size: 14px; }

.dossier-events-box {
  background: #090e17;
  border: 1px solid var(--border-color);
  padding: 10px;
  border-radius: 4px;
  font-size: 11px;
}

.dossier-events-box ul {
  padding-left: 18px;
  margin-top: 6px;
}

/* ========================================================================== 
   7. TREASURY, FEEDBACK, AND RESPONSIVE GAMEPLAY
   ========================================================================== */
.rank-progress {
  width: 100%;
  height: 3px;
  margin-top: 3px;
  overflow: hidden;
  border-radius: 99px;
  background: #26354d;
}

.rank-progress i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--amber-primary), #fde047);
  box-shadow: 0 0 8px var(--amber-glow);
  transition: width .5s ease;
}

.save-status {
  max-width: 120px;
  color: var(--text-dim);
  font-size: 9px;
  text-align: right;
  transition: color .2s ease;
}

.save-status.saved-flash { color: var(--bull-green); }
.danger-outline { border-color: #7f1d1d; color: #fca5a5; }
.danger-outline:hover { border-color: var(--bear-red); color: #fff; background: #7f1d1d; }

.deposit-featured {
  border-color: #b7791f;
  background: linear-gradient(110deg, rgba(245, 158, 11, .13), #090e17 65%);
}

.gold-btn {
  background: linear-gradient(135deg, #f59e0b, #b45309);
  border-color: #fbbf24;
  color: #111827;
}

.deposit-market-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: -4px;
}

.deposit-market-preview span,
.deposit-market-preview button {
  padding: 5px 8px;
  border: 1px solid var(--border-color);
  border-radius: 99px;
  background: #111b2e;
  color: var(--text-muted);
  font: 9px var(--font-mono);
}

.deposit-market-preview button { cursor: pointer; color: var(--amber-primary); }
.deposit-modal-card { width: min(960px, 94vw); max-height: 94vh; border-color: #a16207; }
.modal-kicker { color: var(--text-dim); font-size: 9px; letter-spacing: 1.5px; }
.deposit-modal-body { gap: 16px; }

.deposit-explainer {
  padding: 10px 12px;
  border: 1px solid #155e75;
  border-radius: 6px;
  background: linear-gradient(90deg, rgba(8, 145, 178, .16), rgba(8, 145, 178, .04));
}

.deposit-explainer strong { color: #67e8f9; font-size: 11px; }
.deposit-explainer p { margin-top: 3px; color: #bae6fd; font-size: 10px; }

.deposit-builder-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, .65fr);
  gap: 14px;
}

.deposit-form-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border-color);
  border-radius: 7px;
  background: #0b1220;
}

.deposit-form-panel .action-submit-btn { grid-column: 1 / -1; min-height: 40px; }
.amount-shortcuts { display: flex; flex-wrap: wrap; gap: 5px; }
.amount-shortcuts button,
.tenor-selector button,
.certificate-actions button {
  border: 1px solid var(--border-color);
  border-radius: 4px;
  background: #152036;
  color: var(--text-muted);
  padding: 6px 8px;
  font: 700 10px var(--font-mono);
  cursor: pointer;
}

.amount-shortcuts button:hover,
.tenor-selector button:hover { color: #fff; border-color: var(--amber-primary); }
.tenor-selector { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
.tenor-selector button { min-height: 45px; font-size: 15px; }
.tenor-selector button small { display: block; font-size: 8px; font-weight: 500; }
.tenor-selector button.active {
  color: #111827;
  border-color: #fde68a;
  background: linear-gradient(135deg, #fbbf24, #d97706);
  box-shadow: 0 0 14px rgba(245, 158, 11, .25);
}

.deposit-projection-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 15px;
  border: 1px solid #a16207;
  border-radius: 7px;
  background: radial-gradient(circle at top right, rgba(245, 158, 11, .18), #0b1220 60%);
}

.deposit-projection-card > span { color: #fbbf24; font-size: 9px; letter-spacing: 1px; }
.deposit-projection-card > strong { color: #fde68a; font-size: 24px; }
.deposit-projection-card > div { display: flex; justify-content: space-between; gap: 12px; }
.deposit-projection-card small { color: var(--text-muted); }
.deposit-projection-card .projection-net { margin-top: 2px; padding-top: 8px; border-top: 1px dashed #854d0e; }
.deposit-projection-card .projection-net b { color: var(--bull-green); }
.deposit-projection-card p { margin-top: auto; color: #cbd5e1; font-size: 10px; }

.active-deposits-section { display: flex; flex-direction: column; gap: 9px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.section-heading strong { display: block; color: #fff; }
.section-heading small { display: block; color: var(--text-dim); font-size: 9px; }
.section-heading > span { color: #fde68a; font-weight: 800; }
.active-deposits-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }

.deposit-certificate {
  padding: 11px;
  border: 1px solid #334155;
  border-left: 4px solid #38bdf8;
  border-radius: 6px;
  background: linear-gradient(135deg, #101a2d, #0a101c);
}

.deposit-certificate.bpr { border-left-color: #a78bfa; }
.certificate-top { display: flex; align-items: center; gap: 9px; }
.certificate-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; background: #1e293b; font-size: 20px; }
.certificate-top div { min-width: 0; flex: 1; }
.certificate-top small { display: block; color: var(--text-dim); font-size: 9px; }
.certificate-top strong { color: #fff; }
.aro-badge { padding: 3px 6px; border-radius: 99px; background: #334155; color: #cbd5e1; font-size: 8px; font-weight: 900; }
.aro-badge.principal, .aro-badge.compound { background: #064e3b; color: #a7f3d0; }
.aro-badge.compound { background: #4c1d95; color: #ddd6fe; }
.certificate-meta { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; margin: 10px 0 7px; }
.certificate-meta span { padding: 5px; border-radius: 4px; background: rgba(15, 23, 42, .8); }
.certificate-meta small { display: block; color: var(--text-dim); font-size: 7px; }
.certificate-meta b { display: block; color: #e2e8f0; font-size: 9px; }
.maturity-progress { height: 5px; overflow: hidden; border-radius: 99px; background: #26354d; }
.maturity-progress i { display: block; height: 100%; background: linear-gradient(90deg, #38bdf8, var(--bull-green)); transition: width .4s ease; }
.deposit-certificate p { min-height: 28px; margin: 7px 0; color: var(--text-muted); font-size: 9px; }
.certificate-actions { display: flex; justify-content: flex-end; gap: 5px; }
.certificate-actions .danger { border-color: #7f1d1d; color: #fca5a5; }
.certificate-actions .danger:hover { background: #7f1d1d; color: #fff; }
.deposit-empty-state { grid-column: 1 / -1; display: grid; place-items: center; gap: 4px; padding: 18px; border: 1px dashed #334155; border-radius: 6px; color: var(--text-muted); text-align: center; }
.deposit-empty-state span { font-size: 25px; }
.deposit-empty-state p { font-size: 9px; }
.deposit-disclaimer { padding: 8px 10px; border-radius: 5px; background: #17120a; color: #d6b87a; font-size: 9px; }

.app-toast {
  position: fixed;
  left: 50%;
  bottom: max(76px, calc(env(safe-area-inset-bottom) + 60px));
  z-index: 3000;
  max-width: min(520px, 90vw);
  padding: 10px 16px;
  border: 1px solid #475569;
  border-radius: 7px;
  background: rgba(15, 23, 42, .97);
  color: #fff;
  box-shadow: 0 12px 35px rgba(0, 0, 0, .55);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity .2s ease, transform .2s ease;
}

.app-toast.visible { opacity: 1; transform: translate(-50%, 0); }
.app-toast.success { border-color: #059669; }
.app-toast.warning { border-color: #d97706; }
.app-toast.error { border-color: #dc2626; }

@media (max-width: 1100px) {
  .terminal-header { padding: 6px 10px; gap: 8px; }
  .brand-subtitle, .save-status, .zscore-box { display: none; }
  .header-metrics { gap: 6px; flex: 1; justify-content: center; }
  .metric-box { padding: 4px 7px; }
  .header-controls { gap: 4px; }
  .header-controls .term-btn { padding: 7px 9px; }
  .terminal-nav-tabs { padding: 0 8px; overflow-x: auto; scrollbar-width: thin; }
  .nav-tab { flex: 0 0 auto; padding: 8px 11px; }
  .map-view-layout { grid-template-columns: minmax(0, 1fr) 290px; }
  .portfolio-grid-layout { grid-template-columns: 1fr 1fr; }
  .market-grid-layout { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  html { max-width: 100%; overflow-x: hidden; }
  body.terminal-body { overflow-y: auto; overflow-x: hidden; height: auto; min-height: 100vh; max-width: 100%; font-size: 12px; }
  .terminal-app-container { min-height: 100vh; height: auto; max-width: 100%; overflow-x: hidden; }
  .terminal-header { position: sticky; top: 0; flex-wrap: wrap; }
  .header-brand { order: 1; min-width: 0; }
  .brand-title { font-size: 13px; }
  .brand-subtitle { display: none; }
  .header-controls { order: 2; flex: 0 0 116px; justify-content: flex-end; margin-left: auto; overflow: hidden; }
  .header-controls .term-btn { flex: 0 0 34px; width: 34px; min-width: 34px; padding: 7px 0; }
  .header-controls #exitGameBtn { order: -3; }
  .header-controls #saveGameBtn { order: -2; }
  .header-controls #soundToggleBtn { order: -1; }
  .header-metrics { order: 3; flex: 0 0 100%; width: 100%; min-width: 0; justify-content: stretch; overflow: hidden; }
  .header-metrics .metric-box { flex: 1 1 33.333%; width: 33.333%; min-width: 0; }
  .time-box { display: none; }
  .metric-val { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
  .header-controls #quickTaxBtn, .header-controls #helpTheoryBtn { display: none; }
  .news-ticker-bar { height: 24px; }
  .terminal-nav-tabs { position: sticky; top: 87px; z-index: 90; }
  .terminal-nav-tabs::-webkit-scrollbar { display: none; }
  .terminal-nav-tabs { scrollbar-width: none; }
  .nav-tab { font-size: 10px; }
  .terminal-workspace { overflow: visible; min-width: 0; max-width: 100%; padding: 9px; }
  .tab-pane { height: auto; min-height: 65vh; }
  .term-card, .market-grid-layout, .market-grid-layout > *, .stocks-table-container { min-width: 0; max-width: 100%; }
  .stocks-table-container, .leaderboard-table-container { overflow-x: auto; }
  canvas { display: block; max-width: 100%; height: auto; }
  .map-view-layout { height: auto; grid-template-columns: 1fr; }
  .map-container-card { min-height: 390px; }
  .portfolio-grid-layout, .advisory-grid-layout { grid-template-columns: 1fr; }
  .companies-grid { grid-template-columns: 1fr; }
  .terminal-workspace { padding-bottom: calc(70px + env(safe-area-inset-bottom)); }
  .terminal-footer { position: fixed; left: 0; right: 0; bottom: 0; z-index: 80; padding: 7px 9px calc(7px + env(safe-area-inset-bottom)); }
  .footer-summary { display: none; }
  .term-mega-btn { width: 100%; min-height: 46px; }
  .deposit-builder-grid { grid-template-columns: 1fr; }
  .deposit-modal-body > *, .deposit-builder-grid, .deposit-builder-grid > *,
  .deposit-form-panel, .deposit-form-panel > *, .deposit-projection-card,
  .active-deposits-section { min-width: 0; max-width: 100%; }
  .deposit-form-panel { grid-template-columns: minmax(0, 1fr); }
  .deposit-form-panel .term-select, .deposit-form-panel .term-input { width: 100%; min-width: 0; }
  .tenor-selector { grid-template-columns: repeat(4, minmax(0, 1fr)); min-width: 0; }
  .tenor-selector button { min-width: 0; padding-inline: 3px; }
  .deposit-projection-card b { min-width: 0; overflow-wrap: anywhere; text-align: right; }
  .active-deposits-list { grid-template-columns: 1fr; }
  .certificate-meta { grid-template-columns: 1fr 1fr; }
  .term-modal-overlay { align-items: flex-end; }
  .term-modal-card, .deposit-modal-card { width: 100%; max-width: 100vw; max-height: 92vh; border-radius: 12px 12px 0 0; }
  .modal-body { max-height: calc(92vh - 55px); padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
  .modal-close-btn { width: 42px; height: 42px; }
}

@media (max-height: 540px) and (orientation: landscape) {
  .brand-text, .save-status, .metric-label, .zscore-box { display: none; }
  .terminal-header { padding: 4px 8px; }
  .header-metrics { gap: 4px; }
  .metric-box { padding: 2px 6px; }
  .news-ticker-bar { height: 21px; }
  .terminal-nav-tabs { min-height: 31px; }
  .nav-tab { padding: 6px 10px; font-size: 10px; }
  .terminal-workspace { padding: 7px 9px; }
  .map-view-layout { height: calc(100vh - 139px); }
  .terminal-footer { padding: 5px 9px; }
  .term-mega-btn { padding: 8px 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}

/* ========================================================================== 
   8. LIGHT THEME — CLEAR DAY EXECUTIVE DESK
   ========================================================================== */
:root {
  color-scheme: light;
  --bg-app: #edf6f5;
  --bg-surface: #fffefb;
  --bg-card: #f8fbfa;
  --bg-card-hover: #eef8f6;
  --border-color: #c9dcda;
  --border-focus: #e58b16;
  --amber-primary: #e88b12;
  --amber-glow: rgba(232, 139, 18, .22);
  --bull-green: #078a62;
  --bull-glow: rgba(7, 138, 98, .18);
  --bear-red: #cf4141;
  --bear-glow: rgba(207, 65, 65, .16);
  --cyan-accent: #0788a5;
  --purple-accent: #7656b5;
  --text-main: #17324a;
  --text-muted: #5b7384;
  --text-dim: #8196a3;
}

body.terminal-body {
  background: #edf6f5;
  color: var(--text-main);
}

.terminal-app-container {
  background:
    radial-gradient(circle at 12% 0%, rgba(255, 211, 128, .25), transparent 28%),
    radial-gradient(circle at 88% 10%, rgba(82, 190, 181, .18), transparent 30%),
    linear-gradient(180deg, #f9fcf8 0%, #edf6f5 100%);
}

.terminal-header {
  background: rgba(255, 254, 251, .95);
  border-bottom-color: #bfd7d4;
  box-shadow: 0 3px 15px rgba(52, 88, 98, .08);
}

.brand-title { color: #c96f06; text-shadow: none; }
.metric-box, .term-btn, .map-btn {
  background: #f4f9f8;
  color: var(--text-main);
  border-color: #c7dcda;
}
.metric-box { box-shadow: inset 0 1px #fff; }
.glow-gold { color: #b65f00; text-shadow: none; }
.glow-green, .text-green { color: #087b58; text-shadow: none; }
.text-red { color: #bd3333; }
.rank-progress, .maturity-progress, .learning-progress-track { background: #dce9e7; }
.term-btn:hover, .map-btn:hover { background: #fff8eb; }
.term-btn.highlight-btn { background: #e7f3ff; border-color: #86bce7; color: #155b8f; }
.term-btn.highlight-btn:hover { background: #d7ebfb; }
.danger-outline { color: #b93636; border-color: #e9b3b3; background: #fff8f8; }

.news-ticker-bar { background: #fff; border-bottom-color: #d7e5e3; }
.ticker-tag { background: #e85b50; }
.ticker-marquee-text { color: #36576a; }
.terminal-nav-tabs { background: rgba(255, 255, 255, .92); border-bottom-color: #c9dcda; }
.nav-tab { color: #607887; }
.nav-tab:hover { color: #17324a; background: #eff8f6; }
.nav-tab.active { color: #a85400; background: #fff4df; border-bottom-color: #e88b12; }
.terminal-workspace { background: transparent; }

.term-card, .region-inspector-sidebar, .company-card,
.leaderboard-table-container, .advisor-card, .badges-card {
  background: rgba(255, 254, 251, .96);
  border-color: #c9dcda;
  box-shadow: 0 8px 22px rgba(48, 80, 90, .07);
}
.card-title { color: #b65f00; }

.map-container-card {
  background: linear-gradient(180deg, #e4f7fb, #d8f0f2);
  box-shadow: inset 0 0 45px rgba(35, 125, 144, .08);
}
.map-header-toolbar { background: rgba(255, 255, 255, .88); }
.islands-layer polygon { fill: #9bdc9b; stroke: #4b9d77; }
.islands-layer polygon:hover { fill: #b6e8a8; stroke: #0788a5; }
.region-pin text.pin-label { fill: #17324a; text-shadow: 0 1px 2px #fff; }
.map-tooltip { background: rgba(255, 254, 248, .98); color: #17324a; box-shadow: 0 8px 20px rgba(34, 70, 80, .18); }
.sidebar-titles h3, .comp-name, .inst-info strong, .certificate-top strong, .section-heading strong { color: #17324a; }
.region-description, .region-advantages-box, .region-active-companies,
.comp-metrics-row, .term-progress-bar, .d-box, .dossier-events-box {
  background: #f3f8f7;
}
.region-description { color: #36576a; }
.region-advantages-box ul { color: #126b74; }

.term-table th { background: #eef6f5; color: #a85400; }
.term-table td { border-bottom-color: #dce8e6; }
.term-table tr:hover td { background: #f5faf9; }
.stocks-table-container, .leaderboard-table-container { border-color: #c9dcda; }
.inst-item { background: #f5f9f8; }
.inst-item.credit-highlight { background: #edf6ff; border-color: #95bee1; }
.small-btn { background: #e6f1ff; color: #155b8f; border-color: #8ab6dc; }
.small-btn:hover { background: #d6e9fa; }
.small-btn.red-btn { background: #fff1f1; color: #ad3333; border-color: #e2a0a0; }
.small-btn.green-btn { background: #e5f6ef; color: #087451; border-color: #79c4a9; }
.credit-highlight small { color: #4c6d81; }
.deposit-featured { background: linear-gradient(110deg, #fff5df, #f8fbfa 65%); }
.deposit-market-preview span, .deposit-market-preview button { background: #f2f7f6; }

.advisor-content, .economist-briefing p { color: #36576a; }
.economist-avatar { background: #f2f8f6; }
.radar-warning-box { background: #fff2ee; border-color: #e8907c; color: #9a3d2e; }
.badge-card { background: #f3f8f7; }
.badge-card.unlocked { background: #fff5df; }
.badge-title { color: #29495a; }
.synergy-status-panel { background: #e2f5ed; border-color: #56b693; }
.synergy-badge { background: #168666; }
.synergies-display-row { color: #236d59; }
.company-card.status-konstruksi { border-left-color: #e88b12; }
.company-card.status-operasional { border-left-color: #14936d; }

.terminal-footer { background: rgba(255, 254, 251, .97); border-top-color: #bfd7d4; }
.term-mega-btn { box-shadow: 0 5px 16px rgba(210, 121, 9, .22); }
body.about-active .terminal-footer { display: none; }
body.about-active .terminal-workspace { padding-bottom: 14px; }

.term-modal-overlay { background: rgba(41, 64, 74, .32); }
.term-modal-card { background: #fffefb; border-color: #bed4d2; box-shadow: 0 22px 70px rgba(40, 70, 80, .24); }
.modal-header { background: #f8fbfa; }
.modal-header h3 { color: #a85400; }
.modal-close-btn { color: #597487; }
.modal-footer { background: #f3f8f7; }
.term-select, .term-input { background: #fff; color: #17324a; border-color: #bed4d2; }
.dossier-card { background: #fffdf7; }

.deposit-explainer { background: #eaf8fb; border-color: #85cbd5; }
.deposit-explainer strong { color: #086f82; }
.deposit-explainer p { color: #365f70; }
.deposit-form-panel { background: #f7faf9; }
.amount-shortcuts button, .tenor-selector button, .certificate-actions button { background: #edf4f3; color: #4a6676; }
.amount-shortcuts button:hover, .tenor-selector button:hover { color: #17324a; }
.deposit-projection-card { background: radial-gradient(circle at top right, rgba(255, 205, 105, .35), #fffaf0 62%); }
.deposit-projection-card > strong { color: #9b5200; }
.deposit-projection-card p { color: #536d7c; }
.deposit-certificate { background: linear-gradient(135deg, #f8fcfb, #eef6f5); border-color: #c4d9d6; }
.certificate-icon, .certificate-meta span { background: #e8f2f0; }
.certificate-meta b { color: #29495a; }
.aro-badge { background: #dfeae8; color: #4a6574; }
.aro-badge.principal { background: #dff3eb; color: #087451; }
.aro-badge.compound { background: #eee7fb; color: #6745a4; }
.deposit-disclaimer { background: #fff6e5; color: #845b1d; }
.app-toast { background: rgba(255, 254, 251, .98); color: #17324a; box-shadow: 0 12px 35px rgba(50, 80, 90, .2); }

/* ========================================================================== 
   9. LEARNING CENTER / DOCUMENTATION TREE
   ========================================================================== */
.learning-tab-pane { height: auto; min-height: 100%; }
.learning-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(260px, .5fr);
  gap: 24px;
  align-items: center;
  margin-bottom: 14px;
  padding: 28px 32px;
  overflow: hidden;
  border: 1px solid #c8dcda;
  border-radius: 16px;
  background:
    radial-gradient(circle at 88% 20%, rgba(255, 196, 91, .32), transparent 28%),
    radial-gradient(circle at 5% 100%, rgba(58, 171, 158, .2), transparent 32%),
    linear-gradient(120deg, #fffdf5, #f2fbf8);
  box-shadow: 0 14px 35px rgba(50, 88, 92, .09);
}
.learning-eyebrow { color: #0a877c; font-size: 10px; font-weight: 900; letter-spacing: 1.7px; }
.learning-hero h1 { margin: 7px 0 9px; color: #17324a; font-family: Arial, sans-serif; font-size: clamp(26px, 3.2vw, 48px); line-height: 1.04; letter-spacing: -1.5px; }
.learning-hero h1 em { color: #c96f06; font-style: normal; }
.learning-hero-copy > p { max-width: 720px; color: #526e7c; font-family: Arial, sans-serif; font-size: 14px; line-height: 1.6; }
.learning-hero-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 18px; }
.learning-primary-btn, .learning-secondary-btn {
  min-height: 42px;
  padding: 9px 16px;
  border-radius: 8px;
  font: 800 11px var(--font-mono);
  cursor: pointer;
}
.learning-primary-btn { border: 1px solid #d97908; background: linear-gradient(135deg, #ffa928, #e6890e); color: #2d1a00; box-shadow: 0 5px 15px rgba(218, 126, 14, .2); }
.learning-secondary-btn { border: 1px solid #9fc9c4; background: rgba(255, 255, 255, .7); color: #17665f; }
.learning-progress-card { padding: 18px; border: 1px solid rgba(125, 172, 166, .55); border-radius: 12px; background: rgba(255, 255, 255, .72); backdrop-filter: blur(8px); }
.learning-progress-card > span { color: #718b96; font-size: 8px; font-weight: 900; letter-spacing: 1px; }
.learning-progress-card > strong { display: block; margin: 6px 0 9px; color: #17324a; font-family: Arial, sans-serif; font-size: 22px; }
.learning-progress-card > small { display: block; margin-top: 7px; color: #718895; font-size: 8px; }
.learning-progress-track { height: 7px; overflow: hidden; border-radius: 99px; }
.learning-progress-track i { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #0e9a88, #62c5a7); transition: width .35s ease; }

.learning-docs-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 14px; min-height: 560px; }
.learning-sidebar, .learning-article-shell { border: 1px solid #c8dcda; border-radius: 12px; background: rgba(255, 254, 251, .96); box-shadow: 0 8px 24px rgba(48, 80, 90, .07); }
.learning-sidebar { align-self: start; max-height: calc(100vh - 245px); overflow-y: auto; padding: 11px; position: sticky; top: 0; }
.guide-search-box { display: flex; align-items: center; gap: 7px; margin-bottom: 9px; padding: 8px 10px; border: 1px solid #c6d9d7; border-radius: 8px; background: #f6faf9; }
.guide-search-box span { color: #78909b; font-size: 17px; }
.guide-search-box input { width: 100%; border: 0; outline: 0; background: transparent; color: #17324a; font: 11px var(--font-mono); user-select: text; -webkit-user-select: text; }
.guide-tree-group { margin-bottom: 7px; border: 1px solid #d6e4e2; border-radius: 8px; overflow: hidden; }
.guide-tree-group summary { display: flex; align-items: center; gap: 8px; padding: 9px; list-style: none; cursor: pointer; background: #f1f8f6; }
.guide-tree-group summary::-webkit-details-marker { display: none; }
.guide-tree-group summary > span { font-size: 18px; }
.guide-tree-group summary div { flex: 1; }
.guide-tree-group summary strong, .guide-tree-group summary small { display: block; }
.guide-tree-group summary strong { color: #28495a; font-size: 11px; }
.guide-tree-group summary small { color: #78909b; font-size: 8px; }
.guide-tree-group summary i { color: #7c929c; font-style: normal; transition: transform .2s; }
.guide-tree-group:not([open]) summary i { transform: rotate(-90deg); }
.guide-tree-items { padding: 5px; background: #fff; }
.guide-topic-link { display: flex; width: 100%; align-items: center; gap: 8px; padding: 7px 8px; border: 0; border-radius: 6px; background: transparent; color: #496676; text-align: left; cursor: pointer; font-family: var(--font-mono); }
.guide-topic-link:hover { background: #f1f8f6; }
.guide-topic-link.active { background: #fff2d9; color: #8f4b00; box-shadow: inset 3px 0 #e88b12; }
.guide-topic-link.completed > span { color: #078a62; }
.guide-topic-link > span { width: 15px; color: #9badb4; text-align: center; }
.guide-topic-link div { min-width: 0; flex: 1; }
.guide-topic-link strong, .guide-topic-link small { display: block; }
.guide-topic-link strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 9px; }
.guide-topic-link small { color: #91a3aa; font-size: 7px; }
.guide-no-result { padding: 15px 8px; color: #748b96; font-size: 9px; line-height: 1.5; }
.evidence-legend { display: grid; gap: 5px; margin-top: 10px; padding: 9px; border-radius: 7px; background: #f7faf9; color: #718895; font-size: 8px; }
.evidence-legend strong { color: #496675; }
.evidence-dot { display: inline-block; width: 7px; height: 7px; margin-right: 5px; border-radius: 50%; }
.evidence-dot.verified { background: #19a775; }
.evidence-dot.provisional { background: #e79a24; }

.learning-article-shell { min-width: 0; overflow: hidden; }
.guide-article { max-height: calc(100vh - 295px); min-height: 500px; overflow-y: auto; padding: 28px clamp(20px, 4vw, 58px); font-family: Arial, sans-serif; user-select: text; -webkit-user-select: text; }
.guide-article * { user-select: text; -webkit-user-select: text; }
.guide-article-header { padding-bottom: 22px; border-bottom: 1px solid #d7e5e3; }
.guide-breadcrumb { display: flex; align-items: center; gap: 7px; color: #718a95; font: 700 9px var(--font-mono); text-transform: uppercase; letter-spacing: .5px; }
.guide-breadcrumb i { color: #b0bfc3; font-style: normal; }
.guide-article-header h1 { margin: 8px 0 4px; color: #17324a; font-size: clamp(27px, 3vw, 42px); line-height: 1.12; letter-spacing: -1px; }
.guide-article-header > p { color: #5b7584; font-size: 15px; line-height: 1.5; }
.guide-content-section { padding: 21px 0 4px; }
.guide-content-section h2, .guide-references h2 { margin-bottom: 9px; color: #1d4658; font-size: 19px; }
.guide-content-section > p { margin-bottom: 10px; color: #405f6f; font-size: 14px; line-height: 1.72; }
.guide-content-section ul { display: grid; gap: 7px; margin: 8px 0 12px; padding-left: 22px; color: #405f6f; font-size: 14px; line-height: 1.58; }
.guide-content-section li::marker { color: #0b9785; }
.guide-formula { margin: 13px 0; padding: 15px; overflow-x: auto; border: 1px solid #b9d8d3; border-radius: 8px; background: #eff9f6; color: #14665e; font: 800 14px var(--font-mono); text-align: center; }
.guide-note { margin: 13px 0; padding: 12px 14px; border-left: 4px solid #e99a2b; border-radius: 4px 8px 8px 4px; background: #fff7e7; }
.guide-note strong { color: #995200; font: 900 9px var(--font-mono); text-transform: uppercase; letter-spacing: .7px; }
.guide-note p { margin-top: 4px; color: #6c5a3d; font-size: 13px; line-height: 1.58; }
.guide-references { margin-top: 24px; padding-top: 22px; border-top: 2px solid #d7e6e3; }
.guide-reference-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.guide-reference-heading span { padding: 3px 8px; border-radius: 99px; background: #e4f4ef; color: #16715f; font: 800 8px var(--font-mono); }
.reference-caveat { margin-bottom: 12px; color: #748994; font-size: 11px; line-height: 1.5; }
.reference-card { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 12px; margin-bottom: 8px; padding: 12px; border: 1px solid #d3e2e0; border-radius: 8px; background: #f9fcfb; }
.reference-year { display: grid; place-items: center; height: 32px; border-radius: 6px; background: #dff1ec; color: #136a5c; font: 900 10px var(--font-mono); }
.reference-card strong { color: #294b5b; font-size: 12px; line-height: 1.45; }
.reference-card p { margin: 3px 0; color: #637c88; font-size: 11px; }
.reference-card code { display: block; width: fit-content; margin: 4px 0; padding: 2px 5px; border-radius: 3px; background: #edf3f2; color: #3a6473; font-size: 9px; user-select: text; }
.reference-card small { color: #9a681c; font-size: 9px; }
.guide-article-actions { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; padding: 10px 13px; border-top: 1px solid #d5e4e2; background: #f7faf9; }
.guide-nav-btn, .guide-complete-btn { min-height: 38px; border-radius: 7px; font: 800 9px var(--font-mono); cursor: pointer; }
.guide-nav-btn { border: 1px solid #c3d8d5; background: #fff; color: #496777; }
.guide-nav-btn:last-child { justify-self: stretch; }
.guide-nav-btn:disabled { opacity: .35; cursor: default; }
.guide-complete-btn { padding-inline: 16px; border: 1px solid #72bca6; background: #e5f6f0; color: #087357; }
.guide-complete-btn.completed { background: #0d8b68; color: #fff; }

@media (max-width: 1000px) {
  .learning-docs-layout { grid-template-columns: 255px minmax(0, 1fr); }
  .learning-hero { padding: 22px; }
}

@media (max-width: 760px) {
  body.about-active .terminal-workspace { padding-bottom: 12px; }
  .learning-hero { grid-template-columns: 1fr; gap: 14px; padding: 20px 16px; border-radius: 11px; }
  .learning-hero h1 { font-size: 30px; }
  .learning-hero-copy > p { font-size: 13px; }
  .learning-hero-actions > button { flex: 1 1 160px; }
  .learning-docs-layout { grid-template-columns: 1fr; }
  .learning-sidebar { position: static; max-height: none; }
  .guide-nav-tree { max-height: 340px; overflow-y: auto; }
  .guide-article { max-height: none; min-height: 0; padding: 23px 18px; }
  .guide-article-header h1 { font-size: 29px; }
  .guide-article-header > p { font-size: 14px; }
  .guide-content-section > p, .guide-content-section ul { font-size: 13px; }
  .guide-article-actions { position: sticky; bottom: 0; grid-template-columns: 1fr 1fr; z-index: 2; }
  .guide-complete-btn { grid-column: 1 / -1; grid-row: 1; }
  .reference-card { grid-template-columns: 42px minmax(0, 1fr); }
}

/* --- TAB: RUANG DIREKSI (HOLDING OFFICE) --- */
.holding-dashboard-layout {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 1200px;
  margin: 0 auto;
}

.boardroom-hero-card {
  background: linear-gradient(135deg, #09131d 0%, #112233 60%, #1e3a5f 100%);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 12px;
  padding: 20px 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 0 20px rgba(245, 158, 11, 0.1);
}

.boardroom-brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.boardroom-crest {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: linear-gradient(135deg, #f59e0b, #b45309);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35);
}

.boardroom-titles h1 {
  font-size: 22px;
  font-weight: 900;
  color: #fff;
  margin: 0 0 4px;
  letter-spacing: -0.5px;
}

.boardroom-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.badge-founder {
  background: rgba(245, 158, 11, 0.2);
  border: 1px solid rgba(245, 158, 11, 0.5);
  color: #fcd34d;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 99px;
  font-family: var(--font-mono);
}

.badge-dynasty {
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid rgba(16, 185, 129, 0.5);
  color: #6ee7b7;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 99px;
  font-family: var(--font-mono);
}

.badge-building {
  background: rgba(59, 130, 246, 0.2);
  border: 1px solid rgba(59, 130, 246, 0.5);
  color: #93c5fd;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 99px;
  font-family: var(--font-mono);
}

.boardroom-quick-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}

.executive-briefing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 14px;
}

.briefing-card {
  background: rgba(255, 254, 251, .98);
  border: 1px solid #c9dcda;
  border-radius: 10px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  transition: transform 0.2s ease, border-color 0.2s ease;
  box-shadow: 0 4px 14px rgba(48, 80, 90, .06);
}
.briefing-card:hover {
  transform: translateY(-2px);
  border-color: #e88b12;
}

.briefing-card-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  color: #b65f00;
  text-transform: uppercase;
}

.briefing-card h3 {
  font-size: 15px;
  font-weight: 800;
  color: #17324a;
  margin: 4px 0 6px;
}

.briefing-card p {
  font-size: 12px;
  color: #526e7c;
  line-height: 1.5;
  margin: 0;
}

.briefing-action-btn {
  background: #f1f8f6;
  border: 1px solid #9fc9c4;
  color: #17665f;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  align-self: flex-start;
}
.briefing-action-btn:hover {
  background: #e88b12;
  color: #fff;
  border-color: #e88b12;
}

.founder-choice-card {
  border: 2px solid #c9dcda;
  background: #fff;
  border-radius: 8px;
  padding: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.founder-choice-card:hover, .founder-choice-card.active {
  border-color: #e88b12;
  background: #fff8eb;
}
.founder-choice-card strong {
  color: #9a5200;
  font-size: 13px;
}
.founder-choice-card small {
  color: #526e7c;
  font-size: 10px;
  line-height: 1.4;
}

