/* ==========================================
 * PrimeTrade Desk - Ultra-Premium Design System
 * Theme Tokens & Glassmorphism Utilities
 * ========================================== */

:root {
  /* Dark Theme Palette (Default) */
  --bg: #07090e;
  --surface: rgba(18, 22, 31, 0.85);
  --surface-2: rgba(28, 34, 48, 0.7);
  --surface-hover: rgba(38, 46, 64, 0.9);
  --line: rgba(255, 255, 255, 0.08);
  --soft-line: rgba(255, 255, 255, 0.04);
  --ink: #f1f5f9;
  --muted: #94a3b8;
  --faint: #64748b;
  
  /* Brand Accent Colors */
  --amber: #ffb300;
  --amber-glow: rgba(255, 179, 0, 0.25);
  --green: #00e676;
  --green-glow: rgba(0, 230, 118, 0.25);
  --red: #ff3d57;
  --red-glow: rgba(255, 61, 87, 0.25);
  --blue: #00e5ff;
  --blue-glow: rgba(0, 229, 255, 0.2);
  --purple: #ab47bc;

  /* UI Metrics & Effects */
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
  --glass-border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Light Theme Variables */
body.light-mode {
  --bg: #f4f6fa;
  --surface: rgba(255, 255, 255, 0.9);
  --surface-2: rgba(241, 245, 249, 0.85);
  --surface-hover: rgba(226, 232, 240, 0.9);
  --line: rgba(0, 0, 0, 0.08);
  --soft-line: rgba(0, 0, 0, 0.04);
  --ink: #0f172a;
  --muted: #475569;
  --faint: #94a3b8;

  --amber: #d97706;
  --amber-glow: rgba(217, 119, 6, 0.2);
  --green: #059669;
  --green-glow: rgba(5, 150, 105, 0.2);
  --red: #dc2626;
  --red-glow: rgba(220, 38, 38, 0.2);
  --blue: #0284c7;
  --blue-glow: rgba(2, 132, 199, 0.2);

  --shadow: 0 10px 25px rgba(0, 0, 0, 0.06);
  --glass-border: 1px solid rgba(0, 0, 0, 0.08);
}

/* Light Mode Comprehensive Typography & Contrast Overrides */
body.light-mode {
  color: #0f172a;
}

body.light-mode .symbol-price-badge,
body.light-mode .stock-title,
body.light-mode .chart-title-bar h2 {
  color: #0f172a !important;
}

body.light-mode .symbol-price-badge span,
body.light-mode #active-symbol-price {
  color: #475569 !important;
}

body.light-mode #market-closed-banner,
body.light-mode #market-closed-text {
  color: #334155 !important;
}

body.light-mode .section-subtitle,
body.light-mode .shares-section p {
  color: #475569 !important;
}

body.light-mode .shares-table th {
  color: #0f172a !important;
}

body.light-mode .shares-table td {
  color: #1e293b !important;
}

body.light-mode .table-symbol {
  color: #0f172a !important;
  font-weight: 800 !important;
}

body.light-mode .table-name {
  color: #475569 !important;
}

body.light-mode .pill-closed {
  background: rgba(220, 38, 38, 0.15) !important;
  color: #dc2626 !important;
  font-weight: 800 !important;
}

body.light-mode .pill-open {
  background: rgba(5, 150, 105, 0.15) !important;
  color: #059669 !important;
  font-weight: 800 !important;
}

body.light-mode .btn-mini-chart {
  background: #e2e8f0 !important;
  color: #0f172a !important;
  border: 1px solid #cbd5e1 !important;
  font-weight: 700 !important;
}

body.light-mode .btn-mini-chart:hover {
  background: #d97706 !important;
  color: #ffffff !important;
}

body.light-mode .share-item {
  background: #f1f5f9 !important;
  border: 1px solid #cbd5e1 !important;
}

body.light-mode .share-item strong {
  color: #0f172a !important;
}

body.light-mode .share-item small {
  color: #475569 !important;
}

* {
  box-sizing: border-box;
}

img {
  max-width: 100%;
  height: auto;
}

html {
  scroll-behavior: smooth;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Inter', sans-serif;
  background-color: var(--bg);
  color: var(--ink);
}

body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.5;
}

/* Typography Utilities */
h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
}

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

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* App Shell Layout */
.app-shell {
  display: flex;
  min-height: 100vh;
}

/* Sidebar Navigation */
.sidebar {
  width: 72px;
  background: var(--surface);
  border-right: var(--glass-border);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 0;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 100;
  backdrop-filter: blur(12px);
}

.brand-mark {
  width: 44px;
  height: 44px;
  max-width: 44px;
  max-height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  text-decoration: none;
  background: transparent;
  overflow: hidden;
  box-shadow: 0 0 14px var(--amber-glow);
  flex-shrink: 0;
}

.brand-logo-img {
  width: 44px !important;
  height: 44px !important;
  max-width: 44px !important;
  max-height: 44px !important;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  border: 2px solid var(--amber);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.brand-mark:hover .brand-logo-img {
  transform: scale(1.08);
}

.topbar-brand-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-logo-img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--amber);
  box-shadow: 0 0 10px var(--amber-glow);
  flex-shrink: 0;
}

.nav-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.nav-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  color: var(--muted);
  transition: all 0.2s ease;
}

.nav-icon:hover,
.nav-icon.active {
  color: var(--ink);
  background: var(--surface-hover);
}

.nav-icon.active {
  color: var(--amber);
  box-shadow: inset 0 0 0 1px var(--amber);
}

.theme-switch {
  margin-top: auto;
  color: var(--amber);
}

/* Workspace Main Container */
.workspace {
  flex: 1;
  padding: 24px;
  max-width: 1440px;
  margin: 0 auto;
}

/* Topbar Header */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 16px;
}

.topbar-header-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ist-clock {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  background: rgba(0, 229, 255, 0.1);
  color: var(--blue);
  border: 1px solid var(--blue-glow);
}

.topbar h1 {
  font-size: 1.75rem;
  background: linear-gradient(135deg, var(--ink), var(--muted));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* Broker API Selector */
.broker-api-selector {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  padding: 6px 12px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.feed-select {
  background: transparent;
  border: none;
  color: var(--ink);
  font-size: 0.85rem;
  font-weight: 700;
  outline: none;
  cursor: pointer;
}

.feed-select option {
  background: #12161f;
  color: #f1f5f9;
}

.broker-settings-btn {
  color: var(--amber);
  padding: 4px;
  border-radius: 4px;
  display: grid;
  place-items: center;
}

/* Search Box & Instant Autocomplete Dropdown */
.search-wrapper {
  position: relative;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  padding: 0 14px;
  height: 42px;
  border-radius: var(--radius);
  width: 320px;
  box-shadow: var(--shadow);
  color: var(--ink);
}

.search-box input {
  border: none;
  background: transparent;
  color: var(--ink);
  font-size: 0.88rem;
  outline: none;
  width: 100%;
}

.search-autocomplete-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: 100%;
  min-width: 340px;
  max-height: 380px;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--amber);
  border-radius: var(--radius);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5);
  z-index: 2500;
  padding: 6px;
  backdrop-filter: blur(12px);
}

.search-autocomplete-dropdown[hidden] {
  display: none !important;
}

.search-result-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-radius: 8px;
  background: transparent;
  border: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease;
}

.search-result-item:hover {
  background: var(--surface-hover);
}

.search-result-symbol {
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--amber);
}

.search-result-name {
  font-size: 0.76rem;
  color: var(--muted);
  display: block;
}

.search-result-price-box {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.search-result-price {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink);
}

.search-result-change {
  font-size: 0.74rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
}

.search-result-change.up {
  background: rgba(0, 230, 118, 0.15);
  color: var(--green);
}

.search-result-change.down {
  background: rgba(255, 61, 87, 0.15);
  color: var(--red);
}

.search-no-results {
  padding: 16px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
}

.primary-action {
  height: 42px;
  padding: 0 20px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--amber), #ffe082);
  color: #090b0e;
  font-weight: 800;
  font-size: 0.88rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 6px 20px var(--amber-glow);
  transition: transform 0.15s ease;
}

.primary-action:hover {
  transform: translateY(-2px);
}

/* ==========================================
 * Google AdSense Zones & Compliance Layout
 * ========================================== */

.adsense-slot-container {
  background: var(--surface-2);
  border: 1px dashed var(--amber);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  margin-bottom: 16px;
  position: relative;
  text-align: center;
  overflow: hidden;
}

.leaderboard-slot-thin,
.chart-bottom-slot {
  background: var(--surface-2);
  border: 1px dashed var(--amber);
  border-radius: 6px;
  padding: 2px 8px;
  margin-bottom: 12px;
  min-height: 28px;
  max-height: 38px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.chart-bottom-slot {
  margin-top: 14px;
  margin-bottom: 0;
}

.adsense-label-thin {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6rem;
  font-weight: 800;
  color: var(--amber);
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 1px;
}

.footer-slot {
  min-height: 80px;
  margin-top: 30px;
}

/* My Custom Direct Sponsor Ads in Right Sidebar */
.my-custom-ads-sidebar {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.my-ads-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.my-ads-title-row h3 {
  font-size: 0.88rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--amber);
}

.sponsor-card-compact {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: transform 0.15s ease;
}

.sponsor-card-compact:hover {
  transform: translateY(-2px);
  border-color: var(--amber);
}

.sponsor-card-compact h4 {
  font-size: 0.88rem;
  margin: 2px 0;
  color: var(--ink);
}

.sponsor-card-compact p {
  font-size: 0.78rem;
  color: var(--muted);
  margin: 0 0 8px;
  line-height: 1.35;
}

/* Ticker Tape Band */
.ticker-band {
  background: var(--surface);
  border: var(--glass-border);
  border-radius: var(--radius);
  margin-bottom: 24px;
  overflow: hidden;
}

.ticker-wrapper {
  display: flex;
  align-items: center;
  height: 46px;
  overflow: hidden;
  position: relative;
  width: 100%;
}

.ticker-badge {
  background: var(--amber);
  color: #090b0e;
  font-size: 0.72rem;
  font-weight: 900;
  padding: 0 16px;
  height: 100%;
  display: grid;
  place-items: center;
  letter-spacing: 0.05em;
  flex: 0 0 auto;
  z-index: 10;
  box-shadow: 4px 0 12px rgba(0, 0, 0, 0.4);
}

.ticker-track {
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 0 16px;
  white-space: nowrap;
  animation: ticker-marquee 45s linear infinite;
  animation-delay: 2s;
  will-change: transform;
  transform: translateZ(0);
  backface-visibility: hidden;
}

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

.ticker-track::-webkit-scrollbar {
  display: none;
}

.ticker-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  color: var(--ink);
}

.ticker-symbol,
.ticker-price {
  color: var(--ink);
}

/* Dashboard Grid Layout */
.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
  margin-bottom: 30px;
}

/* Primary Chart Station */
.chart-station {
  background: var(--surface);
  border: var(--glass-border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.chart-meta-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 16px;
}

.symbol-meta-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.symbol-meta-row h2 {
  font-size: 1.15rem;
}

.symbol-price-badge {
  font-size: 1.15rem;
  font-weight: 800;
  font-family: 'JetBrains Mono', monospace;
}

.symbol-change-badge {
  font-size: 0.82rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
}

.symbol-change-badge.up {
  background: rgba(0, 230, 118, 0.15);
  color: var(--green);
}

.symbol-change-badge.down {
  background: rgba(255, 61, 87, 0.15);
  color: var(--red);
}

.market-status-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 20px;
}

.status-open {
  background: rgba(0, 230, 118, 0.15);
  color: var(--green);
  border: 1px solid var(--green-glow);
}

.status-closed {
  background: rgba(255, 61, 87, 0.15);
  color: var(--red);
  border: 1px solid var(--red-glow);
}

.feed-status-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(0, 229, 255, 0.1);
  color: var(--blue);
}

.chart-action-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

svg.lucide,
[data-lucide] {
  width: 16px;
  height: 16px;
  stroke-width: 2.2;
  stroke: currentColor;
}

.btn-group {
  display: flex;
  background: var(--surface-2);
  padding: 3px;
  border-radius: 8px;
  gap: 3px;
  border: 1px solid var(--line);
}

.chart-ctrl-btn {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  transition: all 0.15s ease;
}

.chart-ctrl-btn:hover {
  color: var(--amber);
  background: var(--surface-hover);
  border-color: var(--amber);
}

.chart-type-toggle,
.interval-switcher {
  display: flex;
  background: var(--surface-2);
  padding: 3px;
  border-radius: 8px;
  gap: 3px;
  border: 1px solid var(--line);
}

.chart-type-btn,
.interval {
  height: 32px;
  padding: 0 10px;
  display: grid;
  place-items: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink);
  border-radius: 6px;
}

.chart-type-btn.active,
.interval.active {
  background: var(--amber);
  color: #090b0e;
  font-weight: 900;
}

/* Chart Shell Canvas Container */
.chart-shell {
  position: relative;
  height: 520px;
  width: 100%;
  background: var(--bg);
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: var(--glass-border);
}

#live-chart-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.canvas-interaction-hint {
  position: absolute;
  bottom: 12px;
  left: 14px;
  padding: 4px 10px;
  background: var(--surface);
  border: var(--glass-border);
  border-radius: 6px;
  font-size: 0.72rem;
  font-family: 'JetBrains Mono', monospace;
  color: var(--muted);
  pointer-events: none;
}

.chart-hud {
  position: absolute;
  top: 12px;
  left: 14px;
  display: flex;
  gap: 16px;
  background: var(--surface);
  padding: 6px 12px;
  border-radius: 6px;
  border: var(--glass-border);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  color: var(--ink);
  pointer-events: none;
}

.hud-item {
  color: var(--muted);
}

.hud-item strong {
  color: var(--ink);
}

.indicator-dock {
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.dock-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
}

.indicator-chip {
  height: 30px;
  padding: 0 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  background: var(--surface-2);
  color: var(--muted);
  border: 1px solid var(--line);
  transition: all 0.15s ease;
}

.indicator-chip.active {
  background: var(--surface-hover);
  color: var(--ink);
  border-color: var(--amber);
}

.indicator-chip.success.active {
  background: rgba(0, 230, 118, 0.15);
  color: var(--green);
  border-color: var(--green);
}

/* Watchlist Side Panel */
.market-panel {
  background: var(--surface);
  border: var(--glass-border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}

.panel-header {
  margin-bottom: 16px;
}

.panel-kicker {
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--amber);
  letter-spacing: 0.05em;
  margin: 0;
}

.symbol-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.symbol-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--line);
  transition: all 0.15s ease;
  width: 100%;
  text-align: left;
  color: var(--ink);
}

.symbol-row:hover,
.symbol-row.active {
  border-color: var(--amber);
  background: var(--surface-hover);
}

.symbol-info {
  display: flex;
  flex-direction: column;
}

.symbol-name {
  font-weight: 800;
  font-size: 0.92rem;
  color: var(--ink);
}

.symbol-sector {
  font-size: 0.74rem;
  color: var(--muted);
  font-weight: 500;
}

.symbol-price-box {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.symbol-price {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--ink);
}

.symbol-change {
  font-size: 0.75rem;
  font-weight: 800;
}

.symbol-change.up { color: var(--green); }
.symbol-change.down { color: var(--red); }

/* ZONE 2: Custom Sponsor / Affiliate Ad Cards */
.custom-sponsor-section {
  margin-bottom: 35px;
}

.section-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.badge-partner {
  background: var(--amber);
  color: #090b0e;
  font-size: 0.7rem;
  font-weight: 900;
  padding: 4px 10px;
  border-radius: 20px;
}

.sponsor-ad-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.sponsor-card {
  background: var(--surface);
  border: var(--glass-border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform 0.2s ease;
}

.sponsor-card:hover {
  transform: translateY(-4px);
}

.sponsor-badge {
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--amber);
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.sponsor-card h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.sponsor-card p {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0 0 16px;
  line-height: 1.4;
}

.sponsor-link-btn {
  margin-top: auto;
  align-self: flex-start;
  padding: 8px 16px;
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--amber);
  font-weight: 800;
  font-size: 0.82rem;
  border: 1px solid var(--line);
}

.sponsor-link-btn:hover {
  background: var(--amber);
  color: #090b0e;
}

/* Shares Directory Table */
.shares-section {
  background: var(--surface);
  border: var(--glass-border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 30px;
  content-visibility: auto;
  contain-intrinsic-size: 600px;
}

.screener-tabs {
  display: flex;
  gap: 6px;
  background: var(--surface-2);
  padding: 4px;
  border-radius: 8px;
}

.screener-tab {
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
  border-radius: 6px;
}

.screener-tab.active {
  background: var(--amber);
  color: #090b0e;
}

.table-container {
  overflow-x: auto;
  margin-top: 16px;
}

.shares-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.88rem;
}

.shares-table th {
  padding: 12px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  font-weight: 700;
}

.shares-table td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--soft-line);
}

/* App Footer & Cookie Banner */
.app-footer {
  border-top: 1px solid var(--line);
  padding-top: 24px;
  text-align: center;
  margin-top: 40px;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 12px;
  font-size: 0.85rem;
}

.copyright {
  font-size: 0.78rem;
  color: var(--muted);
  margin: 0;
}

.cookie-banner {
  position: fixed;
  bottom: 20px;
  right: 20px;
  left: 20px;
  max-width: 500px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--amber);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  z-index: 3000;
}

.cookie-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.cookie-content p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--ink);
}

/* Modal Backdrop & Glassmorphic Modal Card Overlay */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(9, 11, 14, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 5000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop[hidden] {
  display: none !important;
}

.modal-card {
  background: var(--surface);
  border: 1px solid var(--amber);
  border-radius: var(--radius);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px;
  position: relative;
  animation: modal-pop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modal-pop {
  0% {
    opacity: 0;
    transform: scale(0.92) translateY(12px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

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

.modal-header h3 {
  font-size: 1.15rem;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--amber);
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}

.modal-close:hover {
  color: var(--red);
}

.modal-subtitle {
  font-size: 0.84rem;
  color: var(--muted);
  margin: 0 0 18px;
  line-height: 1.45;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  height: 42px;
  padding: 0 14px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink);
  font-size: 0.88rem;
  outline: none;
  transition: border-color 0.15s ease;
}

.form-control:focus {
  border-color: var(--amber);
}

/* Admin Portal & 2FA Modal Styling */
.admin-modal-card {
  max-width: 540px;
}

.full-width {
  width: 100%;
  justify-content: center;
}

.form-control.sm {
  height: 34px;
  font-size: 0.8rem;
  margin-bottom: 6px;
}

.text-center {
  text-align: center;
}

.otp-input {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.25rem;
  letter-spacing: 0.3em;
  font-weight: 800;
}

.otp-notice-box {
  background: var(--surface-2);
  border: 1px solid var(--blue);
  border-radius: var(--radius-sm);
  padding: 12px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}

.otp-notice-box svg {
  color: var(--blue);
  flex: 0 0 auto;
  margin-top: 2px;
}

.otp-notice-box p {
  margin: 2px 0 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.otp-code-callout {
  background: rgba(255, 179, 0, 0.12);
  border: 1px dashed var(--amber);
  padding: 8px 12px;
  border-radius: 6px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--amber);
  margin-bottom: 16px;
}

.admin-welcome-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  margin-bottom: 12px;
  padding: 8px 12px;
  background: rgba(0, 230, 118, 0.12);
  border-radius: 6px;
  border: 1px solid var(--green);
  color: var(--green);
}

.ad-config-box {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-bottom: 12px;
}

.ad-config-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.ad-config-header h4 {
  margin: 0;
  font-size: 0.88rem;
  color: var(--amber);
}

/* Switch Toggle Slider */
.switch-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.switch-toggle input {
  display: none;
}

.slider {
  width: 34px;
  height: 18px;
  background-color: var(--muted);
  border-radius: 20px;
  position: relative;
  transition: 0.2s;
}

.slider::before {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  left: 2px;
  bottom: 2px;
  background-color: #ffffff;
  transition: 0.2s;
}

.switch-toggle input:checked + .slider {
  background-color: var(--green);
}

.switch-toggle input:checked + .slider::before {
  transform: translateX(16px);
}

.switch-label {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--ink);
}
