/* Swing Edge — light theme, mobile-first, PWA-friendly */

:root {
  --bg: #f0f4fa;
  --bg-soft: #e8eef7;
  --surface: #ffffff;
  --text: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --accent: #6366f1;
  --accent-hover: #4f46e5;
  --accent-soft: rgba(99, 102, 241, 0.12);
  --accent-ring: rgba(99, 102, 241, 0.25);
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 20px rgba(15, 23, 42, 0.07);
  --shadow-lg: 0 12px 40px rgba(15, 23, 42, 0.1);
  --radius-lg: 16px;
  --radius-xl: 20px;
  --header-bg: rgba(255, 255, 255, 0.82);
}

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

html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  scroll-behavior: smooth;
}

body.app-body {
  margin: 0;
  min-height: 100dvh;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 100% 80% at 50% -30%, rgba(99, 102, 241, 0.09), transparent),
    radial-gradient(ellipse 60% 50% at 100% 0%, rgba(14, 165, 233, 0.06), transparent);
  padding-bottom: max(1rem, env(safe-area-inset-bottom));
}

body.app-body.app-layout {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

.app-main {
  flex: 1 0 auto;
  width: 100%;
}

.app-footer-legal {
  flex-shrink: 0;
  border-top: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.94);
  padding: 0.625rem 1rem 0.75rem;
  padding-bottom: max(0.75rem, env(safe-area-inset-bottom));
}

@media (min-width: 768px) {
  .app-footer-legal {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

.app-footer-legal__inner {
  width: 100%;
  max-width: none;
  margin: 0;
}

.app-footer-legal__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
}

.app-footer-toggle {
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #475569;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
  padding: 0.38rem 0.7rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
}

.app-footer-toggle:hover {
  background: #eef2ff;
  color: #3730a3;
}

.app-footer-legal__title {
  font-size: 0.6875rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  margin: 0 0 0.3rem;
}

.app-footer-legal__text {
  font-size: 0.6875rem;
  line-height: 1.45;
  color: #64748b;
  margin: 0 0 0.3rem;
}

.app-footer-legal__text strong {
  color: #475569;
  font-weight: 600;
}

.app-footer-legal__muted {
  font-size: 0.625rem;
  line-height: 1.35;
  color: #94a3b8;
  margin: 0.4rem 0 0;
}

.app-footer-legal__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.9rem;
  margin-top: 0.4rem;
}

.app-footer-legal__links a {
  color: #4f46e5;
  font-size: 0.6875rem;
  font-weight: 700;
  text-decoration: none;
}

.app-footer-legal__links a:hover {
  color: #312e81;
  text-decoration: underline;
}

.app-footer-legal.is-collapsed #disclaimerBody {
  display: none;
}

/* Scrollbars (webkit) */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(100, 116, 139, 0.35);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(71, 85, 105, 0.5);
}

/* Header */
.app-header {
  position: sticky;
  top: 0;
  z-index: 40;
  padding: 0.75rem 1rem;
  padding-top: max(0.75rem, env(safe-area-inset-top));
  background: var(--header-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
@media (min-width: 768px) {
  .app-header {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

.app-header__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.logo-mark {
  width: 2rem;
  height: 2rem;
  border-radius: 0.75rem;
  display: block;
  object-fit: cover;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.22);
}

.logo-text {
  font-weight: 900;
  font-size: 1rem;
  letter-spacing: -0.02em;
  background: linear-gradient(to right, #4f46e5, #0891b2);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.top-main-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.3rem;
  border: 1px solid var(--border);
  border-radius: 0.8rem;
  background: rgba(255, 255, 255, 0.92);
}

.top-main-nav--mobile {
  margin-top: 0.6rem;
  width: 100%;
}

.top-main-nav__item {
  padding: 0.45rem 0.85rem;
  border-radius: 0.55rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #64748b;
  text-decoration: none;
  border: 1px solid transparent;
}

.top-main-nav__item:hover {
  color: var(--text);
  background: rgba(15, 23, 42, 0.04);
}

.top-main-nav__item.active {
  color: #334155;
  background: #e2e8f0;
  border-color: #cbd5e1;
}

.market-spot-ticker {
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  flex: 0 1 auto;
  min-width: 0;
  padding: 0.25rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
}

.market-spot-ticker--mobile {
  display: flex;
  margin-top: 0.55rem;
  width: 100%;
  overflow-x: auto;
  justify-content: flex-start;
  -webkit-overflow-scrolling: touch;
}

.market-spot-ticker__loading {
  padding: 0.35rem 0.75rem;
  font-size: 0.72rem;
  font-weight: 800;
  color: #94a3b8;
  white-space: nowrap;
}

.market-spot-item {
  display: inline-flex;
  align-items: baseline;
  gap: 0.28rem;
  border-radius: 999px;
  padding: 0.36rem 0.62rem;
  background: #f8fafc;
  color: #475569;
  white-space: nowrap;
  line-height: 1;
}

.market-spot-item__label {
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
}

.market-spot-item__last {
  font-size: 0.78rem;
  font-weight: 900;
  color: #0f172a;
}

.market-spot-item__change {
  font-size: 0.68rem;
  font-weight: 800;
}

.market-spot-item--up {
  background: #ecfdf5;
}

.market-spot-item--up .market-spot-item__change {
  color: #059669;
}

.market-spot-item--down {
  background: #fef2f2;
}

.market-spot-item--down .market-spot-item__change {
  color: #dc2626;
}

.market-spot-item--flat .market-spot-item__change {
  color: #64748b;
}

.nav-shell {
  display: flex;
  align-items: center;
  gap: 0.125rem;
  padding: 0.25rem;
  border-radius: 0.75rem;
  background: rgba(241, 245, 249, 0.9);
  border: 1px solid var(--border);
}

.filter-pill {
  padding: 0.4rem 0.85rem;
  border-radius: 0.625rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.15s, background 0.15s, border-color 0.15s;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  touch-action: manipulation;
}
@media (min-width: 768px) {
  .filter-pill {
    min-height: auto;
  }
}

.filter-pill:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.95);
  border-color: var(--border);
}

.filter-pill.active {
  color: #4338ca;
  font-weight: 600;
  background: var(--accent-soft);
  border-color: rgba(99, 102, 241, 0.28);
}

.header-actions select {
  font-size: 0.75rem;
}

.badge-scan {
  font-size: 0.75rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  color: var(--text-muted);
  background: #f1f5f9;
  border: 1px solid var(--border);
}

.btn-icon-mobile {
  padding: 0.4rem;
  border-radius: 0.5rem;
  color: var(--text-muted);
  background: #f8fafc;
  border: 1px solid var(--border);
  touch-action: manipulation;
  min-width: 40px;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-icon-mobile:hover {
  color: var(--text);
  background: #fff;
}

.mobile-nav-grid {
  margin-top: 0.75rem;
  padding-bottom: 0.25rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.375rem;
}

.mobile-nav-grid a {
  padding: 0.65rem 1rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  text-align: center;
  text-decoration: none;
  border: 1px solid var(--border);
  background: #f8fafc;
  color: var(--text-muted);
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
}

.mobile-nav-grid a.nav-active {
  font-weight: 600;
  color: #3730a3;
  background: var(--accent-soft);
  border-color: rgba(99, 102, 241, 0.35);
}

.page-shell {
  width: 100%;
  max-width: 100%;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.screener-sidebar {
  position: sticky;
  top: calc(74px + env(safe-area-inset-top));
  margin: 1rem 0 0 1rem;
  width: 230px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 1rem;
  box-shadow: var(--shadow-sm);
  padding: 0.8rem;
}

.screener-sidebar__title {
  font-size: 0.73rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  margin-bottom: 0.6rem;
}

.screener-sidebar__menu {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.screener-sidebar__item {
  display: block;
  text-decoration: none;
  color: #475569;
  font-size: 0.84rem;
  font-weight: 600;
  border: 1px solid transparent;
  border-radius: 0.75rem;
  padding: 0.6rem 0.7rem;
}

.screener-sidebar__item:hover {
  background: #f8fafc;
  color: #1e293b;
}

.screener-sidebar__item.active {
  background: rgba(99, 102, 241, 0.12);
  border-color: rgba(99, 102, 241, 0.25);
  color: #4338ca;
}

.page-content {
  flex: 1;
  min-width: 0;
}

.page-content--wide {
  max-width: none;
  width: 100%;
  margin: 0;
}

.screener-mobile-nav {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0.75rem 1rem 0.2rem;
}

.screener-mobile-nav__item {
  white-space: nowrap;
  text-decoration: none;
  font-size: 0.78rem;
  color: #64748b;
  padding: 0.42rem 0.7rem;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: rgba(255, 255, 255, 0.92);
}

.screener-mobile-nav__item.active {
  color: #4338ca;
  border-color: rgba(99, 102, 241, 0.3);
  background: rgba(99, 102, 241, 0.12);
}

@media (max-width: 1023px) {
  .page-shell {
    display: block;
  }
}

/* Primary button */
.btn-primary {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: #fff !important;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
  transition: transform 0.2s, box-shadow 0.2s;
  border: none;
  cursor: pointer;
  touch-action: manipulation;
  min-height: 40px;
}

.btn-primary:hover {
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.45);
  transform: translateY(-1px);
}

.btn-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

/* Glass / surfaces */
.glass {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.table-shell {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

/* Table */
table.w-full.text-sm thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8fafc;
  font-size: 0.625rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
  font-weight: 700;
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--border);
}

tbody.divide-y > tr {
  border-color: #f1f5f9;
}

.row-hover:hover {
  background: rgba(99, 102, 241, 0.06);
  cursor: pointer;
}

.row-hover:hover td:first-child {
  border-left: 2px solid rgba(99, 102, 241, 0.55);
}

td:first-child {
  border-left: 2px solid transparent;
  transition: border-color 0.15s;
}

/* Signal badges (pre-breakout index) */
.badge-very-strong {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #6ee7b7;
}
.badge-strong {
  background: #eef2ff;
  color: #4338ca;
  border: 1px solid #a5b4fc;
}
.badge-watch {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #93c5fd;
}
.badge-moderate {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fcd34d;
}
.badge-weak {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

/* Breakouts page badges */
.badge-htf {
  background: #faf5ff;
  color: #7e22ce;
  border: 1px solid #e9d5ff;
}
.badge-abo {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #6ee7b7;
}
.badge-cont {
  background: #f0f9ff;
  color: #0369a1;
  border: 1px solid #7dd3fc;
}

/* Stat cards */
.stat-card {
  border-radius: var(--radius-lg);
  padding: 1.125rem 1.25rem;
  transition: transform 0.18s, box-shadow 0.18s;
  box-shadow: var(--shadow-sm);
}
.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-emerald {
  background: linear-gradient(135deg, #ecfdf5, #f0fdf4);
  border: 1px solid #a7f3d0;
}
.stat-indigo {
  background: linear-gradient(135deg, #eef2ff, #f5f3ff);
  border: 1px solid #c7d2fe;
}
.stat-violet {
  background: linear-gradient(135deg, #f5f3ff, #faf5ff);
  border: 1px solid #ddd6fe;
}
.stat-sky {
  background: linear-gradient(135deg, #f0f9ff, #ecfeff);
  border: 1px solid #bae6fd;
}
.stat-purple {
  background: linear-gradient(135deg, #faf5ff, #fdf4ff);
  border: 1px solid #e9d5ff;
}
.stat-slate {
  background: var(--surface);
  border: 1px solid var(--border);
}

.stat-val-emerald {
  color: #059669;
}
.stat-val-indigo {
  color: #4f46e5;
}
.stat-val-violet {
  color: #7c3aed;
}
.stat-val-sky {
  color: #0284c7;
}
.stat-val-purple {
  color: #9333ea;
}
.stat-val-slate {
  color: #475569;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.375rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Filter toolbar */
.filter-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.filter-toolbar .nav-shell {
  flex-wrap: wrap;
}

/* Inputs */
input[type="text"],
input[type="number"],
input[type="search"],
select,
textarea {
  background: #fff !important;
  color: var(--text) !important;
  border: 1px solid var(--border-strong) !important;
  border-radius: 0.75rem;
}

input:focus,
select:focus,
textarea:focus {
  outline: none !important;
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px var(--accent-ring) !important;
}

/* Search: full width on small screens */
.search-input {
  width: 100%;
  max-width: 100%;
}
@media (min-width: 640px) {
  .search-input {
    width: 13rem;
    max-width: 13rem;
  }
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 50;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: max(15vh, 1rem) max(1rem, env(safe-area-inset-right))
    max(15vh, 1rem) max(1rem, env(safe-area-inset-left));
  overflow-y: auto;
}

.modal-panel {
  width: 100%;
  max-width: 30rem;
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  margin: 0 auto;
}

.modal-panel--chart {
  max-width: min(1120px, calc(100vw - 2rem));
}

.stock-chart-wrap {
  margin-bottom: 0.75rem;
}

.stock-chart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}

.stock-chart-caption {
  font-size: 0.6875rem;
  color: #64748b;
  font-weight: 600;
}

.stock-chart-action {
  flex: 0 0 auto;
  border-radius: 999px;
  border: 1px solid rgba(99, 102, 241, 0.22);
  background: rgba(238, 242, 255, 0.75);
  color: #4f46e5;
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 1;
  padding: 0.4rem 0.65rem;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.stock-chart-action:hover {
  background: #4f46e5;
  border-color: #4f46e5;
  color: #fff;
}

.stock-chart-mount {
  width: 100%;
  height: 420px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background: #fff;
  overflow: hidden;
}

.stock-chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  margin-top: 0.45rem;
}

.stock-chart-legend__item {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
  background: rgba(248, 250, 252, 0.92);
  border: 1px solid rgba(226, 232, 240, 0.9);
  color: #475569;
  font-size: 0.625rem;
  line-height: 1;
  white-space: nowrap;
}

.stock-chart-legend__dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 999px;
  flex: 0 0 auto;
}

.stock-chart-legend__item strong {
  color: #0f172a;
  font-weight: 700;
}

.stock-chart-note {
  margin-top: 0.35rem;
  font-size: 0.625rem;
  color: #94a3b8;
  line-height: 1.4;
}

body.chart-fullscreen-open {
  overflow: hidden;
}

.modal-panel--chart.is-chart-fullscreen {
  position: fixed;
  inset: max(0.5rem, env(safe-area-inset-top)) max(0.5rem, env(safe-area-inset-right))
    max(0.5rem, env(safe-area-inset-bottom)) max(0.5rem, env(safe-area-inset-left));
  z-index: 60;
  width: auto;
  max-width: none;
  height: auto;
  margin: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 1.25rem;
}

.modal-panel--chart.is-chart-fullscreen .stock-chart-wrap {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  flex-direction: column;
}

.modal-panel--chart.is-chart-fullscreen .stock-chart-mount {
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
}

.modal-panel--chart.is-chart-fullscreen #modalScoreBreakdown,
.modal-panel--chart.is-chart-fullscreen #modalStats {
  display: none;
}

@media (max-width: 768px) {
  .modal-overlay {
    align-items: center;
    padding: max(1rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right))
      max(1rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
  }
}

.modal-panel h2 {
  color: var(--text);
}

.score-bar {
  transition: width 0.6s ease;
}

.label-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 600;
}

.pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}

/* Nifty / options signal cards (light) */
.signal-ce {
  background: linear-gradient(135deg, #ecfdf5, #d1fae5);
  border: 2px solid #10b981;
  box-shadow: 0 4px 24px rgba(16, 185, 129, 0.15);
}
.signal-pe {
  background: linear-gradient(135deg, #fef2f2, #fee2e2);
  border: 2px solid #ef4444;
  box-shadow: 0 4px 24px rgba(239, 68, 68, 0.12);
}
.signal-wait {
  background: linear-gradient(135deg, #f8fafc, #f1f5f9);
  border: 2px solid #cbd5e1;
}

.glow-green {
  box-shadow: 0 0 24px rgba(16, 185, 129, 0.25);
}
.glow-red {
  box-shadow: 0 0 24px rgba(239, 68, 68, 0.2);
}
.glow-gray {
  box-shadow: 0 0 16px rgba(148, 163, 184, 0.2);
}

@keyframes pulse-green {
  0%,
  100% {
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.25);
  }
  50% {
    box-shadow: 0 0 24px rgba(16, 185, 129, 0.45);
  }
}
@keyframes pulse-red {
  0%,
  100% {
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.2);
  }
  50% {
    box-shadow: 0 0 24px rgba(239, 68, 68, 0.4);
  }
}
.pulse-green {
  animation: pulse-green 2s ease-in-out infinite;
}
.pulse-red {
  animation: pulse-red 2s ease-in-out infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}
.spin {
  animation: spin 1s linear infinite;
  display: inline-block;
}

.ind-bull {
  color: #059669;
}
.ind-bear {
  color: #dc2626;
}
.ind-neutral {
  color: #64748b;
}

/* Trading page cards (light) */
.card-ce {
  background: linear-gradient(135deg, #ecfdf5, #d1fae5);
  border: 2px solid #22c55e;
}
.card-pe {
  background: linear-gradient(135deg, #fef2f2, #fecaca);
  border: 2px solid #ef4444;
}
.card-wait {
  background: linear-gradient(135deg, #f8fafc, #f1f5f9);
  border: 2px solid #94a3b8;
}

.pill-ce {
  background: #d1fae5;
  color: #047857;
}
.pill-pe {
  background: #fee2e2;
  color: #b91c1c;
}
.pill-wait {
  background: #e2e8f0;
  color: #475569;
}

.pnl-pos {
  color: #059669;
}
.pnl-neg {
  color: #dc2626;
}
.pnl-neu {
  color: #64748b;
}

.badge-paper {
  background: #fef3c7;
  color: #b45309;
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
}
.badge-live {
  background: #d1fae5;
  color: #047857;
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
}

.kill-on {
  background: #fee2e2;
  border-color: #ef4444 !important;
  color: #991b1b;
}
.kill-off {
  background: #d1fae5;
  border-color: #22c55e !important;
  color: #14532d;
}

/* Multibagger */
.score-fill {
  height: 3px;
  border-radius: 2px;
  transition: width 0.6s ease;
}

/* Horizontal scroll: momentum scrolling on iOS */
.overflow-x-auto {
  -webkit-overflow-scrolling: touch;
}

/* Utility: divider inside modals */
.divider-row {
  border-bottom: 1px solid var(--border);
}

/* Chart / backtest bar track */
.score-track {
  background: #e2e8f0;
}
