/* ═══════════════════════════════════════════════════════
   Tradz — Common Design System
   ═══════════════════════════════════════════════════════ */


/* ── VARIABLES ── */
:root {
  --bg:            #070B14;
  --bg-card:       #0D1220;
  --bg-elevated:   #111827;
  --bg-glass:      rgba(13,18,32,0.85);
  --border:        rgba(255,255,255,0.065);
  --border-hover:  rgba(255,255,255,0.12);
  --saffron:       #FF9933;
  --saffron-dim:   rgba(255,153,51,0.1);
  --saffron-bd:    rgba(255,153,51,0.3);
  --green:         #00C896;
  --green-dim:     rgba(0,200,150,0.1);
  --red:           #FF4455;
  --red-dim:       rgba(255,68,85,0.1);
  --blue:          #3B82F6;
  --blue-dim:      rgba(59,130,246,0.1);
  --white:         #EEF2F8;
  --muted:         #6B7A8F;
  --secondary:     #9BAABB;
  --sidebar-w:     248px;
  --font-body:     "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display:  "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono:     "Cascadia Mono", "SF Mono", Consolas, "Liberation Mono", monospace;
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* ── BASE ── */
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--white);
  overflow-x: hidden;
  min-height: 100vh;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,153,51,0.014) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,153,51,0.014) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--saffron); border-radius: 2px; }

/* ── TYPOGRAPHY UTILS ── */
.font-display  { font-family: var(--font-display); }
.font-mono  { font-family: var(--font-mono); }
.text-saffron { color: var(--saffron); }
.text-green   { color: var(--green); }
.text-red     { color: var(--red); }
.text-muted   { color: var(--muted); }
.text-secondary { color: var(--secondary); }

/* ── TICKER ── */
.ticker-bar { background: var(--bg-elevated); border-bottom: 1px solid var(--border); overflow: hidden; padding: 5px 0; }
.ticker-inner { display: flex; animation: tickerMove 36s linear infinite; width: max-content; }
.ticker-item { display: flex; align-items: center; gap: 8px; padding: 0 28px; font-family: var(--font-mono); font-size: 11.5px; border-right: 1px solid var(--border); white-space: nowrap; }
.t-name { color: var(--secondary); } .t-price { color: var(--white); font-weight: 600; }
.t-up { color: var(--green); } .t-dn { color: var(--red); }
@keyframes tickerMove { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ── NAVBAR ── */
.navbar-wrap { position: sticky; top: 0; z-index: 990; }
.main-nav { background: rgba(7,11,20,0.92); backdrop-filter: blur(20px); border-bottom: 1px solid var(--border); padding: 10px 0; }
.nav-inner { max-width: 1300px; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { font-family: var(--font-display); font-size: 21px; font-weight: 800; color: var(--white); letter-spacing: -0.02em; }
.brand span { color: var(--saffron); }
.nav-links { display: flex; align-items: center; gap: 2px; }
.nav-link { padding: 7px 13px; font-size: 13.5px; font-weight: 500; color: var(--secondary); border-radius: 7px; transition: all 0.2s; font-family: var(--font-body); }
.nav-link:hover { color: var(--white); background: rgba(255,255,255,0.04); }
.nav-link.active { color: var(--saffron); }
.nav-actions { display: flex; gap: 8px; align-items: center; }

/* ── BUTTONS ── */
.btn-saffron { background: linear-gradient(135deg,#FF9933,#e0801a); color: #000; font-weight: 700; font-size: 13.5px; padding: 9px 20px; border-radius: 8px; border: none; transition: all 0.2s; display: inline-flex; align-items: center; gap: 7px; font-family: var(--font-body); }
.btn-saffron:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(255,153,51,0.3); color: #000; }
.btn-outline { background: transparent; color: var(--white); font-weight: 600; font-size: 13.5px; padding: 9px 20px; border-radius: 8px; border: 1px solid var(--border); transition: all 0.2s; display: inline-flex; align-items: center; gap: 7px; font-family: var(--font-body); }
.btn-outline:hover { border-color: var(--border-hover); color: var(--white); }
.btn-ghost { background: transparent; color: var(--secondary); font-size: 13.5px; font-weight: 500; padding: 9px 16px; border-radius: 8px; border: none; transition: all 0.2s; display: inline-flex; align-items: center; gap: 7px; font-family: var(--font-body); }
.btn-ghost:hover { color: var(--white); background: rgba(255,255,255,0.04); }
.btn-green { background: linear-gradient(135deg,#00C896,#059669); color: #000; font-weight: 700; font-size: 13.5px; padding: 9px 20px; border-radius: 8px; border: none; transition: all 0.2s; display: inline-flex; align-items: center; gap: 7px; font-family: var(--font-body); }
.btn-green:hover { box-shadow: 0 6px 20px rgba(0,200,150,0.3); color: #000; }
.btn-sm { padding: 6px 14px !important; font-size: 12px !important; }
.btn-full { width: 100%; justify-content: center; }

/* ── FORMS ── */
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.form-label { font-size: 12.5px; font-weight: 600; color: var(--secondary); letter-spacing: 0.02em; font-family: var(--font-body); }
.form-label .req { color: var(--red); margin-left: 2px; }
.form-input { background: var(--bg-elevated); border: 1px solid var(--border); border-radius: 9px; padding: 11px 14px; color: var(--white); font-size: 14px; outline: none; transition: border-color 0.2s, box-shadow 0.2s; width: 100%; font-family: var(--font-body); }
.form-input:focus { border-color: var(--saffron-bd); box-shadow: 0 0 0 3px rgba(255,153,51,0.06); }
.form-input::placeholder { color: var(--muted); }
.form-input option { background: var(--bg-elevated); color: var(--white); }
textarea.form-input { resize: vertical; min-height: 90px; }
.form-hint { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.form-error { font-size: 11.5px; color: var(--red); }
.input-wrap { position: relative; }
.input-wrap .form-input { padding-left: 40px; }
.input-icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 15px; pointer-events: none; }
.input-suffix { position: absolute; right: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); cursor: pointer; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-divider { border: none; border-top: 1px solid var(--border); margin: 20px 0; }
.checkbox-group { display: flex; align-items: center; gap: 10px; }
.custom-check { width: 16px; height: 16px; accent-color: var(--saffron); cursor: pointer; }

/* ── BADGES ── */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 20px; font-size: 11px; font-weight: 600; letter-spacing: 0.03em; font-family: var(--font-body); }
.badge-saffron { background: var(--saffron-dim); color: var(--saffron); border: 1px solid var(--saffron-bd); }
.badge-green   { background: var(--green-dim); color: var(--green); border: 1px solid rgba(0,200,150,0.25); }
.badge-red     { background: var(--red-dim); color: var(--red); border: 1px solid rgba(255,68,85,0.25); }
.badge-blue    { background: var(--blue-dim); color: var(--blue); border: 1px solid rgba(59,130,246,0.25); }
.badge-muted   { background: rgba(107,122,143,0.1); color: var(--muted); border: 1px solid rgba(107,122,143,0.2); }

/* ── CALL BADGES ── */
.cbadge { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 5px; font-family: var(--font-mono); letter-spacing: 0.05em; }
.cbadge-buy   { background: rgba(0,200,150,0.15); color: var(--green); }
.cbadge-sell  { background: rgba(255,68,85,0.15); color: var(--red); }
.cbadge-hold  { background: rgba(255,153,51,0.15); color: var(--saffron); }
.cbadge-short { background: rgba(255,68,85,0.15); color: var(--red); }

/* ── CARDS ── */
.card-base { background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.card-hover { transition: all 0.3s; }
.card-hover:hover { border-color: var(--saffron-bd); transform: translateY(-2px); box-shadow: 0 14px 40px rgba(0,0,0,0.4); }

/* ── SECTION HELPERS ── */
.section-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; color: var(--saffron); margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.section-label::before { content: ''; display: inline-block; width: 18px; height: 1.5px; background: var(--saffron); }
.section-title { font-family: var(--font-display); font-size: clamp(24px,3vw,38px); font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; color: var(--white); }

/* ── SIDEBAR LAYOUT ── */
.app-wrap { display: flex; min-height: 100vh; position: relative; z-index: 1; }
.sidebar { width: var(--sidebar-w); background: var(--bg-card); border-right: 1px solid var(--border); display: flex; flex-direction: column; position: fixed; top: 0; left: 0; height: 100vh; z-index: 100; overflow-y: auto; }
.sidebar-logo { padding: 18px 18px 14px; border-bottom: 1px solid var(--border); }
.sidebar-nav { padding: 10px 10px; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.sb-section { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); padding: 12px 10px 4px; }
.sb-link { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 9px; color: var(--secondary); font-size: 13.5px; font-weight: 500; transition: all 0.2s; font-family: var(--font-body); }
.sb-link:hover { color: var(--white); background: rgba(255,255,255,0.04); }
.sb-link.active { color: var(--saffron); background: var(--saffron-dim); }
.sb-link i { font-size: 16px; width: 20px; flex-shrink: 0; }
.sb-badge { margin-left: auto; background: var(--saffron); color: #000; font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 10px; min-width: 18px; text-align: center; }
.sidebar-bottom { padding: 10px; border-top: 1px solid var(--border); }
.sb-user { display: flex; align-items: center; gap: 10px; padding: 10px 10px; border-radius: 9px; cursor: pointer; transition: background 0.2s; }
.sb-user:hover { background: rgba(255,255,255,0.04); }
.sb-avatar { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-size: 13px; font-weight: 700; flex-shrink: 0; }
.sb-user-info .name { font-size: 13px; font-weight: 600; color: var(--white); line-height: 1.2; }
.sb-user-info .role { font-size: 11px; color: var(--muted); }
.main-area { margin-left: var(--sidebar-w); flex: 1; min-width: 0; }
.page-header { padding: 16px 28px; border-bottom: 1px solid var(--border); background: rgba(7,11,20,0.85); backdrop-filter: blur(10px); display: flex; align-items: center; justify-content: space-between; gap: 16px; position: sticky; top: 0; z-index: 50; }
.page-title { font-family: var(--font-display); font-size: 18px; font-weight: 700; color: var(--white); }
.page-body { padding: 24px 28px; }

/* ── STAT CARDS ── */
.stat-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 18px 20px; }
.sc-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 8px; display: flex; align-items: center; justify-content: space-between; font-family: var(--font-body); }
.sc-val { font-family: var(--font-mono); font-size: 28px; font-weight: 700; line-height: 1; letter-spacing: -0.02em; }
.sc-change { font-size: 12px; margin-top: 6px; display: flex; align-items: center; gap: 4px; font-family: var(--font-body); }
.sc-icon { width: 36px; height: 36px; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-size: 17px; }

/* ── TABLE ── */
.data-table { width: 100%; border-collapse: separate; border-spacing: 0 3px; }
.data-table thead th { padding: 9px 14px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); border-bottom: 1px solid var(--border); white-space: nowrap; font-family: var(--font-body); }
.data-table tbody td { padding: 12px 14px; background: var(--bg-card); font-size: 13.5px; transition: background 0.15s; font-family: var(--font-body); }
.data-table tbody tr td:first-child { border-radius: 8px 0 0 8px; }
.data-table tbody tr td:last-child { border-radius: 0 8px 8px 0; }
.data-table tbody tr:hover td { background: var(--bg-elevated); }

/* ── SEARCH BAR ── */
.search-wrap { display: flex; align-items: center; gap: 9px; background: var(--bg-elevated); border: 1px solid var(--border); border-radius: 10px; padding: 9px 14px; transition: border-color 0.2s; }
.search-wrap:focus-within { border-color: var(--saffron-bd); }
.search-wrap i { color: var(--muted); flex-shrink: 0; }
.search-wrap input { background: transparent; border: none; outline: none; color: var(--white); font-size: 14px; width: 100%; }
.search-wrap input::placeholder { color: var(--muted); }

/* ── ACCURACY BAR ── */
.acc-bar { height: 4px; background: rgba(255,255,255,0.06); border-radius: 2px; overflow: hidden; margin-top: 5px; }
.acc-fill { height: 100%; background: linear-gradient(90deg,var(--green),#1dfa6a); border-radius: 2px; }

/* ── TAB NAV ── */
.tab-nav { display: flex; gap: 4px; background: var(--bg-elevated); border: 1px solid var(--border); border-radius: 10px; padding: 4px; width: fit-content; }
.tab-btn { padding: 7px 18px; font-size: 13px; font-weight: 600; border-radius: 7px; border: none; background: transparent; color: var(--muted); transition: all 0.2s; font-family: var(--font-body); }
.tab-btn:hover { color: var(--secondary); }
.tab-btn.active { background: var(--bg-card); color: var(--white); box-shadow: 0 2px 8px rgba(0,0,0,0.25); }

/* ── SEBI NOTICE ── */
.sebi-notice { background: rgba(59,130,246,0.06); border: 1px solid rgba(59,130,246,0.18); border-radius: 10px; padding: 12px 16px; display: flex; align-items: flex-start; gap: 10px; font-size: 12.5px; color: var(--secondary); line-height: 1.6; }
.sebi-notice i { color: var(--blue); font-size: 15px; margin-top: 1px; flex-shrink: 0; }

/* ── LIVE DOT ── */
.live-dot { display: inline-block; width: 7px; height: 7px; background: var(--green); border-radius: 50%; box-shadow: 0 0 6px var(--green); animation: livePulse 1.8s ease-in-out infinite; }
@keyframes livePulse { 0%,100%{opacity:1} 50%{opacity:0.3} }

/* ── STEPS ── */
.steps-wrap { display: flex; align-items: flex-start; gap: 0; margin-bottom: 28px; }
.step-item { display: flex; flex-direction: column; align-items: center; flex: 1; position: relative; }
.step-item:not(:last-child)::after { content: ''; position: absolute; top: 16px; left: 50%; width: 100%; height: 1px; background: var(--border); z-index: 0; }
.step-item.done:not(:last-child)::after { background: var(--green); }
.step-circle { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; border: 2px solid var(--border); color: var(--muted); background: var(--bg-elevated); z-index: 1; font-family: var(--font-mono); }
.step-item.active .step-circle { border-color: var(--saffron); color: var(--saffron); }
.step-item.done .step-circle { background: var(--green); border-color: var(--green); color: #000; }
.step-label { font-size: 11px; color: var(--muted); margin-top: 6px; text-align: center; }
.step-item.active .step-label { color: var(--saffron); font-weight: 600; }
.step-item.done .step-label { color: var(--green); }

/* ── FLAG LINE ── */
.flag-line { height: 3px; background: linear-gradient(90deg,#FF9933 0%,#FF9933 33.3%,#fff 33.3%,#fff 66.6%,#138808 66.6%,#138808 100%); width: 52px; border-radius: 2px; }

/* ── FOOTER ── */
.site-footer { background: var(--bg-elevated); border-top: 1px solid var(--border); padding: 44px 0 20px; position: relative; z-index: 1; }
.footer-brand { font-family: var(--font-display); font-size: 20px; font-weight: 800; }
.footer-brand span { color: var(--saffron); }
.footer-desc { font-size: 13px; color: var(--muted); line-height: 1.7; margin-top: 8px; max-width: 230px; }
.footer-heading { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--secondary); margin-bottom: 14px; }
.footer-links li { margin-bottom: 8px; }
.footer-links a { font-size: 13px; color: var(--muted); transition: color 0.2s; }
.footer-links a:hover { color: var(--saffron); }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 18px; margin-top: 36px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
.footer-bottom p { font-size: 12px; color: var(--muted); }

/* ── MISC UTILS ── */
.divider-line { height: 1px; background: var(--border); }
.section-pad { padding: 72px 0; }
.container-main { max-width: 1300px; margin: 0 auto; padding: 0 24px; }
.gap-label { display: flex; justify-content: space-between; align-items: center; margin-bottom: 5px; font-size: 11px; color: var(--muted); }
.box-glass { background: var(--bg-glass); border: 1px solid var(--border); border-radius: 12px; backdrop-filter: blur(12px); }

/* ── ANIMATIONS ── */
@keyframes fadeUp { from { opacity:0; transform:translateY(16px); } to { opacity:1; transform:translateY(0); } }
.a1 { animation: fadeUp .5s ease .05s both; }
.a2 { animation: fadeUp .5s ease .15s both; }
.a3 { animation: fadeUp .5s ease .25s both; }
.a4 { animation: fadeUp .5s ease .35s both; }
.a5 { animation: fadeUp .5s ease .45s both; }

/* ── RESPONSIVE ── */
@media (max-width: 991px) {
  .sidebar { transform: translateX(-100%); transition: transform .3s; }
  .sidebar.open { transform: translateX(0); box-shadow: 8px 0 30px rgba(0,0,0,.5); }
  .main-area { margin-left: 0; }
  .form-row { grid-template-columns: 1fr; }
}
@media (max-width: 767px) {
  .nav-links { display: none; }
  .page-body { padding: 16px; }
  .section-pad { padding: 48px 0; }
}
