:root {
  --bg-primary: #0d1117;
  --bg-secondary: #161b22;
  --bg-card: #1c2128;
  --bg-card-hover: #21262d;
  --text-primary: #f0f6fc;
  --text-secondary: #8b949e;
  --text-muted: #6e7681;
  --accent-blue: #58a6ff;
  --accent-green: #3fb950;
  --accent-red: #f85149;
  --accent-orange: #d29922;
  --accent-yellow: #e3b341;
  --border-color: #30363d;
  --border-radius: 8px;
  --border-radius-lg: 12px;
  --transition: all 0.2s ease;
  --font-mono: 'Courier New', Courier, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--accent-blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== NAVBAR ===== */
.navbar {
  background: rgba(13, 17, 23, 0.96);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 10px 28px rgba(1, 4, 9, 0.18);
  backdrop-filter: blur(10px) saturate(130%);
}

.nav-container {
  max-width: none;
  width: 100%;
  margin: 0 auto;
  padding: 0 clamp(12px, 2vw, 28px);
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.nav-brand {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 10px;
  min-width: max-content;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
}

.nav-brand > span:first-child {
  position: relative;
  display: inline-block;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  overflow: hidden;
  border: 1px solid rgba(88, 166, 255, 0.42);
  border-radius: 6px;
  background:
    linear-gradient(135deg, rgba(88, 166, 255, 0.26), rgba(63, 185, 80, 0.1)),
    var(--bg-card);
  box-shadow: inset 0 0 0 1px rgba(240, 246, 252, 0.04);
  color: transparent;
  font-size: 0;
}

.nav-brand > span:first-child::before {
  content: "";
  position: absolute;
  left: 5px;
  right: 5px;
  top: 11px;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-green), var(--accent-blue));
  border-radius: 999px;
  transform: rotate(-32deg);
  transform-origin: left center;
}

.nav-brand > span:first-child::after {
  content: "";
  position: absolute;
  right: 5px;
  top: 6px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--text-primary);
  box-shadow: -11px 10px 0 rgba(240, 246, 252, 0.72);
}

.brand-name {
  color: var(--accent-blue);
  letter-spacing: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 1 1 auto;
  min-width: 0;
  list-style: none;
  gap: 6px;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}

.nav-links::-webkit-scrollbar { display: none; }

.nav-links li {
  flex: 0 0 auto;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 650;
  line-height: 1;
  white-space: nowrap;
  transition: var(--transition);
  text-decoration: none;
}

.nav-link:hover {
  color: var(--text-primary);
  border-color: rgba(88, 166, 255, 0.26);
  background: rgba(88, 166, 255, 0.08);
  text-decoration: none;
}

.nav-link.active {
  color: var(--text-primary);
  border-color: rgba(88, 166, 255, 0.34);
  background:
    linear-gradient(180deg, rgba(88, 166, 255, 0.18), rgba(88, 166, 255, 0.08)),
    var(--bg-card-hover);
  box-shadow: inset 0 -2px 0 var(--accent-blue);
  text-decoration: none;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background-color: var(--text-primary);
  border-radius: 2px;
}

/* ===== TICKER ===== */
.ticker-wrapper {
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
}

/* ===== MAIN ===== */
.main-content {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 28px 20px;
  flex: 1;
}

/* ===== HERO ===== */
.hero { margin-bottom: 24px; }
.hero-title { font-size: 26px; font-weight: 700; margin-bottom: 6px; }
.hero-subtitle { color: var(--text-secondary); font-size: 14px; }

.section-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 16px;
  margin-top: 8px;
}

/* ===== DAILY HUB ===== */
.daily-hub {
  margin-bottom: 30px;
}

.daily-hub-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 14px;
}

.section-kicker,
.daily-eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 9px;
  border: 1px solid rgba(88, 166, 255, 0.28);
  border-radius: 999px;
  background: rgba(88, 166, 255, 0.1);
  color: var(--accent-blue);
  font-size: 11px;
  font-weight: 750;
  line-height: 1;
  text-transform: uppercase;
}

.daily-title {
  margin-top: 8px;
  font-size: 30px;
  line-height: 1.08;
  font-weight: 800;
}

.daily-hub-heading p {
  max-width: 470px;
  color: var(--text-secondary);
  font-size: 14px;
}

.daily-hub-mount {
  display: grid;
  gap: 14px;
}

.daily-hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  min-height: 150px;
  padding: 22px;
  border: 1px solid rgba(88, 166, 255, 0.24);
  border-radius: 8px;
  background:
    linear-gradient(120deg, rgba(88, 166, 255, 0.12), rgba(63, 185, 80, 0.04) 44%, rgba(210, 153, 34, 0.09)),
    var(--bg-card);
  box-shadow: 0 18px 38px rgba(1, 4, 9, 0.22);
}

.daily-hero-panel h2 {
  margin: 10px 0 6px;
  font-size: 28px;
  line-height: 1.1;
  font-weight: 850;
}

.daily-hero-panel p {
  max-width: 620px;
  color: var(--text-secondary);
  font-size: 14px;
}

.daily-note {
  display: grid;
  gap: 6px;
  min-width: 190px;
  padding: 14px;
  border: 1px solid rgba(240, 246, 252, 0.08);
  border-radius: 8px;
  background: rgba(13, 17, 23, 0.55);
}

.daily-note span {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.daily-note strong {
  color: var(--text-primary);
  font-size: 15px;
}

.daily-hub-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.daily-column {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: rgba(22, 27, 34, 0.72);
}

.daily-column-blue { border-top: 3px solid var(--accent-blue); }
.daily-column-amber { border-top: 3px solid var(--accent-orange); }
.daily-column-green { border-top: 3px solid var(--accent-green); }

.daily-column-header span {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 750;
  text-transform: uppercase;
}

.daily-column-header h3 {
  margin-top: 2px;
  font-size: 17px;
  line-height: 1.25;
}

.daily-card-list {
  display: grid;
  gap: 10px;
}

.daily-card {
  display: grid;
  gap: 8px;
  min-height: 142px;
  padding: 13px;
  border: 1px solid rgba(240, 246, 252, 0.07);
  border-radius: 8px;
  background: rgba(13, 17, 23, 0.54);
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.daily-card:hover {
  border-color: rgba(88, 166, 255, 0.32);
  background: rgba(28, 33, 40, 0.92);
  transform: translateY(-1px);
}

.daily-card-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.daily-chip {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 8px;
  border: 1px solid rgba(88, 166, 255, 0.28);
  border-radius: 999px;
  background: rgba(88, 166, 255, 0.09);
  color: var(--accent-blue);
  font-size: 11px;
  font-weight: 750;
  line-height: 1;
}

.daily-meta {
  color: var(--text-muted);
  font-size: 11px;
  white-space: nowrap;
}

.daily-card h4 {
  font-size: 15px;
  line-height: 1.28;
}

.daily-card p {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.55;
}

.daily-disclaimer {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.5;
}

/* ===== OVERVIEW GRID ===== */
.overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 16px;
  margin-bottom: 12px;
}

/* ===== PRICE CARD ===== */
.price-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 16px;
  transition: var(--transition);
}

.price-card:hover {
  background-color: var(--bg-card-hover);
  border-color: #444c56;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.card-type { margin-bottom: 6px; }
.card-name { font-size: 15px; font-weight: 600; margin-bottom: 2px; }
.card-symbol { font-size: 11px; color: var(--text-muted); font-family: var(--font-mono); margin-bottom: 10px; }
.card-price { font-size: 20px; font-weight: 700; font-family: var(--font-mono); margin-bottom: 4px; }
.card-change { font-size: 13px; font-weight: 600; font-family: var(--font-mono); }
.card-change.positive { color: var(--accent-green); }
.card-change.negative { color: var(--accent-red); }
.card-change.neutral { color: var(--text-secondary); }
.card-updated { font-size: 11px; color: var(--text-muted); margin-top: 8px; }
.card-error { color: var(--accent-red); font-size: 12px; margin-top: 6px; }

/* ===== SKELETON ===== */
.skeleton {
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-card-hover) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
}
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }

.skeleton-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 16px;
}

.skeleton-line { height: 11px; margin-bottom: 8px; }
.skeleton-line.w40 { width: 40%; }
.skeleton-line.w65 { width: 65%; }
.skeleton-line.price { height: 20px; width: 55%; margin-bottom: 6px; }

/* ===== ERROR ===== */
.error-banner {
  background-color: rgba(248, 81, 73, 0.1);
  border: 1px solid rgba(248, 81, 73, 0.3);
  border-radius: var(--border-radius);
  padding: 12px 16px;
  color: var(--accent-red);
  margin-bottom: 16px;
  font-size: 13px;
}

/* ===== LAST UPDATED ===== */
.last-updated { color: var(--text-muted); font-size: 12px; margin-bottom: 24px; }

/* ===== BADGE ===== */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
}
.badge-crypto { background-color: rgba(88, 166, 255, 0.15); color: var(--accent-blue); border: 1px solid rgba(88, 166, 255, 0.3); }
.badge-stock  { background-color: rgba(63, 185, 80, 0.15); color: var(--accent-green); border: 1px solid rgba(63, 185, 80, 0.3); }

/* ===== CRYPTO TABLE ===== */
.crypto-table-wrapper {
  overflow-x: auto;
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  margin-bottom: 16px;
}

.crypto-table {
  width: 100%;
  border-collapse: collapse;
  background-color: var(--bg-card);
}

.crypto-table th {
  background-color: var(--bg-secondary);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.crypto-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-color);
  font-size: 14px;
}

.crypto-table tr:last-child td { border-bottom: none; }
.crypto-table tr:hover td { background-color: var(--bg-card-hover); }
.crypto-table td.num { font-family: var(--font-mono); }
.crypto-table td.positive { color: var(--accent-green); font-family: var(--font-mono); font-weight: 600; }
.crypto-table td.negative { color: var(--accent-red); font-family: var(--font-mono); font-weight: 600; }

/* ===== CURRENCY SELECTOR ===== */
.currency-selector { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }

.currency-btn {
  padding: 6px 16px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.currency-btn.active,
.currency-btn:hover {
  background-color: var(--accent-blue);
  border-color: var(--accent-blue);
  color: #fff;
}

/* ===== SEARCH ===== */
.search-section { margin-bottom: 24px; }

.search-form {
  display: flex;
  gap: 10px;
  max-width: 480px;
}

.search-input {
  flex: 1;
  padding: 10px 14px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  color: var(--text-primary);
  font-size: 14px;
  transition: var(--transition);
  outline: none;
}

.search-input:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.1);
}

.search-input::placeholder { color: var(--text-muted); }

.search-btn {
  padding: 10px 20px;
  background-color: var(--accent-blue);
  color: #fff;
  border: none;
  border-radius: var(--border-radius);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.search-btn:hover { background-color: #79b8ff; }
.search-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ===== POPULAR TAGS ===== */
.popular-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

.tag {
  padding: 4px 12px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
}

.tag:hover { border-color: var(--accent-blue); color: var(--accent-blue); }

/* ===== STOCK QUOTE CARD ===== */
.stock-quote-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 24px;
  max-width: 480px;
  margin-bottom: 24px;
}

.stock-quote-symbol { font-size: 26px; font-weight: 800; font-family: var(--font-mono); }
.stock-quote-price { font-size: 34px; font-weight: 700; font-family: var(--font-mono); margin: 8px 0; }
.stock-quote-change { font-size: 15px; font-weight: 600; font-family: var(--font-mono); margin-bottom: 16px; }

.stock-quote-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  border-top: 1px solid var(--border-color);
  padding-top: 16px;
}

.detail-item label {
  display: block;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.detail-item span { font-size: 13px; font-family: var(--font-mono); }

/* ===== SPINNER ===== */
.spinner {
  width: 30px;
  height: 30px;
  border: 3px solid var(--border-color);
  border-top-color: var(--accent-blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 16px auto;
}

@keyframes spin { to { transform: rotate(360deg); } }
.loading-center { display: flex; justify-content: center; padding: 40px; }

/* ===== LEARN ===== */
.learn-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.learn-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 20px;
  cursor: pointer;
  transition: var(--transition);
}

.learn-card:hover {
  background-color: var(--bg-card-hover);
  border-color: var(--accent-blue);
  transform: translateY(-1px);
}

.learn-card-icon { font-size: 30px; margin-bottom: 10px; }
.learn-card-title { font-size: 15px; font-weight: 600; margin-bottom: 8px; }
.learn-card-desc { font-size: 13px; color: var(--text-secondary); line-height: 1.6; }

.learn-article {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 24px;
  max-width: 800px;
  display: none;
}

.learn-article.active { display: block; }
.learn-article h3 { font-size: 22px; font-weight: 700; margin-bottom: 16px; }
.learn-article p { color: var(--text-secondary); line-height: 1.8; margin-bottom: 12px; font-size: 14px; }
.learn-article ul { color: var(--text-secondary); margin-left: 20px; line-height: 2; margin-bottom: 12px; font-size: 14px; }

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent-blue);
  cursor: pointer;
  font-size: 13px;
  margin-bottom: 20px;
  background: none;
  border: none;
  padding: 0;
}

.back-btn:hover { text-decoration: underline; }

/* ===== DISCLAIMER PAGE ===== */
.disclaimer-page { max-width: 800px; }
.disclaimer-page h2 { font-size: 22px; font-weight: 700; margin-bottom: 20px; }
.disclaimer-page h3 { font-size: 15px; font-weight: 600; color: var(--accent-orange); margin: 20px 0 8px; }
.disclaimer-page p { color: var(--text-secondary); line-height: 1.8; margin-bottom: 12px; font-size: 14px; }

.disclaimer-box {
  background-color: rgba(210, 153, 34, 0.1);
  border: 1px solid rgba(210, 153, 34, 0.3);
  border-radius: var(--border-radius);
  padding: 16px;
  margin-bottom: 24px;
  color: var(--accent-yellow);
  font-size: 14px;
  line-height: 1.8;
}

/* ===== TRADINGVIEW SECTION ===== */
.tradingview-section { margin: 24px 0; }

/* ===== FOOTER ===== */
.footer {
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 20px;
  margin-top: auto;
}

.footer-container { max-width: 1200px; margin: 0 auto; text-align: center; }

.disclaimer-text { color: var(--text-muted); font-size: 12px; line-height: 1.6; margin-bottom: 8px; }
.disclaimer-text strong { color: var(--text-secondary); }
.footer-meta { color: var(--text-muted); font-size: 12px; }
.footer-meta a { color: var(--text-muted); }

/* ===== REFRESH BAR ===== */
.refresh-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  min-height: 26px;
}

.refresh-countdown { color: var(--text-muted); font-size: 12px; }

.refresh-btn, .retry-btn {
  padding: 4px 12px;
  background: none;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: 12px;
  cursor: pointer;
  transition: var(--transition);
}

.refresh-btn:hover, .retry-btn:hover {
  border-color: var(--accent-blue);
  color: var(--accent-blue);
}

.retry-btn { margin-left: 10px; vertical-align: middle; }

/* ===== FOREX BADGE ===== */
.badge-forex {
  background-color: rgba(210, 153, 34, 0.15);
  color: var(--accent-orange);
  border: 1px solid rgba(210, 153, 34, 0.3);
}

/* ===== COIN DETAIL CHART ===== */
.coin-chart-panel {
  margin-top: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
}

.coin-chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-secondary);
}

.coin-chart-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.close-chart-btn {
  padding: 4px 10px;
  background: none;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: 12px;
  cursor: pointer;
  transition: var(--transition);
}

.close-chart-btn:hover { border-color: var(--accent-red); color: var(--accent-red); }

.coin-chart-container { height: 520px; width: 100%; }
.coin-chart-container > div { height: 100%; }

/* ===== CLICKABLE TABLE ROWS ===== */
.clickable-row { cursor: pointer; transition: background-color 0.15s; }
.clickable-row:hover { background-color: rgba(88, 166, 255, 0.06) !important; }
.clickable-row.active-row { background-color: rgba(88, 166, 255, 0.12) !important; }

/* ===== SIGNAL SCANNER ===== */
.signal-mode-badge { text-align:center; margin-bottom:16px; }
.badge-signal-mode {
  display:inline-block; padding:6px 18px;
  background:rgba(56,139,253,0.1); border:1px solid rgba(56,139,253,0.3);
  border-radius:20px; color:var(--accent-blue); font-size:13px; font-weight:600;
}

.signal-grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(340px,1fr)); gap:20px; margin-bottom:24px; }

.signal-card {
  background:var(--bg-card); border:2px solid var(--border-color);
  border-radius:12px; padding:20px;
}
.signal-call { border-color:rgba(63,185,80,0.5);  background:rgba(63,185,80,0.05); }
.signal-put  { border-color:rgba(248,81,73,0.5);   background:rgba(248,81,73,0.05); }

.signal-card-header { display:flex; justify-content:space-between; align-items:flex-start; margin-bottom:14px; }
.signal-instrument  { font-size:20px; font-weight:700; color:var(--text-primary); }
.signal-price       { font-size:16px; font-weight:600; margin-top:2px; }
.signal-time        { font-size:11px; color:var(--text-muted); margin-top:2px; }

.signal-badge {
  padding:8px 16px; border-radius:8px; font-weight:700; font-size:14px;
  white-space:nowrap;
}
.signal-call .signal-badge { background:rgba(63,185,80,0.2);  color:#3fb950; border:1px solid rgba(63,185,80,0.4); }
.signal-put  .signal-badge { background:rgba(248,81,73,0.2);  color:#f85149; border:1px solid rgba(248,81,73,0.4); }
.signal-none .signal-badge { background:rgba(139,148,158,0.1); color:var(--text-muted); border:1px solid var(--border-color); }

.signal-reasons     { margin:12px 0; }
.signal-reasons ul  { margin:0; padding:0 0 0 16px; }
.signal-reasons li  { font-size:13px; color:var(--text-secondary); margin:4px 0; }

.signal-indicators  { display:grid; grid-template-columns:repeat(4,1fr); gap:8px; margin-top:14px; border-top:1px solid var(--border-color); padding-top:12px; }
.ind-item           { text-align:center; }
.ind-label          { font-size:10px; color:var(--text-muted); text-transform:uppercase; letter-spacing:.5px; display:block; margin-bottom:2px; }
.ind-item span:last-child { font-size:12px; font-family:monospace; color:var(--text-secondary); }

.signal-error { color:var(--accent-red); font-size:12px; margin-top:8px; }

.take-trade-btn {
  display:block; width:100%; margin-top:14px; padding:10px;
  border:none; border-radius:8px; font-size:13px; font-weight:600;
  cursor:pointer; transition:opacity .2s;
}
.call-btn { background:rgba(63,185,80,0.2);  color:#3fb950; border:1px solid rgba(63,185,80,0.4); }
.put-btn  { background:rgba(248,81,73,0.2);  color:#f85149; border:1px solid rgba(248,81,73,0.4); }
.take-trade-btn:hover { opacity:.8; }

.logic-card {
  background:var(--bg-card); border:1px solid var(--border-color);
  border-radius:12px; padding:24px; margin-top:24px;
}
.logic-card h3 { margin:0 0 16px; font-size:16px; }
.logic-grid    { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.logic-item    { padding:16px; border-radius:8px; }
.logic-item.bullish { background:rgba(63,185,80,0.07);  border:1px solid rgba(63,185,80,0.2); }
.logic-item.bearish { background:rgba(248,81,73,0.07);  border:1px solid rgba(248,81,73,0.2); }
.logic-title   { font-weight:600; font-size:13px; margin-bottom:10px; }
.logic-item ul { margin:0; padding:0 0 0 16px; }
.logic-item li { font-size:12px; color:var(--text-secondary); margin:5px 0; }
.logic-note    { font-size:12px; color:var(--text-muted); margin:16px 0 0; text-align:center; }

/* ===== AUTO TRADER ===== */
.auto-trader-card {
  background: var(--bg-card);
  border: 2px solid rgba(63,185,80,0.2);
  border-radius: 14px;
  padding: 20px 24px;
  margin-bottom: 24px;
}

.at-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.at-title-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.at-title     { font-size: 16px; font-weight: 700; color: var(--text-primary); }
.at-sub       { font-size: 12px; color: var(--text-muted); }

.at-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.at-info-item {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.at-how {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 12px;
}

.at-log { display: flex; flex-direction: column; gap: 6px; }

.at-log-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  padding: 6px 10px;
  background: var(--bg-secondary);
  border-radius: 6px;
  flex-wrap: wrap;
}

.at-log-time   { color: var(--text-muted); min-width: 80px; }
.at-log-dir    { font-weight: 700; min-width: 60px; }
.at-log-inst   { color: var(--text-primary); font-weight: 600; }
.at-log-price  { color: var(--accent-blue); }
.at-log-reason { color: var(--text-muted); font-style: italic; }

/* ===== MANUAL TRADE FORM ===== */
.manual-trade-card {
  background: var(--bg-card);
  border: 1px solid rgba(56,139,253,0.25);
  border-radius: 14px;
  padding: 20px 24px;
  margin-bottom: 24px;
}

.manual-trade-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 16px;
}

.manual-trade-title { font-size: 16px; font-weight: 700; color: var(--text-primary); }
.manual-trade-sub   { font-size: 12px; color: var(--text-muted); }

.manual-trade-form {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: flex-end;
}

.mt-field       { display: flex; flex-direction: column; gap: 6px; }
.mt-field-wide  { flex: 2; min-width: 200px; }
.mt-field-action{ justify-content: flex-end; padding-bottom: 0; }

.mt-label { font-size: 10px; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted); }

.mt-select,
.mt-input {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  padding: 9px 12px;
  font-size: 14px;
  outline: none;
  transition: border-color .2s;
}
.mt-select:focus, .mt-input:focus { border-color: var(--accent-blue); }

.mt-dir-group { display: flex; gap: 8px; }

.mt-dir-btn {
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  color: var(--text-muted);
  transition: all .2s;
}
.mt-dir-btn.mt-call.active { background: rgba(63,185,80,.15); border-color: var(--accent-green); color: var(--accent-green); }
.mt-dir-btn.mt-put.active  { background: rgba(248,81,73,.15);  border-color: var(--accent-red);   color: var(--accent-red); }

.mt-submit-btn {
  padding: 10px 24px;
  background: var(--accent-blue);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .2s;
  white-space: nowrap;
}
.mt-submit-btn:hover    { opacity: .85; }
.mt-submit-btn:disabled { opacity: .4; cursor: not-allowed; }

.mt-error {
  margin-top: 10px;
  padding: 8px 12px;
  background: rgba(248,81,73,.1);
  border: 1px solid rgba(248,81,73,.3);
  border-radius: 8px;
  color: var(--accent-red);
  font-size: 13px;
}

/* ===== VIRTUAL WALLET ===== */
.wallet-card {
  background: var(--bg-card);
  border: 2px solid rgba(56,139,253,0.3);
  border-radius: 14px;
  padding: 20px 24px;
  margin-bottom: 24px;
}

.wallet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.wallet-title { font-size: 16px; font-weight: 700; color: var(--text-primary); }

.wallet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}

.wallet-item {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 14px;
  text-align: center;
}

.wallet-item.positive { border-color: rgba(63,185,80,0.4); background: rgba(63,185,80,0.05); }
.wallet-item.negative { border-color: rgba(248,81,73,0.4);  background: rgba(248,81,73,0.05); }

.wallet-label    { font-size: 10px; text-transform: uppercase; letter-spacing:.5px; color: var(--text-muted); margin-bottom: 6px; }
.wallet-value    { font-size: 18px; font-weight: 700; color: var(--text-primary); }
.wallet-sublabel { font-size: 11px; color: var(--text-muted); margin-top: 3px; }

/* ===== PAPER TRADING ===== */
.risk-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(160px,1fr)); gap:12px; margin-bottom:24px; }
.risk-item {
  background:var(--bg-card); border:1px solid var(--border-color);
  border-radius:10px; padding:16px; text-align:center;
}
.risk-ok      { border-color:rgba(63,185,80,0.4); }
.risk-blocked { border-color:rgba(248,81,73,0.4); background:rgba(248,81,73,0.05); }
.risk-loss    { border-color:rgba(248,81,73,0.3); }
.ks-on        { border-color:rgba(248,81,73,0.6); background:rgba(248,81,73,0.08); }
.ks-off       { border-color:rgba(63,185,80,0.3); }

.risk-label  { font-size:11px; text-transform:uppercase; letter-spacing:.5px; color:var(--text-muted); margin-bottom:6px; }
.risk-value  { font-size:18px; font-weight:700; color:var(--text-primary); }
.risk-reason { font-size:11px; color:var(--text-muted); margin-top:4px; }

.kill-switch-btn {
  padding:4px 12px; border-radius:6px; font-size:11px; font-weight:600;
  cursor:pointer; border:none; transition:opacity .2s;
}
.ks-activate   { background:rgba(248,81,73,0.2); color:#f85149; }
.ks-deactivate { background:rgba(63,185,80,0.2); color:#3fb950; }

.stats-row { display:grid; grid-template-columns:repeat(auto-fit,minmax(130px,1fr)); gap:12px; margin-bottom:28px; }
.stat-card {
  background:var(--bg-card); border:1px solid var(--border-color);
  border-radius:10px; padding:16px; text-align:center;
}
.stat-card.positive { border-color:rgba(63,185,80,0.35); }
.stat-card.negative { border-color:rgba(248,81,73,0.35); }
.stat-value { font-size:22px; font-weight:700; color:var(--text-primary); }
.stat-label { font-size:11px; color:var(--text-muted); margin-top:4px; }

.section-header {
  display:flex; align-items:center; justify-content:space-between;
  margin-bottom:12px;
}
.section-header h2 { margin:0; font-size:18px; }
.empty-state { color:var(--text-muted); font-size:14px; padding:20px; }
.empty-state a { color:var(--accent-blue); }

/* ===== KITE CONNECT BANNER ===== */
.kite-connect-banner {
  text-align: center;
  padding: 48px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  margin-bottom: 24px;
}

.kite-banner-icon { font-size: 48px; margin-bottom: 12px; }
.kite-connect-banner h3 { margin: 0 0 8px; font-size: 20px; color: var(--text-primary); }
.kite-connect-banner p  { color: var(--text-muted); font-size: 14px; margin: 8px 0; }

.btn-kite-connect {
  display: inline-block;
  margin-top: 20px;
  padding: 12px 32px;
  background: #ff6600;
  color: #fff;
  text-decoration: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  transition: background 0.2s;
}

.btn-kite-connect:hover { background: #e55a00; }
.kite-note { font-size: 12px !important; color: var(--text-muted) !important; margin-top: 12px !important; }

/* ===== UTILITIES ===== */
.hidden { display: none !important; }

/* ===== RESPONSIVE ===== */
@media (max-width: 980px) {
  .daily-hub-heading,
  .daily-hero-panel {
    grid-template-columns: 1fr;
  }

  .daily-hub-heading {
    align-items: flex-start;
  }

  .daily-note {
    min-width: 0;
  }

  .daily-hub-grid {
    grid-template-columns: 1fr;
  }

  .daily-card {
    min-height: 0;
  }
}

@media (max-width: 768px) {
  .nav-toggle { display: flex; }

  .nav-links {
    display: none;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    flex-direction: column;
    padding: 8px;
    gap: 2px;
    z-index: 99;
    max-height: calc(100vh - 64px);
    overflow-y: auto;
    overflow-x: hidden;
  }

  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-link { width: 100%; justify-content: flex-start; }

  .overview-grid { grid-template-columns: repeat(auto-fill, minmax(155px, 1fr)); gap: 12px; }
  .daily-title { font-size: 25px; }
  .daily-hero-panel { padding: 18px; }
  .daily-hero-panel h2 { font-size: 24px; }
  .daily-hub-heading p { font-size: 13px; }
  .hero-title { font-size: 22px; }
  .search-form { flex-direction: column; }
  .stock-quote-price { font-size: 28px; }
  .learn-grid { grid-template-columns: 1fr; }
}

/* ===== PAPER TRADING â€” shared by NIFTY + Crypto pages ===== */

/* Wallet badge + reset button */
.wallet-badge {
  padding: 2px 10px; border-radius: 12px; font-size: 11px; font-weight: 600;
  background: rgba(88,166,255,0.12); color: var(--accent-blue);
  border: 1px solid rgba(88,166,255,0.25);
}
.wallet-reset-btn {
  padding: 4px 12px; border-radius: 6px; font-size: 12px; font-weight: 600;
  background: rgba(248,81,73,0.1); color: var(--accent-red);
  border: 1px solid rgba(248,81,73,0.25); cursor: pointer; transition: opacity .2s;
}
.wallet-reset-btn:hover { opacity: .75; }

/* Auto Trader toggle button */
.at-toggle-btn {
  padding: 6px 16px; border-radius: 8px; font-size: 13px; font-weight: 600;
  background: rgba(63,185,80,0.15); color: var(--accent-green);
  border: 1px solid rgba(63,185,80,0.35); cursor: pointer; transition: opacity .2s;
}
.at-toggle-btn:hover { opacity: .8; }

/* at-stat row (used inside at-info grid) */
.at-stat {
  display: flex; justify-content: space-between; align-items: center;
  padding: 6px 0; border-bottom: 1px solid var(--border-color);
  font-size: 13px; color: var(--text-secondary);
}
.at-stat:last-child { border-bottom: none; }
.at-stat span:last-child { font-weight: 600; color: var(--text-primary); }

/* at-log section */
.at-log-section { margin-top: 12px; }
.at-log-title { font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted); margin-bottom: 8px; }

/* P&L colours */
.pnl-positive { color: var(--accent-green) !important; font-weight: 600; }
.pnl-negative { color: var(--accent-red)   !important; font-weight: 600; }

/* Trade table */
.table-wrapper { overflow-x: auto; border-radius: var(--border-radius); border: 1px solid var(--border-color); margin-bottom: 16px; }

.trade-table {
  width: 100%; border-collapse: collapse; background: var(--bg-card); font-size: 13px;
}
.trade-table th {
  background: var(--bg-secondary); color: var(--text-secondary);
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px;
  padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}
.trade-table td {
  padding: 10px 12px; border-bottom: 1px solid var(--border-color);
  color: var(--text-primary); font-family: var(--font-mono); white-space: nowrap;
}
.trade-table tr:last-child td { border-bottom: none; }
.trade-table tr:hover td { background: var(--bg-card-hover); }

/* Close button in table */
.close-btn {
  padding: 4px 12px; border-radius: 6px; font-size: 12px; font-weight: 600;
  background: rgba(248,81,73,0.1); color: var(--accent-red);
  border: 1px solid rgba(248,81,73,0.25); cursor: pointer; transition: opacity .2s;
}
.close-btn:hover { opacity: .75; }

/* Kill-switch button (crypto) */
.cp-kill-btn {
  padding: 4px 12px; border-radius: 6px; font-size: 12px; font-weight: 600;
  cursor: pointer; border: 1px solid var(--border-color);
  background: var(--bg-secondary); color: var(--text-secondary); transition: all .2s;
}
.cp-kill-btn.active { background: rgba(248,81,73,0.12); border-color: var(--accent-red); color: var(--accent-red); }

/* Two-column layout for risk + stats row */
.cp-two-col {
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 24px;
}
@media (max-width: 680px) { .cp-two-col { grid-template-columns: 1fr; } }

/* Toast */
.toast {
  position: fixed; bottom: 24px; right: 24px; z-index: 999;
  background: var(--bg-card); border: 1px solid var(--border-color);
  border-radius: 10px; padding: 12px 20px; font-size: 14px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4); max-width: 380px;
  animation: slideIn .25s ease;
}
@keyframes slideIn { from { opacity:0; transform:translateY(10px); } to { opacity:1; transform:translateY(0); } }

/* ===== FUTURES PAPER TRADING — LONG/SHORT side buttons ===== */
.fp-side-btn {
  padding: 6px 18px; border-radius: 6px; font-size: 13px; font-weight: 700;
  cursor: pointer; border: 1px solid var(--border-color);
  background: var(--bg-secondary); color: var(--text-secondary);
  transition: all .2s; letter-spacing: .5px;
}
.fp-side-btn.long.active  { background: rgba(46,204,113,0.15); border-color: var(--accent-green); color: var(--accent-green); }
.fp-side-btn.short.active { background: rgba(248,81,73,0.15);  border-color: var(--accent-red);   color: var(--accent-red); }
.fp-side-btn:hover { opacity: .8; }

/* ===== FUTURES SCANNER CARDS ===== */
.fp-scan-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 14px 16px;
}
.fp-ind-row td { padding: 3px 6px 3px 0; vertical-align: middle; }
.fp-ind-lbl   { color: var(--text-muted); white-space: nowrap; width: 58px; }
.fp-ind-val   { font-weight: 600; width: 80px; }
@media (max-width: 600px) { #fpScannerCards { grid-template-columns: 1fr !important; } }
