/* ===== Base Application Shell ===== */
:root {
  --bg-body: #020617;
  --bg-elevated: rgba(15, 23, 42, 0.98);
  --bg-elevated-soft: rgba(15, 23, 42, 0.94);
  --border-soft: rgba(148, 163, 184, 0.35);
  --border-subtle: rgba(51, 65, 85, 0.7);
  --text-main: #e5e7eb;
  --text-muted: #94a3b8;
  --accent-cyan: #22d3ee;
  --accent-green: #4ade80;
  --accent-amber: #facc15;
  --accent-purple: #a855f7;
  --accent-red: #f97373;
  --accent-blue: #38bdf8;
  --accent-warning: #fbbf24;
  --chip-bg: rgba(15, 23, 42, 0.9);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body.app-body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at top, rgba(56, 189, 248, 0.08), transparent 55%),
    radial-gradient(circle at 20% 80%, rgba(96, 165, 250, 0.08), transparent 50%),
    linear-gradient(160deg, #020617 0%, #020617 35%, #020617 100%);
  color: var(--text-main);
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI',
    sans-serif;
}

/* ===== Top Header ===== */
.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(18px);
  background: radial-gradient(circle at 0 0, rgba(15, 118, 110, 0.32), transparent 55%),
              linear-gradient(90deg, rgba(15, 23, 42, 0.97), rgba(15, 23, 42, 0.96));
  border-bottom: 1px solid rgba(51, 65, 85, 0.85);
  padding: 0.6rem 0;
}

.brand-pill {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 30% 30%, rgba(56, 189, 248, 0.55), transparent 60%),
              radial-gradient(circle at 70% 70%, rgba(34, 197, 94, 0.4), transparent 65%);
}

.brand-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #0f172a;
  box-shadow: 0 0 14px rgba(34, 197, 94, 0.8);
}

.brand-title {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.brand-subtitle {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ===== Token chip ===== */
.token-chip {
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-amber);
  border: 1px solid rgba(250, 204, 21, 0.5);
  background: radial-gradient(circle at 0 0, rgba(250, 204, 21, 0.25), transparent 60%),
              rgba(15, 23, 42, 0.95);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

/* Dynamic alert states applied from JS */
.token-chip.alert-success {
  color: var(--accent-green);
  border-color: rgba(74, 222, 128, 0.7);
  background: radial-gradient(circle at 0 0, rgba(74, 222, 128, 0.25), transparent 60%),
              rgba(15, 23, 42, 0.92);
}
.token-chip.alert-danger {
  color: var(--accent-red);
  border-color: rgba(248, 113, 113, 0.9);
  background: radial-gradient(circle at 0 0, rgba(248, 113, 113, 0.35), transparent 60%),
              rgba(15, 23, 42, 0.96);
}
.token-chip.alert-warning {
  color: var(--accent-amber);
}

/* ===== Layout ===== */
.app-main {
  padding-top: 0.2rem;
}

.section-title {
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #f9fafb;
  font-size: 0.9rem;
  opacity: 0.85;
}

/* ===== Cards ===== */
.dashboard-card.card {
  background: var(--bg-elevated);
  border-radius: 20px;
  border: 1px solid var(--border-soft);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.85);
  overflow: hidden;
  transition: transform 0.18s ease-out, box-shadow 0.18s ease-out,
    border-color 0.18s ease-out, background 0.18s ease-out;
  margin-bottom: 0;
}

.dashboard-card.soft:hover {
  transform: translateY(-2px) translateZ(0);
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.95);
  border-color: rgba(148, 163, 184, 0.7);
}

/* Card headers (gradient chips) */
.card-header {
  border-bottom: 1px solid rgba(15, 23, 42, 0.9);
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.9rem;
  padding: 0.75rem 1rem;
  color: #ffffff !important;      /* pure white text */
  font-weight: 600;               /* slightly bold for clarity */
  letter-spacing: 0.05em;         /* subtle spacing for fintech look */
}

/* Optional: ensure the mini-pill also stands out */
.card-header .mini-pill {
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.4);
}

.card-header span {
  display: inline-flex;
  align-items: center;
}

.card-header-amber {
  background: linear-gradient(135deg, rgba(250, 204, 21, 0.18), rgba(15, 23, 42, 0.95));
}
.card-header-cyan {
  background: linear-gradient(135deg, rgba(45, 212, 191, 0.18), rgba(15, 23, 42, 0.96));
}
.card-header-lime {
  background: linear-gradient(135deg, rgba(190, 242, 100, 0.18), rgba(15, 23, 42, 0.96));
}
.card-header-green {
  background: linear-gradient(135deg, rgba(74, 222, 128, 0.2), rgba(15, 23, 42, 0.96));
}
.card-header-blue {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(15, 23, 42, 0.96));
}
.card-header-purple {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.2), rgba(15, 23, 42, 0.96));
}
.card-header-dark {
  background: radial-gradient(circle at 0 0, rgba(148, 163, 184, 0.18), transparent 55%),
              rgba(15, 23, 42, 0.98);
}
.card-header-slate {
  background: linear-gradient(135deg, rgba(51, 65, 85, 0.8), rgba(15, 23, 42, 0.96));
}
.card-header-warning {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.25), rgba(15, 23, 42, 0.96));
}

/* Special border color for Predictive card */
.border-purple {
  border-color: rgba(168, 85, 247, 0.7) !important;
}

/* Card body */
.dashboard-card .card-body {
  padding: 0.9rem 1rem;
}

/* ===== Mini chips / tags ===== */
.mini-pill {
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-main);
  border: 1px solid rgba(148, 163, 184, 0.6);
  background: rgba(15, 23, 42, 0.78);
}

.mini-pill-live {
  color: var(--accent-green);
  border-color: rgba(74, 222, 128, 0.8);
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.3);
}

.table-head th {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #ffffff;          /* was var(--text-muted) */
}

/* ===== Labels in profile/funds =====
.label {
  display: inline-block;
  width: 52%;
  max-width: 180px;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: #ffffff;          
  font-weight: 500;        
} */
/* Make all profile/fund values pure white */
.dashboard-card .card-body p span {
  color: #ffffff;
}

/* Keep labels white & slightly bolder */
.label {
  display: inline-block;
  width: 52%;
  max-width: 180px;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: #ffffff;
  font-weight: 500;
}

/* ===== Tables ===== */
.table-wrap {
  padding: 0.25rem 0.25rem 0.45rem;
}

.table {
  margin-bottom: 0;
  color: var(--text-main);
  font-size: 0.82rem;
}

.table-sm td,
.table-sm th {
  padding-top: 0.45rem;
  padding-bottom: 0.45rem;
}

.table-borderless > :not(caption) > * > * {
  border-bottom-width: 0;
}

.table-head {
  background: rgba(15, 23, 42, 0.98);
  border-bottom: 1px solid rgba(51, 65, 85, 0.8);
}

.table-head th {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #0e0e0e;
}

/* Sticky header for scrollable sections */
.sticky-head {
  position: sticky;
  top: 0;
  z-index: 5;
}

/* Row hover */
.table-hover tbody tr:hover {
  background: radial-gradient(circle at 0 0, rgba(56, 189, 248, 0.18), transparent 60%);
}

/* Data table tweaks */
.data-table td,
.data-table th {
  vertical-align: middle;
}

/* Responsive horizontal scroll on mobile */
@media (max-width: 767.98px) {
  .table-wrap {
    overflow-x: auto;
  }
}

/* ===== Signals & PnL colouring ===== */
.signal-positive {
  color: var(--accent-green);
  font-weight: 700;
}
.signal-negative {
  color: var(--accent-red);
  font-weight: 700;
}
.pnl-positive {
  color: var(--accent-green);
  font-weight: 600;
}
.pnl-negative {
  color: var(--accent-red);
  font-weight: 600;
}

/* PnL chips (bottom right) */
.pnl-chips .pnl-badge {
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  padding: 0.3rem 0.7rem;
}

.pnl-badge-realized {
  background: rgba(22, 163, 74, 0.16);
  border: 1px solid rgba(34, 197, 94, 0.6);
  color: var(--accent-green);
}
.pnl-badge-open {
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.6);
  color: var(--accent-blue);
}
.pnl-badge-net {
  background: rgba(129, 140, 248, 0.15);
  border: 1px solid rgba(129, 140, 248, 0.6);
  color: #a5b4fc;
}

/* ===== Exit button ===== */
.btn-exit {
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-radius: 999px;
  border-width: 1px;
}

/* ===== Predictive Outlook ===== */
.pred-text {
  font-size: 0.86rem;
  color: var(--text-main);
  padding: 0.3rem 0.1rem;
}

/* ===== Modal style ===== */
.modal-glass {
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.96));
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.65);
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.98);
  color: var(--text-main);
}

.modal-header {
  border-bottom-color: var(--border-subtle);
}

.modal-footer {
  border-top-color: var(--border-subtle);
}

/* ===== Buttons general tweak ===== */
.btn-outline-light {
  border-color: rgba(148, 163, 184, 0.8);
  color: var(--text-main);
  font-size: 0.78rem;
  border-radius: 999px;
  padding-inline: 0.9rem;
}
.btn-outline-light:hover {
  background: rgba(148, 163, 184, 0.16);
}

/* ===== Small screens ===== */
@media (max-width: 575.98px) {
  .brand-title {
    font-size: 0.85rem;
  }
  .brand-subtitle {
    display: none;
  }
  .section-title {
    font-size: 0.8rem;
  }
}

/* ===== NIFTY Options Snapshot widget ===== */

.options-card {
  padding: 0.9rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.options-top {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.opt-metric {
  padding: 0.5rem 0.65rem;
  border-radius: 0.9rem;
  background: radial-gradient(circle at 0 0, rgba(34, 197, 94, 0.18), transparent 60%),
    rgba(15, 23, 42, 0.98);
  border: 1px solid rgba(148, 163, 184, 0.35);
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.opt-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}

.opt-value {
  font-size: 1rem;
  font-weight: 600;
  color: #ffffff;
}

.opt-expiry-pill {
  background: radial-gradient(circle at 0 0, rgba(56, 189, 248, 0.22), transparent 60%),
    rgba(15, 23, 42, 0.98);
}

/* Bottom CE/PE row */
.options-bottom {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.opt-side {
  border-radius: 1rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: linear-gradient(
    135deg,
    rgba(15, 23, 42, 0.96),
    rgba(15, 23, 42, 0.92)
  );
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.opt-side-ce {
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.3);
}
.opt-side-pe {
  box-shadow: 0 0 0 1px rgba(248, 113, 113, 0.3);
}

.opt-side-header {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
}
.dot-ce {
  background: var(--accent-green);
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.8);
}
.dot-pe {
  background: var(--accent-red);
  box-shadow: 0 0 8px rgba(248, 113, 113, 0.8);
}

.opt-side-body {
  font-size: 0.8rem;
  color: #e5e7eb;
  line-height: 1.35;
}

/* Mobile adjustments */
@media (max-width: 767.98px) {
  .options-top {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .options-bottom {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   APPENDED: Predictive + Projected Option Target stacking
   (Add this at the END of fintech-dashboard.css)
========================================================= */

/* Stack Predictive Outlook card + Projected Option Target card vertically */


/* Gap between Predictive and Projected cards */

/* Green border for Projected Option Target card */
.border-success {
  border-color: rgba(74, 222, 128, 0.7) !important; /* matches your accent-green */
}

/* Header style for Projected Option Target card (similar to other headers) */
.card-header-success {
  background: linear-gradient(135deg, rgba(74, 222, 128, 0.20), rgba(15, 23, 42, 0.96));
}
/* ===== Projected Option Target: progress bar ===== */
.proj-progress {
  height: 10px;
  background: rgba(255,255,255,0.08);
  border-radius: 999px;
  overflow: hidden;
}

.proj-progress .progress-bar {
  background: linear-gradient(90deg, rgba(74,222,128,0.35), rgba(74,222,128,0.95));
  transition: width 250ms ease;
}
/* ===== Progress bar color states ===== */
.proj-progress .progress-bar {
  transition: width 250ms ease, background-color 250ms ease;
}

.proj-progress.low    .progress-bar { background: linear-gradient(90deg, #38bdf8, #0ea5e9); } /* blue */
.proj-progress.mid    .progress-bar { background: linear-gradient(90deg, #facc15, #f59e0b); } /* amber */
.proj-progress.high   .progress-bar { background: linear-gradient(90deg, #4ade80, #22c55e); } /* green */
.proj-progress.hit    .progress-bar { 
  background: linear-gradient(90deg, #f87171, #ef4444); 
  animation: pulseHit 1.2s infinite;
}

@keyframes pulseHit {
  0%   { opacity: 0.7; }
  50%  { opacity: 1; }
  100% { opacity: 0.7; }
}
.pred-column {
  display: flex;
  flex-direction: column;
}

.pred-column .dashboard-card + .dashboard-card {
  margin-top: 12px;
}
/* ===============================
   FIX: Profile & Funds labels visibility
================================ */

/* Generic label text inside cards */
.dashboard-card .label,
.dashboard-card p span:first-child {
  color: #ffffff !important;
  opacity: 0.95;
  font-weight: 500;
}

/* Values slightly brighter */
.dashboard-card p span:last-child {
  color: #e5e7eb;
  font-weight: 600;
}

/* Profile & Funds card titles already fine, ensure body text */
.dashboard-card .card-body p {
  color: #ffffff;
}

/* Analysis Boxes */
.analysis-box {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 8px;
  border-left: 4px solid #007bff;
  min-height: 100px;
}

.analysis-label {
  font-size: 0.75rem;
  color: #6c757d;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 8px;
}

/* Technical Indicators Panel */
.tech-indicators-panel {
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  padding: 15px;
  border-radius: 8px;
}

.indicator-box {
  background: white;
  padding: 10px;
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.indicator-label {
  font-size: 0.7rem;
  color: #6c757d;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 5px;
}

.indicator-value {
  font-size: 1.2rem;
  font-weight: 700;
  color: #212529;
}

/* Market Regime Badges */
.regime-badge {
  background: rgba(255, 255, 255, 0.9);
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  transition: transform 0.2s;
}

.regime-badge:hover {
  transform: translateY(-3px);
}

.regime-label {
  font-size: 0.75rem;
  color: #6c757d;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 8px;
}

.regime-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: #007bff;
}

/* Gradient backgrounds */
.bg-gradient {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.bg-gradient .card-header h6 {
  color: white;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .analysis-box {
    min-height: auto;
    margin-bottom: 10px;
  }
  
  .indicator-box {
    margin-bottom: 8px;
  }
}

/* Loading spinner color */
.spinner-border-sm {
  color: #007bff;
}

/* ===== FYERS Signup button ===== */
.btn-signup {
  border-color: rgba(34, 211, 238, 0.75);               /* accent-cyan */
  background: radial-gradient(circle at 10% 10%, rgba(34, 211, 238, 0.22), transparent 55%),
              rgba(15, 23, 42, 0.92);
  color: #ffffff;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding-inline: 1.05rem;
  box-shadow: 0 10px 26px rgba(2, 6, 23, 0.55);
}

.btn-signup:hover {
  background: radial-gradient(circle at 10% 10%, rgba(34, 211, 238, 0.32), transparent 55%),
              rgba(15, 23, 42, 0.96);
  border-color: rgba(34, 211, 238, 0.95);
  transform: translateY(-1px);
}

.btn-signup:active {
  transform: translateY(0px);
}

/* ===== Landing Header (matches your app-header style) ===== */
.brand-dot{
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(34,211,238,0.95), rgba(34,211,238,0.25));
  box-shadow: 0 0 0 3px rgba(34,211,238,0.12);
  display: inline-block;
}

.brand-title{
  font-weight: 800;
  letter-spacing: 0.04em;
  color: rgba(255,255,255,0.92);
  font-size: 0.95rem;
  text-transform: uppercase;
}

.brand-subtitle{
  font-size: 0.72rem;
  color: rgba(226,232,240,0.75);
  margin-left: 20px;
  margin-top: 2px;
}

/* ===== Status pill like screenshot ===== */
.status-pill{
  font-size: 0.72rem;
  padding: 0.32rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(148,163,184,0.35);
  color: rgba(226,232,240,0.9);
  background: rgba(2,6,23,0.35);
  backdrop-filter: blur(10px);
}

.status-warn{
  border-color: rgba(245,158,11,0.55);
  background: rgba(245,158,11,0.10);
  color: rgba(253,230,138,0.95);
}

/* ===== Landing layout ===== */
.landing-shell{
  min-height: calc(100vh - 90px);
  display: grid;
  place-items: center;
}

.landing-card{
  width: min(920px, 100%);
  border-radius: 18px;
  padding: 28px;
  border: 1px solid rgba(51, 65, 85, 0.65);
  background: radial-gradient(circle at 0 0, rgba(34,211,238,0.10), transparent 55%),
              rgba(2,6,23,0.35);
  box-shadow: 0 18px 50px rgba(0,0,0,0.35);
}

.landing-title{
  color: rgba(255,255,255,0.92);
  font-weight: 800;
  letter-spacing: 0.01em;
}

.landing-text{
  color: rgba(226,232,240,0.8);
  margin-top: 10px;
  max-width: 70ch;
}

.landing-actions{
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.btn-lg{
  padding: 0.72rem 1.2rem;
  font-size: 0.85rem;
}

/* ===== Button styling for Login & Sign Up ===== */
/* Uses your existing .btn-outline-light as base */
.btn-login{
  border-color: rgba(59,130,246,0.75);
  background: radial-gradient(circle at 10% 10%, rgba(59,130,246,0.20), transparent 55%),
              rgba(15, 23, 42, 0.92);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  box-shadow: 0 10px 26px rgba(2, 6, 23, 0.55);
}

.btn-login:hover{
  border-color: rgba(59,130,246,0.95);
  transform: translateY(-1px);
}

.btn-signup{
  border-color: rgba(34,211,238,0.75);
  background: radial-gradient(circle at 10% 10%, rgba(34,211,238,0.22), transparent 55%),
              rgba(15, 23, 42, 0.92);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  box-shadow: 0 10px 26px rgba(2, 6, 23, 0.55);
}

.btn-signup:hover{
  border-color: rgba(34,211,238,0.95);
  transform: translateY(-1px);
}

.btn-settings{
  opacity: 0.92;
}

.landing-note{
  margin-top: 14px;
  font-size: 0.78rem;
  color: rgba(148,163,184,0.9);
}
