/* site/trading/styles.css - SaxoSense AI Trading Intelligence Suite */

:root {
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --bg-dark: #070b14;
  --bg-card: rgba(15, 23, 42, 0.72);
  --bg-card-hover: rgba(30, 41, 59, 0.85);
  --bg-glass: rgba(255, 255, 255, 0.04);
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(14, 165, 233, 0.5);

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

  --accent-cyan: #0ea5e9;
  --accent-emerald: #10b981;
  --accent-rose: #f43f5e;
  --accent-amber: #f59e0b;
  --accent-purple: #a855f7;
  --accent-indigo: #6366f1;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 9999px;

  --shadow-glow: 0 0 25px rgba(14, 165, 233, 0.25);
  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

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

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-body);
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: hidden;
  position: relative;
}

/* Ambient Aurora Gradients */
.aurora-bg {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.aurora-blob-1 {
  position: absolute;
  top: -15%;
  left: 15%;
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.15) 0%, transparent 70%);
  filter: blur(80px);
  animation: floatAurora 18s ease-in-out infinite alternate;
}
.aurora-blob-2 {
  position: absolute;
  bottom: 10%;
  right: 10%;
  width: 650px;
  height: 650px;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.12) 0%, transparent 70%);
  filter: blur(90px);
  animation: floatAurora 22s ease-in-out infinite alternate-reverse;
}
.aurora-blob-3 {
  position: absolute;
  top: 40%;
  left: 50%;
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.1) 0%, transparent 70%);
  filter: blur(85px);
  animation: floatAurora 20s ease-in-out infinite alternate;
}

@keyframes floatAurora {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(60px, -40px) scale(1.1); }
  100% { transform: translate(-40px, 50px) scale(0.95); }
}

/* Top Ticker Tape */
.ticker-tape-container {
  width: 100%;
  background: rgba(10, 15, 28, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  overflow: hidden;
  position: relative;
  z-index: 10;
  height: 38px;
  display: flex;
  align-items: center;
}
.ticker-tape-track {
  display: flex;
  gap: 28px;
  white-space: nowrap;
  animation: tickerScroll 45s linear infinite;
  padding-left: 20px;
}
.ticker-tape-track:hover {
  animation-play-state: paused;
}
.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 3px 8px;
  border-radius: 4px;
  transition: background 0.2s;
}
.ticker-item:hover {
  background: rgba(255, 255, 255, 0.08);
}
.price-up { color: var(--accent-emerald); }
.price-down { color: var(--accent-rose); }

@keyframes tickerScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* App Shell */
.app-shell {
  position: relative;
  z-index: 1;
  max-width: 1440px;
  margin: 0 auto;
  padding: 20px 24px 60px;
}

/* Top Navbar */
.top-navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}
.brand-section {
  display: flex;
  align-items: center;
  gap: 14px;
}
.brand-logo-badge {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-indigo));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: var(--shadow-glow);
}
.brand-titles h1 {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand-titles p {
  font-size: 12.5px;
  color: var(--text-muted);
}

.nav-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
}
.btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}
.btn:active {
  transform: scale(0.98);
}
.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent-cyan), #0284c7);
  border-color: rgba(14, 165, 233, 0.4);
  color: #fff;
}
.btn-primary:hover {
  box-shadow: var(--shadow-glow);
}
.btn-amber {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.4);
  color: #fbbf24;
}
.btn-amber:hover {
  background: rgba(245, 158, 11, 0.25);
}
.btn-purple {
  background: rgba(168, 85, 247, 0.15);
  border-color: rgba(168, 85, 247, 0.4);
  color: #c084fc;
}
.btn.active {
  background: var(--accent-cyan);
  color: #fff;
  border-color: var(--accent-cyan);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.badge-saxo {
  background: rgba(14, 165, 233, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(14, 165, 233, 0.3);
}
.badge-isa {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}
.badge-strong-buy {
  background: rgba(16, 185, 129, 0.25);
  color: #10b981;
  border: 1px solid #10b981;
}
.badge-buy {
  background: rgba(14, 165, 233, 0.25);
  color: #38bdf8;
  border: 1px solid #38bdf8;
}
.badge-hold {
  background: rgba(245, 158, 11, 0.25);
  color: #fbbf24;
  border: 1px solid #fbbf24;
}
.badge-avoid {
  background: rgba(244, 63, 94, 0.25);
  color: #f43f5e;
  border: 1px solid #f43f5e;
}

/* Navigation Tabs */
.navigation-tabs-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(20px);
  padding: 8px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  margin-bottom: 24px;
}
.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 15px;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  flex: 1 1 auto;
  justify-content: center;
  text-align: center;
}
.tab-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
}
.tab-btn.active {
  color: #fff;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.25), rgba(99, 102, 241, 0.25));
  border: 1px solid var(--accent-cyan);
  box-shadow: 0 4px 15px rgba(14, 165, 233, 0.25);
}

/* Tab Views */
.tab-content-view {
  display: none;
  animation: fadeIn 0.3s ease;
}
.tab-content-view.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Panels & Cards */
.panel-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-card);
}
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 12px;
}
.panel-head h2, .panel-head h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 2-Column Layout */
.layout-2-col {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 24px;
  align-items: start;
}
@media (max-width: 1024px) {
  .layout-2-col {
    grid-template-columns: 1fr;
  }
}

/* Stock Search & List */
.stock-search-input {
  width: 100%;
  padding: 10px 14px;
  font-family: var(--font-body);
  font-size: 13px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  outline: none;
  margin-bottom: 12px;
  transition: border-color 0.2s;
}
.stock-search-input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 10px rgba(14, 165, 233, 0.3);
}

.stock-list-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 680px;
  overflow-y: auto;
  padding-right: 4px;
}
.stock-list-container::-webkit-scrollbar {
  width: 5px;
}
.stock-list-container::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

.stock-list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
}
.stock-list-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateX(3px);
}
.stock-list-item.selected {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.15), rgba(99, 102, 241, 0.15));
  border-color: var(--accent-cyan);
  box-shadow: 0 0 15px rgba(14, 165, 233, 0.2);
}
.stock-item-info strong {
  font-family: var(--font-heading);
  font-size: 14px;
  display: block;
}
.stock-item-info span {
  font-size: 11.5px;
  color: var(--text-muted);
}
.stock-item-price {
  text-align: right;
}
.stock-item-price .val {
  font-weight: 700;
  font-size: 13.5px;
  display: block;
}
.stock-item-price .pct {
  font-size: 11px;
  font-weight: 600;
}

/* Debate Hero & Header */
.debate-hero-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}
.selected-stock-hero h2 {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.5px;
}
.selected-stock-hero p {
  font-size: 13px;
  color: var(--text-muted);
}

.conviction-meter {
  display: flex;
  align-items: center;
  gap: 14px;
}
.conviction-score-circle {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.2), rgba(14, 165, 233, 0.1));
  border: 2px solid var(--accent-emerald);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 20px;
  color: var(--accent-emerald);
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.3);
}

/* CIO Consensus Big Panel */
.cio-consensus-box {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.12), rgba(99, 102, 241, 0.08));
  border: 1px solid rgba(14, 165, 233, 0.3);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}
.cio-consensus-box::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--accent-cyan);
}
.cio-debate-text {
  font-size: 14.5px;
  line-height: 1.65;
  color: #e2e8f0;
  margin-bottom: 20px;
}

.cio-action-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
}
.cio-action-card {
  background: rgba(0, 0, 0, 0.35);
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}
.cio-action-card span {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 700;
  display: block;
  margin-bottom: 4px;
}
.cio-action-card strong {
  font-size: 15px;
  font-weight: 800;
  color: #fff;
}

/* Agents Grid */
.agents-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 18px;
}
.agent-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.2s;
}
.agent-card:hover {
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}
.agent-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.agent-info {
  display: flex;
  align-items: center;
  gap: 10px;
}
.agent-avatar {
  font-size: 24px;
}
.agent-info h4 {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  color: #fff;
}
.agent-info span {
  font-size: 11px;
  color: var(--text-muted);
}
.agent-score-pill {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 13px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}

.agent-notes-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
  font-size: 12.5px;
  color: #cbd5e1;
}
.agent-notes-list li {
  position: relative;
  padding-left: 16px;
  line-height: 1.45;
}
.agent-notes-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--accent-cyan);
  font-size: 16px;
  top: -2px;
}

.agent-recommendation {
  background: rgba(0, 0, 0, 0.3);
  padding: 10px 12px;
  border-radius: 6px;
  border-left: 3px solid var(--accent-indigo);
  font-size: 12px;
  color: var(--text-main);
  font-style: italic;
}

/* Screener Tables */
.screener-table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}
.screener-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}
.screener-table th {
  background: rgba(15, 23, 42, 0.9);
  padding: 12px 16px;
  font-family: var(--font-heading);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border-subtle);
  transition: all 0.2s ease;
}
.screener-table th.sortable {
  cursor: pointer;
  user-select: none;
}
.screener-table th.sortable:hover {
  color: #fff;
  background: rgba(14, 165, 233, 0.15);
}
.screener-table th.sortable::after {
  content: " ⇅";
  opacity: 0.4;
  font-size: 10px;
  margin-left: 4px;
}
.screener-table th.sort-asc {
  color: var(--accent-cyan) !important;
  background: rgba(14, 165, 233, 0.12) !important;
}
.screener-table th.sort-asc::after {
  content: " ▲" !important;
  opacity: 1 !important;
}
.screener-table th.sort-desc {
  color: var(--accent-cyan) !important;
  background: rgba(14, 165, 233, 0.12) !important;
}
.screener-table th.sort-desc::after {
  content: " ▼" !important;
  opacity: 1 !important;
}
.screener-table td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: #e2e8f0;
}
.screener-table tr:hover td {
  background: rgba(255, 255, 255, 0.03);
}

/* Calculators */
.calc-card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: center;
}
@media (max-width: 768px) {
  .calc-card-grid {
    grid-template-columns: 1fr;
  }
}
.input-control-group {
  margin-bottom: 12px;
}
.input-control-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.input-control-group input {
  width: 100%;
  padding: 10px 12px;
  font-size: 13px;
  font-family: var(--font-body);
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: #fff;
  outline: none;
}
.input-control-group input:focus {
  border-color: var(--accent-cyan);
}

.calc-result-box {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(14, 165, 233, 0.1));
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-md);
  padding: 24px;
  text-align: center;
}
.result-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 8px;
}
.result-value {
  font-family: var(--font-heading);
  font-size: 36px;
  font-weight: 900;
  color: #fff;
  margin-bottom: 4px;
}
.result-sub {
  font-size: 13px;
  color: var(--accent-emerald);
  font-weight: 600;
}

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(12px);
  z-index: 9999;
  display: none;
  opacity: 0;
  align-items: center;
  justify-content: center;
  padding: 20px;
  transition: opacity 0.2s ease;
}
.modal-overlay.open,
.modal-overlay.active {
  display: flex !important;
  opacity: 1 !important;
}
.modal-card {
  background: #0f172a;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  max-width: 620px;
  width: 100%;
  position: relative;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
  animation: modalPop 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.modal-close-btn {
  position: absolute;
  top: 18px;
  right: 18px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
}
.modal-close-btn:hover {
  color: #fff;
}

@keyframes modalPop {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

/* Audio Voice Bar */
.audio-voice-bar {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid var(--accent-cyan);
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-glow);
}
.voice-wave {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 16px;
}
.voice-bar {
  width: 3px;
  height: 100%;
  background: var(--accent-cyan);
  border-radius: 2px;
  animation: voiceWave 1s ease-in-out infinite;
}
.voice-bar:nth-child(2) { animation-delay: 0.2s; }
.voice-bar:nth-child(3) { animation-delay: 0.4s; }
.voice-bar:nth-child(4) { animation-delay: 0.1s; }

@keyframes voiceWave {
  0%, 100% { height: 4px; }
  50% { height: 16px; }
}

/* Graham 7-Point Checklist & Chapter Reader */
.graham-point-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  transition: all 0.2s ease;
}
.graham-point-row:hover {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.15);
}
.graham-point-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  color: #e2e8f0;
}
.graham-point-icon {
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
}
.graham-point-icon.pass {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
}
.graham-point-icon.fail {
  background: rgba(244, 63, 94, 0.15);
  color: var(--accent-rose);
}
.graham-point-val {
  font-size: 12px;
  font-weight: 700;
  font-family: var(--font-heading);
}

@media (max-width: 900px) {
  #grahamInspectGrid {
    grid-template-columns: 1fr !important;
  }
}

/* =========================================================================
   SAMSUNG GALAXY Z FOLD 7 DUAL-MODE OPTIMIZATION
   ========================================================================= */

/* Mode 1: Narrow Cover Screen (Folded Posture: ~380-450px width, 21:9 ratio) */
@media (max-width: 480px) {
  .app-shell {
    padding: 10px 10px 80px 10px;
  }
  .top-navbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .nav-actions {
    width: 100%;
    justify-content: space-between;
  }
  .nav-actions .btn {
    flex: 1 1 auto;
    font-size: 11px;
    padding: 6px 8px;
    justify-content: center;
  }
  .layout-2-col {
    grid-template-columns: 1fr !important;
  }
  .screener-table th, .screener-table td {
    padding: 10px 12px;
    font-size: 12px;
  }
  .panel-card {
    padding: 16px;
    margin-bottom: 16px;
  }
  .agents-grid {
    grid-template-columns: 1fr !important;
  }
  .tab-btn {
    font-size: 12px;
    padding: 8px 12px;
  }
}

/* Mode 2: Unfolded Flat Widescreen Display (Tablet Posture: 6:5 / 4:3 widescreen ratio) */
@media (min-width: 600px) and (max-width: 1100px) {
  .layout-2-col {
    grid-template-columns: 320px 1fr;
    gap: 18px;
  }
  .app-shell {
    padding: 18px 24px;
    max-width: 100%;
  }
  .panel-card {
    padding: 22px;
  }
  .agents-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Actionable Trigger Radar Cards */
.action-alert-card {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}
.action-alert-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--accent-amber);
}
.action-alert-card.buy-card::before {
  background: var(--accent-emerald);
}
.action-alert-card.moonshot-card::before {
  background: var(--accent-purple);
}
.action-alert-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

/* =========================================================================
   COLOR PALETTE THEMES
   ========================================================================= */

body.theme-bloomberg {
  --bg-dark: #060d1f;
  --bg-card: rgba(10, 25, 47, 0.85);
  --bg-card-hover: rgba(15, 34, 64, 0.95);
  --border-subtle: rgba(56, 189, 248, 0.15);
  --accent-cyan: #38bdf8;
  --accent-emerald: #34d399;
  --accent-amber: #fbbf24;
  --accent-purple: #818cf8;
}

body.theme-emerald {
  --bg-dark: #041712;
  --bg-card: rgba(6, 30, 23, 0.85);
  --bg-card-hover: rgba(10, 46, 36, 0.95);
  --border-subtle: rgba(16, 185, 129, 0.2);
  --accent-cyan: #2dd4bf;
  --accent-emerald: #10b981;
  --accent-amber: #d97706;
  --accent-purple: #a78bfa;
}

body.theme-aurora {
  --bg-dark: #0c071e;
  --bg-card: rgba(24, 15, 46, 0.85);
  --bg-card-hover: rgba(38, 24, 71, 0.95);
  --border-subtle: rgba(192, 132, 252, 0.2);
  --accent-cyan: #22d3ee;
  --accent-emerald: #4ade80;
  --accent-amber: #f59e0b;
  --accent-purple: #c084fc;
}

body.theme-gold {
  --bg-dark: #121110;
  --bg-card: rgba(28, 25, 23, 0.85);
  --bg-card-hover: rgba(41, 37, 36, 0.95);
  --border-subtle: rgba(245, 158, 11, 0.25);
  --accent-cyan: #38bdf8;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-purple: #d97706;
}

/* =========================================================================
   TOP NAVBAR CONTROLS: LAYOUT & THEME SWITCHERS
   ========================================================================= */

.layout-btn {
  background: transparent;
  color: var(--text-muted);
  border: none;
  padding: 5px 12px;
  font-size: 11.5px;
  font-weight: 700;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.layout-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}
.layout-btn.active {
  color: #fff;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-indigo));
  box-shadow: 0 2px 8px rgba(14, 165, 233, 0.4);
}

/* =========================================================================
   GALAXY Z FOLD 7 DUAL-PANE COCKPIT (UNFOLDED MODE)
   ========================================================================= */

.fold-dual-pane-view {
  display: none;
  gap: 20px;
  margin-top: 14px;
}

body.layout-fold-open .fold-dual-pane-view {
  display: grid;
  grid-template-columns: 38% 62%;
}

body.layout-fold-open .tabs-navigation,
body.layout-fold-open .tab-content-view {
  display: none !important;
}

.fold-pane-left {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: calc(100vh - 170px);
  overflow-y: auto;
  padding-right: 6px;
}

.fold-pane-right {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: calc(100vh - 170px);
  overflow-y: auto;
  padding-right: 6px;
}

/* FOLD CLOSED SINGLE-COLUMN COVER SCREEN MODE (~21.5:9) */
body.layout-fold-closed .app-shell {
  max-width: 480px;
  margin: 0 auto;
  padding: 12px 10px 80px;
}

body.layout-fold-closed .top-navbar {
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}

body.layout-fold-closed .nav-actions {
  justify-content: flex-start;
  overflow-x: auto;
  padding-bottom: 4px;
}

/* Floating Bottom Thumb-Rail for Fold Closed */
.fold-closed-thumb-rail {
  display: none;
  position: fixed;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 24px);
  max-width: 460px;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  padding: 8px 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
  z-index: 1000;
  justify-content: space-around;
  align-items: center;
}

body.layout-fold-closed .fold-closed-thumb-rail {
  display: flex;
}

