/* ============================================================
   FILE: static/css/style.css
   
   HOW TO CUSTOMISE:
   → Change colors: edit the variables inside :root {}
   → Change fonts: edit --font-main and --font-mono
   → Change border radius: edit --radius
   → Mobile first: base styles = mobile, @media = desktop
   ============================================================ */

/* ─────────────────────────────────────────
   DESIGN TOKENS — change these to restyle
   the entire website instantly
   ───────────────────────────────────────── */
:root {
  /* Colors */
  --bg:         #0a0a0f;       /* page background */
  --surface:    #111118;       /* navbar, cards */
  --card:       #16161f;       /* content cards */
  --border:     #2a2a3a;       /* borders */
  --accent:     #7c3aed;       /* purple — main brand color */
  --accent2:    #06b6d4;       /* cyan — secondary */
  --green:      #22c55e;       /* price up */
  --red:        #ef4444;       /* price down */
  --text:       #f1f1f5;       /* main text */
  --muted:      #6b7280;       /* grey text */
  --label:      #9ca3af;       /* labels */

  /* Typography */
  --font-main:  'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono:  'JetBrains Mono', 'Fira Code', monospace;

  /* Spacing & Shape */
  --radius:     16px;          /* card border radius */
  --radius-sm:  10px;
  --max-width:  680px;         /* max content width (mobile-like even on desktop) */
}

/* ─────────────────────────────────────────
   RESET & BASE
   ───────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background:  var(--bg);
  color:       var(--text);
  font-family: var(--font-main);
  font-size:   16px;
  line-height: 1.5;
  min-height:  100vh;
}

a { color: inherit; text-decoration: none; }

/* ─────────────────────────────────────────
   NAVBAR
   ───────────────────────────────────────── */
.navbar {
  position:   sticky;
  top:        0;
  z-index:    100;
  background: rgba(10,10,15,0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 0 16px;
  height: 56px;
}

.nav-inner {
  max-width:      var(--max-width);
  margin:         0 auto;
  height:         100%;
  display:        flex;
  align-items:    center;
  justify-content: space-between;
}

.logo {
  font-size:   18px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color:           var(--text);
  text-decoration: none;
  cursor:          pointer;
  transition:      opacity 0.2s;
}
.logo:hover { opacity: 0.8; }

.nav-tag {
  font-size:   11px;
  font-family: var(--font-mono);
  color:       var(--muted);
  background:  var(--surface);
  border:      1px solid var(--border);
  padding:     4px 10px;
  border-radius: 20px;
  transition:  all 0.3s;
}
.nav-tag.live-pulse {
  color:        var(--green);
  border-color: var(--green);
}

.price-updated {
  font-size:   11px;
  color:       var(--muted);
  font-family: var(--font-mono);
  margin-top:  8px;
}

.back-btn {
  font-size:   14px;
  color:       var(--muted);
  transition:  color 0.2s;
}
.back-btn:hover { color: var(--text); }

/* ─────────────────────────────────────────
   HERO (homepage only)
   ───────────────────────────────────────── */
.hero {
  max-width:   var(--max-width);
  margin:      0 auto;
  padding:     48px 16px 32px;
}

.hero h1 {
  font-size:      32px;
  font-weight:    800;
  letter-spacing: -1px;
  line-height:    1.15;
  margin-bottom:  12px;
}

/* Desktop: bigger hero text */
@media (min-width: 640px) {
  .hero h1 { font-size: 44px; }
}

.accent { color: var(--accent); }

.hero p {
  font-size: 15px;
  color:     var(--muted);
  max-width: 360px;
}

/* ─────────────────────────────────────────
   SECTION LABEL
   ───────────────────────────────────────── */
.section-label {
  font-size:      12px;
  font-family:    var(--font-mono);
  color:          var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  padding:        0 16px;
  margin-bottom:  12px;
}

/* ─────────────────────────────────────────
   STOCKS GRID (homepage)
   ───────────────────────────────────────── */
.stocks-section {
  max-width: var(--max-width);
  margin:    0 auto;
  padding:   0 0 40px;
}

.stocks-grid {
  display:               grid;
  grid-template-columns: 1fr 1fr;  /* 2 columns on mobile */
  gap:                   10px;
  padding:               0 16px;
}

/* Desktop: 4 columns */
@media (min-width: 640px) {
  .stocks-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.stock-card {
  background:  var(--card);
  border:      1px solid var(--border);
  border-radius: var(--radius-sm);
  padding:     16px 14px;
  display:     flex;
  flex-direction: column;
  gap:         4px;
  transition:  border-color 0.2s, transform 0.15s;
  cursor:      pointer;
}

.stock-card:hover {
  border-color: var(--accent);
  transform:    translateY(-2px);
}

.card-symbol {
  font-family: var(--font-mono);
  font-size:   13px;
  font-weight: 600;
  color:       var(--accent);
}

.card-name {
  font-size:   14px;
  font-weight: 500;
  color:       var(--text);
}

.card-arrow {
  font-size:   16px;
  color:       var(--muted);
  margin-top:  4px;
}

/* ─────────────────────────────────────────
   PAGE CONTENT (stock detail page)
   ───────────────────────────────────────── */
.page-content {
  max-width: var(--max-width);
  margin:    0 auto;
  padding:   24px 16px 60px;
  display:   flex;
  flex-direction: column;
  gap:       24px;
}

/* ─────────────────────────────────────────
   STOCK HEADER
   ───────────────────────────────────────── */
.stock-header {
  display:     flex;
  align-items: flex-start;
  gap:         14px;
}

.company-logo {
  width:         52px;
  height:        52px;
  border-radius: 12px;
  background:    var(--surface);
  flex-shrink:   0;
}

.stock-symbol-badge {
  font-family:    var(--font-mono);
  font-size:      11px;
  color:          var(--accent);
  letter-spacing: 0.5px;
  margin-bottom:  4px;
}

.stock-name {
  font-size:      24px;
  font-weight:    800;
  letter-spacing: -0.5px;
  margin-bottom:  4px;
}

.stock-sector {
  font-size: 13px;
  color:     var(--muted);
}

/* ─────────────────────────────────────────
   LIVE PRICE CARD
   ───────────────────────────────────────── */
.price-card {
  background:    var(--card);
  border:        1px solid var(--border);
  border-radius: var(--radius);
  padding:       20px;
  border-left:   3px solid var(--border);
}

/* Green left border when price is up */
.price-card.price-up  { border-left-color: var(--green); }
/* Red left border when price is down */
.price-card.price-down { border-left-color: var(--red); }

.price-main {
  font-family:    var(--font-mono);
  font-size:      36px;
  font-weight:    700;
  letter-spacing: -1px;
  margin-bottom:  6px;
}

.price-change {
  font-family:  var(--font-mono);
  font-size:    14px;
  margin-bottom: 12px;
}
.price-up  .price-change { color: var(--green); }
.price-down .price-change { color: var(--red); }

.price-details {
  display:   flex;
  gap:       16px;
  font-size: 12px;
  color:     var(--muted);
  font-family: var(--font-mono);
}

/* ─────────────────────────────────────────
   METRICS GRID
   ───────────────────────────────────────── */
.metrics-grid {
  display:               grid;
  grid-template-columns: 1fr 1fr;   /* 2 cols mobile */
  gap:                   10px;
}

/* Desktop: 3 columns */
@media (min-width: 480px) {
  .metrics-grid { grid-template-columns: repeat(3, 1fr); }
}

.metric-card {
  background:    var(--card);
  border:        1px solid var(--border);
  border-radius: var(--radius-sm);
  padding:       14px;
}

.metric-label {
  font-size:      10px;
  font-family:    var(--font-mono);
  color:          var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom:  6px;
}

.metric-value {
  font-size:      16px;
  font-weight:    700;
  font-family:    var(--font-mono);
  margin-bottom:  3px;
  word-break:     break-all;
}

.ceo-name {
  font-size:   13px;    /* smaller for long names */
  font-family: var(--font-main);
}

.metric-note {
  font-size: 11px;
  color:     var(--muted);
}

/* ─────────────────────────────────────────
   ABOUT CARD
   ───────────────────────────────────────── */
.about-card {
  background:    var(--card);
  border:        1px solid var(--border);
  border-radius: var(--radius);
  padding:       18px;
}

.about-card p {
  font-size:     14px;
  color:         var(--label);
  line-height:   1.7;
  margin-bottom: 14px;
}

.website-link {
  font-size:      13px;
  color:          var(--accent2);
  font-family:    var(--font-mono);
  transition:     opacity 0.2s;
}
.website-link:hover { opacity: 0.7; }

/* ─────────────────────────────────────────
   AI EXPLAIN CARD
   ───────────────────────────────────────── */
.ai-card {
  background:    var(--card);
  border:        1px solid var(--border);
  border-radius: var(--radius);
  padding:       18px;
}

.ai-hint {
  font-size:     13px;
  color:         var(--muted);
  margin-bottom: 14px;
  line-height:   1.6;
}

/* The main AI button */
.ai-btn {
  width:         100%;
  padding:       14px;
  background:    linear-gradient(135deg, var(--accent), #9f5af7);
  color:         white;
  border:        none;
  border-radius: var(--radius-sm);
  font-size:     15px;
  font-weight:   600;
  font-family:   var(--font-main);
  cursor:        pointer;
  transition:    opacity 0.2s, transform 0.15s;
}

.ai-btn:hover   { opacity: 0.9; transform: translateY(-1px); }
.ai-btn:active  { transform: translateY(0); }
.ai-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* AI response box */
.ai-response {
  margin-top:    14px;
  padding:       14px;
  background:    rgba(124,58,237,0.07);
  border:        1px solid rgba(124,58,237,0.25);
  border-radius: var(--radius-sm);
}

.ai-label {
  font-size:      10px;
  font-family:    var(--font-mono);
  color:          var(--accent);
  letter-spacing: 1px;
  margin-bottom:  8px;
  opacity:        0.8;
}

.ai-text {
  font-size:   14px;
  line-height: 1.75;
  color:       var(--label);
}

/* ─────────────────────────────────────────
   DISCLAIMER
   ───────────────────────────────────────── */
.disclaimer {
  font-size:     12px;
  color:         var(--muted);
  line-height:   1.6;
  padding:       14px 16px;
  background:    var(--surface);
  border:        1px solid var(--border);
  border-radius: var(--radius-sm);
}

/* ─────────────────────────────────────────
   FOOTER
   ───────────────────────────────────────── */
.footer {
  text-align:    center;
  padding:       24px 16px;
  font-size:     12px;
  color:         var(--muted);
  border-top:    1px solid var(--border);
  margin-top:    40px;
}

/* ─────────────────────────────────────────
   LOADING ANIMATION (for AI button)
   ───────────────────────────────────────── */
@keyframes pulse-dot {
  0%, 100% { opacity: 0.3; }
  50%       { opacity: 1;   }
}

.loading-dot {
  display:           inline-block;
  animation:         pulse-dot 1.2s infinite;
}
.loading-dot:nth-child(2) { animation-delay: 0.2s; }
.loading-dot:nth-child(3) { animation-delay: 0.4s; }


/* ─────────────────────────────────────────
   SEARCH BAR
   ───────────────────────────────────────── */
.search-section {
  max-width: var(--max-width);
  margin:    0 auto 8px;
  padding:   0 16px;
}

.search-form { width: 100%; }

.search-box {
  display:       flex;
  align-items:   center;
  background:    var(--card);
  border:        1px solid var(--border);
  border-radius: var(--radius);
  padding:       4px 4px 4px 14px;
  gap:           8px;
  transition:    border-color 0.2s;
}
.search-box:focus-within { border-color: var(--accent); }

.search-icon { font-size: 16px; flex-shrink: 0; }

.search-input {
  flex:        1;
  background:  transparent;
  border:      none;
  outline:     none;
  color:       var(--text);
  font-size:   15px;
  font-family: var(--font-mono);
  padding:     10px 0;
  letter-spacing: 0.5px;
}
.search-input::placeholder { color: var(--muted); font-family: var(--font-main); letter-spacing: 0; }

.search-btn {
  background:    var(--accent);
  color:         white;
  border:        none;
  border-radius: 10px;
  padding:       10px 18px;
  font-size:     14px;
  font-weight:   600;
  cursor:        pointer;
  transition:    opacity 0.2s;
  white-space:   nowrap;
}
.search-btn:hover { opacity: 0.85; }

.search-hint {
  font-size:  12px;
  color:      var(--muted);
  margin-top: 8px;
  padding-left: 4px;
}

/* ─────────────────────────────────────────
   CANDLESTICK CHART
   ───────────────────────────────────────── */
.chart-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Timeframe buttons row */
.timeframe-btns {
  display:   flex;
  gap:       6px;
  flex-wrap: wrap;
}

.tf-btn {
  background:    var(--surface);
  border:        1px solid var(--border);
  color:         var(--muted);
  border-radius: 8px;
  padding:       6px 14px;
  font-size:     13px;
  font-family:   var(--font-mono);
  font-weight:   500;
  cursor:        pointer;
  transition:    all 0.15s;
}
.tf-btn:hover        { border-color: var(--accent); color: var(--text); }
.tf-btn.active       { background: var(--accent); border-color: var(--accent); color: white; }

/* The chart box itself */
.chart-container {
  width:         100%;
  height:        320px;
  border-radius: var(--radius);
  overflow:      hidden;
  border:        1px solid var(--border);
}

.chart-wrapper {
  position: relative;
}

.chart-fullscreen-btn {
  position:      absolute;
  bottom:        10px;
  right:         10px;
  width:         32px;
  height:        32px;
  display:       flex;
  align-items:   center;
  justify-content: center;
  background:    rgba(22,22,31,0.85);
  border:        1px solid var(--border);
  border-radius: 6px;
  color:         var(--muted);
  font-size:     16px;
  line-height:   1;
  cursor:        pointer;
  transition:    all 0.15s;
  z-index:       5;
}
.chart-fullscreen-btn:hover { border-color: var(--accent); color: var(--accent); }

/* Fullscreen mode: fill the whole screen, give the chart real height */
.chart-wrapper:fullscreen {
  background:    var(--bg);
  padding:       16px;
  display:       flex;
  align-items:   center;
  justify-content: center;
}
.chart-wrapper:fullscreen .chart-container {
  width:  100%;
  height: 100%;
}
.chart-wrapper:-webkit-full-screen {
  background: var(--bg);
  padding:    16px;
}
.chart-wrapper:-webkit-full-screen .chart-container {
  width:  100%;
  height: 100%;
}

.chart-status {
  font-size:  12px;
  color:      var(--muted);
  text-align: center;
  min-height: 16px;
}
/* ─────────────────────────────────────────
   SEARCH SUGGESTIONS DROPDOWN
   ───────────────────────────────────────── */
.suggestions-box {
  display:       none;
  position:      absolute;
  top:           100%;
  left:          0;
  right:         0;
  background:    var(--card);
  border:        1px solid var(--accent);
  border-top:    none;
  border-radius: 0 0 var(--radius) var(--radius);
  z-index:       100;
  overflow:      hidden;
}

.suggest-item {
  display:     flex;
  align-items: center;
  gap:         12px;
  padding:     12px 16px;
  cursor:      pointer;
  transition:  background 0.15s;
  border-bottom: 1px solid var(--border);
}
.suggest-item:last-child { border-bottom: none; }
.suggest-item:hover { background: rgba(124,58,237,0.1); }

.suggest-symbol {
  font-family:  var(--font-mono);
  font-size:    13px;
  font-weight:  600;
  color:        var(--accent);
  min-width:    60px;
}

.suggest-name {
  font-size: 13px;
  color:     var(--label);
}

/* Make search-form position relative for dropdown */
.search-form { position: relative; }


/* ─────────────────────────────────────────
   TABS SYSTEM
   ───────────────────────────────────────── */
.tabs-container { display: flex; flex-direction: column; gap: 0; }

.tabs-nav {
  display:        flex;
  gap:            4px;
  overflow-x:     auto;
  padding-bottom: 0;
  border-bottom:  1px solid var(--border);
  margin-bottom:  20px;
  scrollbar-width: none;
}
.tabs-nav::-webkit-scrollbar { display: none; }

.tab-btn {
  background:    transparent;
  border:        none;
  border-bottom: 2px solid transparent;
  color:         var(--muted);
  font-family:   var(--font-main);
  font-size:     13px;
  font-weight:   500;
  padding:       10px 16px;
  cursor:        pointer;
  white-space:   nowrap;
  transition:    all 0.2s;
  margin-bottom: -1px;
}
.tab-btn:hover  { color: var(--text); }
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }

.tab-content         { display: none; }
.tab-content.active  { display: block; }

/* ─────────────────────────────────────────
   NEWS TAB
   ───────────────────────────────────────── */
.news-card {
  display:        flex;
  align-items:    flex-start;
  gap:            14px;
  padding:        16px;
  background:     var(--card);
  border:         1px solid var(--border);
  border-radius:  var(--radius-sm);
  margin-bottom:  10px;
  text-decoration: none;
  color:          var(--text);
  transition:     border-color 0.2s;
}
.news-card:hover { border-color: var(--accent); }

.news-img {
  width:         80px;
  height:        60px;
  object-fit:    cover;
  border-radius: 8px;
  flex-shrink:   0;
  background:    var(--border);
}

.news-body     { flex: 1; }
.news-source   { font-size: 11px; color: var(--muted); margin-bottom: 5px; font-family: var(--font-mono); }
.news-headline { font-size: 14px; font-weight: 600; line-height: 1.4; margin-bottom: 5px; }
.news-summary  { font-size: 12px; color: var(--label); line-height: 1.5; }
.news-arrow    { color: var(--muted); font-size: 16px; flex-shrink: 0; }

/* ─────────────────────────────────────────
   DISCUSSION / AUTH
   ───────────────────────────────────────── */
.auth-section {
  background:    var(--card);
  border:        1px solid var(--border);
  border-radius: var(--radius);
  padding:       20px;
  margin-bottom: 20px;
}

.auth-toggle {
  display:       flex;
  gap:           8px;
  margin-bottom: 16px;
}

.auth-toggle-btn {
  flex:          1;
  padding:       10px;
  background:    var(--surface);
  border:        1px solid var(--border);
  border-radius: var(--radius-sm);
  color:         var(--muted);
  font-family:   var(--font-main);
  font-size:     14px;
  font-weight:   500;
  cursor:        pointer;
  transition:    all 0.2s;
}
.auth-toggle-btn.active {
  background:    var(--accent);
  border-color:  var(--accent);
  color:         white;
}

.auth-form     { display: flex; flex-direction: column; gap: 10px; }

.auth-input {
  width:         100%;
  background:    var(--surface);
  border:        1px solid var(--border);
  border-radius: var(--radius-sm);
  color:         var(--text);
  font-family:   var(--font-main);
  font-size:     14px;
  padding:       12px 14px;
  outline:       none;
  transition:    border-color 0.2s;
}
.auth-input:focus     { border-color: var(--accent); }
.auth-input::placeholder { color: var(--muted); }

.auth-submit-btn {
  width:         100%;
  padding:       12px;
  background:    linear-gradient(135deg, var(--accent), #9f5af7);
  color:         white;
  border:        none;
  border-radius: var(--radius-sm);
  font-size:     14px;
  font-weight:   600;
  font-family:   var(--font-main);
  cursor:        pointer;
  transition:    opacity 0.2s;
}
.auth-submit-btn:hover { opacity: 0.9; }

.auth-error {
  font-size:  13px;
  color:      var(--red);
  min-height: 16px;
}

.auth-success {
  font-size:  13px;
  color:      var(--green);
  min-height: 16px;
}

/* Account settings page */
.account-card {
  background:    var(--surface);
  border:        1px solid var(--border);
  border-radius: var(--radius);
  padding:       18px;
  margin-bottom: 8px;
}
.account-card .auth-input { margin-bottom: 10px; }
.account-card .auth-input:last-of-type { margin-bottom: 14px; }

.account-row {
  display:         flex;
  justify-content: space-between;
  align-items:     center;
  padding:         10px 0;
  border-bottom:   1px solid var(--border);
  font-size:       14px;
}
.account-row:last-child { border-bottom: none; }
.account-row span   { color: var(--muted); }
.account-row strong { color: var(--text); font-weight: 600; }

.danger-zone {
  border-color: rgba(239,68,68,0.35);
  background:   rgba(239,68,68,0.05);
}
.danger-btn {
  width:         100%;
  background:    transparent;
  border:        1px solid var(--red);
  color:         var(--red);
  border-radius: var(--radius-sm);
  padding:       11px;
  font-weight:   600;
  font-size:     14px;
  cursor:        pointer;
  transition:    all 0.2s;
}
.danger-btn:hover { background: var(--red); color: white; }

/* User bar (logged in) */
.user-bar {
  display:         flex;
  justify-content: space-between;
  align-items:     center;
  margin-bottom:   12px;
  font-size:       13px;
  color:           var(--label);
}

.user-bar-actions {
  display:     flex;
  align-items: center;
  gap:         8px;
}

.account-link {
  background:      transparent;
  border:          1px solid var(--border);
  color:           var(--muted);
  border-radius:   6px;
  padding:         4px 10px;
  font-size:       12px;
  cursor:          pointer;
  transition:      all 0.2s;
  text-decoration: none;
}
.account-link:hover { border-color: var(--accent); color: var(--accent); }

.logout-btn {
  background:    transparent;
  border:        1px solid var(--border);
  color:         var(--muted);
  border-radius: 6px;
  padding:       4px 10px;
  font-size:     12px;
  cursor:        pointer;
  transition:    all 0.2s;
}
.logout-btn:hover { border-color: var(--red); color: var(--red); }

/* Comment input box */
.comment-box {
  background:    var(--card);
  border:        1px solid var(--border);
  border-radius: var(--radius);
  overflow:      hidden;
  margin-bottom: 20px;
}

.comment-input {
  width:       100%;
  background:  transparent;
  border:      none;
  outline:     none;
  color:       var(--text);
  font-family: var(--font-main);
  font-size:   14px;
  padding:     14px 16px;
  resize:      none;
  min-height:  100px;
  line-height: 1.6;
}
.comment-input::placeholder { color: var(--muted); }

.comment-box-footer {
  display:         flex;
  justify-content: space-between;
  align-items:     center;
  padding:         10px 16px;
  border-top:      1px solid var(--border);
}

.char-count { font-size: 11px; color: var(--muted); font-family: var(--font-mono); }

.post-btn {
  background:    var(--accent);
  color:         white;
  border:        none;
  border-radius: 8px;
  padding:       8px 18px;
  font-size:     13px;
  font-weight:   600;
  font-family:   var(--font-main);
  cursor:        pointer;
  transition:    opacity 0.2s;
}
.post-btn:hover    { opacity: 0.85; }
.post-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Comment cards */
.comment-card {
  background:    var(--card);
  border:        1px solid var(--border);
  border-radius: var(--radius-sm);
  padding:       14px 16px;
  margin-bottom: 10px;
  transition:    border-color 0.2s;
}
.comment-card:hover { border-color: rgba(124,58,237,0.3); }

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

.comment-username { font-size: 13px; font-weight: 600; color: var(--accent); }
.comment-time     { font-size: 11px; color: var(--muted); font-family: var(--font-mono); }
.comment-body     { font-size: 14px; line-height: 1.65; color: var(--text); margin-bottom: 10px; }

.comment-footer { display: flex; gap: 10px; }

.upvote-btn {
  background:    transparent;
  border:        1px solid var(--border);
  color:         var(--muted);
  border-radius: 6px;
  padding:       4px 10px;
  font-size:     12px;
  cursor:        pointer;
  transition:    all 0.2s;
  font-family:   var(--font-mono);
}
.upvote-btn:hover { border-color: var(--accent); color: var(--accent); }
.upvote-btn.upvoted {
  border-color: var(--accent);
  color:        var(--accent);
  background:   rgba(124,58,237,0.12);
}

.reply-btn {
  background:    transparent;
  border:        1px solid var(--border);
  color:         var(--muted);
  border-radius: 6px;
  padding:       4px 10px;
  font-size:     12px;
  cursor:        pointer;
  transition:    all 0.2s;
  font-family:   var(--font-mono);
}
.reply-btn:hover { border-color: var(--accent); color: var(--accent); }

.edit-btn, .delete-btn {
  background:    transparent;
  border:        1px solid var(--border);
  color:         var(--muted);
  border-radius: 6px;
  padding:       4px 10px;
  font-size:     12px;
  cursor:        pointer;
  transition:    all 0.2s;
  font-family:   var(--font-mono);
}
.edit-btn:hover   { border-color: var(--accent); color: var(--accent); }
.delete-btn:hover { border-color: var(--red);    color: var(--red); }

.edited-tag {
  font-size: 11px;
  color:     var(--muted);
  opacity:   0.7;
}

.edit-textarea {
  width:         100%;
  min-height:    60px;
  background:    var(--bg);
  border:        1px solid var(--accent);
  border-radius: var(--radius-sm);
  color:         var(--text);
  font-family:   var(--font-main);
  font-size:     14px;
  padding:       10px 12px;
  resize:        vertical;
  margin-bottom: 8px;
}
.edit-actions {
  display:         flex;
  justify-content: flex-end;
  gap:             8px;
}

.reply-box  { margin-top: 12px; }
.reply-input {
  width:         100%;
  min-height:    60px;
  background:    var(--bg);
  border:        1px solid var(--border);
  border-radius: var(--radius-sm);
  color:         var(--text);
  font-family:   var(--font-main);
  font-size:     13px;
  padding:       10px 12px;
  resize:        vertical;
}
.reply-box-footer {
  display:         flex;
  justify-content: flex-end;
  gap:             8px;
  margin-top:      8px;
}
.reply-cancel-btn {
  background:    transparent;
  border:        1px solid var(--border);
  color:         var(--muted);
  border-radius: 6px;
  padding:       6px 14px;
  font-size:     12px;
  cursor:        pointer;
}
.reply-cancel-btn:hover { color: var(--text); }
.reply-submit-btn {
  background:    var(--accent);
  border:        none;
  color:         white;
  border-radius: 6px;
  padding:       6px 14px;
  font-size:     12px;
  font-weight:   600;
  cursor:        pointer;
}
.reply-submit-btn:hover { opacity: 0.85; }

.replies-list {
  margin-top:  12px;
  padding-left: 18px;
  border-left: 2px solid var(--border);
}
.reply-card {
  margin-bottom: 8px;
  margin-top:    8px;
  background:    rgba(255,255,255,0.02);
}
.reply-card:last-child { margin-bottom: 0; }

/* Loading / empty states */
.loading-msg { text-align: center; color: var(--muted); padding: 40px 0; font-size: 14px; }
.empty-msg   { text-align: center; color: var(--muted); padding: 40px 0; font-size: 14px; line-height: 1.6; }


/* ─────────────────────────────────────────
   SCREENER PAGE
   ───────────────────────────────────────── */
.screener-filters {
  background:    var(--card);
  border:        1px solid var(--border);
  border-radius: var(--radius);
  padding:       20px;
  display:       flex;
  flex-direction: column;
  gap:           16px;
}

.filter-row {
  display:               grid;
  grid-template-columns: 1fr 1fr;
  gap:                   14px;
}
@media (max-width: 480px) {
  .filter-row { grid-template-columns: 1fr; }
}

.filter-group { display: flex; flex-direction: column; gap: 6px; }

.filter-label {
  font-size:      11px;
  font-family:    var(--font-mono);
  color:          var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.filter-inputs { display: flex; align-items: center; gap: 8px; }
.filter-dash   { color: var(--muted); }

.filter-input {
  flex:          1;
  width:         100%;
  background:    var(--surface);
  border:        1px solid var(--border);
  border-radius: 8px;
  color:         var(--text);
  font-family:   var(--font-main);
  font-size:     14px;
  padding:       10px 12px;
  outline:       none;
}
.filter-input:focus { border-color: var(--accent); }

/* Results table */
.screener-row, .screener-header-row {
  display:               grid;
  grid-template-columns: 60px 1fr 65px 50px 55px 60px 60px;
  align-items:           center;
  gap:                   6px;
  padding:               12px 10px;
  font-size:             11px;
}

.screener-row {
  background:            var(--card);
  border:                1px solid var(--border);
  border-radius:         var(--radius-sm);
  margin-bottom:         8px;
  text-decoration:       none;
  color:                 var(--text);
  transition:            border-color 0.2s;
}
.screener-row:hover { border-color: var(--accent); }

.screener-header-row {
  color:          var(--muted);
  font-family:    var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding:        4px 10px 10px;
  font-size:      10px;
}
.screener-header-row > div:not(:first-child):not(:nth-child(2)) { text-align: right; }

.screener-symbol {
  font-family: var(--font-mono);
  font-weight: 700;
  color:       var(--accent);
  font-size:   13px;
}
.screener-name {
  overflow:     hidden;
  text-overflow: ellipsis;
  white-space:  nowrap;
  color:        var(--label);
}
.screener-metric {
  font-family: var(--font-mono);
  text-align:  right;
}
.screener-metric.g { color: var(--green); }
.screener-metric.r { color: var(--red); }


/* ─────────────────────────────────────────
   USERNAME AVAILABILITY HINT
   ───────────────────────────────────────── */
.username-hint {
  font-size:  12px;
  min-height: 16px;
  margin-top: -6px;
  padding-left: 2px;
  color: var(--muted);
}
.username-hint.ok  { color: var(--green); }
.username-hint.bad { color: var(--red); }

.footer-link {
  color: var(--accent);
  text-decoration: none;
}
.footer-link:hover { text-decoration: underline; }
