:root{
  --bg: #f7f8fb;
  --card: #ffffff;
  --border: rgba(15, 23, 42, .08);
  --muted: rgba(15, 23, 42, .6);
  --ink: #0f172a;
}

html {
  height: 100%;
}

body {
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1 0 auto;
}

header {
  position: relative;
  z-index: 20;
}

footer {
  margin-top: auto;
  background: rgba(255, 255, 255, .9);
}

.navbar-brand {
  letter-spacing: .01em;
}

.nav-link {
  color: rgba(15, 23, 42, .76);
}

.nav-link:hover {
  color: var(--ink);
}

.card,
.section-card,
.auth-card,
.plan-card,
.info-card,
.step-card {
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--card);
  box-shadow: 0 10px 30px rgba(15, 23, 42, .05);
}

.auth-card {
  border-radius: 24px;
}

.btn {
  border-radius: 12px;
}

.form-control,
.form-select,
.input-group-text {
  border-radius: 12px;
}

.form-control:focus,
.form-select:focus {
  box-shadow: 0 0 0 .25rem rgba(13,110,253,.12);
}

.badge-soft {
  background: rgba(13,110,253,.10);
  color: #0d6efd;
  border: 1px solid rgba(13,110,253,.15);
}

.public-page {
  max-width: 1160px;
  margin: 0 auto;
}

.public-hero {
  padding-top: .5rem;
}

.page-title {
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.05;
}

.page-subtitle {
  color: var(--muted);
  font-size: 1.05rem;
}

.info-card,
.step-card,
.plan-card {
  height: 100%;
}

.plan-card.popular {
  border-color: rgba(13,110,253,.28);
  box-shadow: 0 16px 40px rgba(13,110,253,.08);
}

.plan-price {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1;
}

.feature-list {
  padding-left: 1.1rem;
  margin-bottom: 0;
  color: var(--muted);
}

.feature-list li + li {
  margin-top: .55rem;
}

.step-number {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(13,110,253,.10);
  color: #0d6efd;
  font-weight: 700;
}

.auth-shell {
  width: 100%;
  max-width: 470px;
  margin: 0 auto;
}

.auth-shell.auth-wide {
  max-width: 580px;
}

.auth-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.auth-note {
  border: 1px dashed rgba(13,110,253,.22);
  background: rgba(13,110,253,.05);
  border-radius: 16px;
  padding: .85rem 1rem;
}

.auth-links {
  color: var(--muted);
}

.table thead th {
  color: var(--muted);
  font-weight: 600;
  border-bottom-color: var(--border);
}

.accordion,
.accordion-item,
.accordion-button {
  border-radius: 16px !important;
}

.accordion-item {
  border: 1px solid var(--border);
}

.accordion-button:not(.collapsed) {
  background: rgba(13,110,253,.06);
  color: var(--ink);
  box-shadow: none;
}

.app-shell{
  min-height: 100vh;
  flex: 1 0 auto;
  display: grid;
  grid-template-columns: 280px 1fr;
}

.app-sidebar{
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}

.app-topbar{ position: sticky; top: 0; z-index: 10; }

.brand-dot{
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #0d6efd;
  box-shadow: 0 0 0 6px rgba(13,110,253,.15);
}

.navitem{
  display:flex;
  align-items:center;
  gap:10px;
  padding: 10px 12px;
  border-radius: 12px;
  color: rgba(15,23,42,.85);
  text-decoration: none;
}

.navitem:hover{ background: rgba(15,23,42,.04); }
.navitem i{ font-size: 18px; color: rgba(15,23,42,.65); }

.avatar{
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display:flex;
  align-items:center;
  justify-content:center;
  background: rgba(15,23,42,.06);
  color: rgba(15,23,42,.8);
  font-weight: 600;
}

.kpi{
  padding: 18px;
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 16px;
}

.kpi .label{ color: var(--muted); font-size: .85rem; }
.kpi .value{ font-weight: 700; font-size: 1.5rem; }

@media (max-width: 992px){
  .app-shell{ grid-template-columns: 1fr; }
  .app-sidebar{ position: relative; height: auto; }
  .page-title { line-height: 1.1; }
}

.trader-hero {
    position: relative;
    overflow: hidden;
    padding: 2.5rem;
    border-radius: 32px;
    background: radial-gradient(circle at 0% 0%, rgba(59,130,246,.24), transparent 32%), radial-gradient(circle at 100% 20%, rgba(16,185,129,.18), transparent 28%), linear-gradient(135deg, #081120 0%, #0f172a 52%, #111827 100%);
    border: 1px solid rgba(255,255,255,.08);
    box-shadow: 0 30px 80px rgba(15, 23, 42, .18);
    color: #fff;
}

    .trader-hero::before {
        content: "";
        position: absolute;
        inset: auto -10% -30% auto;
        width: 460px;
        height: 460px;
        border-radius: 999px;
        background: rgba(13,110,253,.16);
        filter: blur(80px);
        pointer-events: none;
    }

.trader-pill {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    padding: .65rem 1rem;
    border-radius: 999px;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.12);
    color: rgba(255,255,255,.92);
    font-size: .95rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

.trader-hero-title {
    font-size: clamp(2.5rem, 5vw, 4.35rem);
    line-height: .98;
    font-weight: 800;
    letter-spacing: -.03em;
    max-width: 11ch;
    margin-bottom: 1rem;
}

.trader-hero-subtitle {
    font-size: 1.08rem;
    line-height: 1.75;
    color: rgba(255,255,255,.78);
    max-width: 680px;
}

.hero-checks {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem 1rem;
}

    .hero-checks span {
        display: inline-flex;
        align-items: center;
        gap: .45rem;
        color: rgba(255,255,255,.88);
        font-size: .95rem;
    }

    .hero-checks i {
        color: #60a5fa;
    }

.hero-value-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.hero-value-item {
    padding: 1rem 1.1rem;
    border-radius: 20px;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.10);
    backdrop-filter: blur(10px);
}

    .hero-value-item .value {
        font-size: 1.45rem;
        font-weight: 800;
        color: #fff;
    }

    .hero-value-item .label {
        font-size: .92rem;
        color: rgba(255,255,255,.68);
    }

.market-stage {
    position: relative;
    min-height: 560px;
}

.market-stage-main {
    position: relative;
    z-index: 2;
    overflow: hidden;
    border-radius: 28px;
    border: 1px solid rgba(255,255,255,.12);
    background: rgba(7, 15, 30, .74);
    box-shadow: 0 28px 70px rgba(0, 0, 0, .35);
}

.stage-window {
    display: flex;
    align-items: center;
    gap: .4rem;
    padding: .9rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,.08);
    background: rgba(255,255,255,.04);
}

    .stage-window span {
        width: 11px;
        height: 11px;
        border-radius: 999px;
        background: rgba(255,255,255,.4);
    }

.market-stage-main img {
    display: block;
    width: 100%;
    height: auto;
}

.market-stage-terminal {
    position: absolute;
    right: -8px;
    bottom: 18px;
    z-index: 3;
    width: min(44%, 260px);
    border-radius: 22px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.14);
    background: rgba(15,23,42,.88);
    box-shadow: 0 22px 55px rgba(0,0,0,.28);
}

    .market-stage-terminal img {
        display: block;
        width: 100%;
        height: auto;
    }

.market-stage-badge {
    position: absolute;
    z-index: 4;
    display: flex;
    align-items: flex-start;
    gap: .85rem;
    max-width: 280px;
    padding: .95rem 1rem;
    border-radius: 18px;
    background: rgba(255,255,255,.10);
    border: 1px solid rgba(255,255,255,.14);
    backdrop-filter: blur(14px);
    box-shadow: 0 16px 35px rgba(0,0,0,.18);
}

    .market-stage-badge i {
        font-size: 1.1rem;
        color: #93c5fd;
        margin-top: .1rem;
    }

    .market-stage-badge strong {
        display: block;
        color: #fff;
        line-height: 1.2;
    }

    .market-stage-badge span {
        display: block;
        font-size: .88rem;
        color: rgba(255,255,255,.72);
        margin-top: .15rem;
    }

.stage-badge-top {
    top: 18px;
    left: -20px;
}

.stage-badge-middle {
    right: 18px;
    top: 110px;
}

.attention-card {
    padding: 1.4rem;
    border-radius: 22px;
    border: 1px solid rgba(15,23,42,.08);
    background: #fff;
    box-shadow: 0 14px 40px rgba(15, 23, 42, .05);
}

.attention-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, rgba(13,110,253,.12), rgba(13,110,253,.04));
    color: var(--brand);
    font-size: 1.25rem;
}

.attention-card h5 {
    font-weight: 700;
    margin-bottom: .65rem;
}

.attention-card p {
    color: var(--muted);
    line-height: 1.7;
}

.landing-block {
    padding: 2rem;
    border-radius: 28px;
}

.section-tag {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .45rem .85rem;
    border-radius: 999px;
    background: rgba(13,110,253,.08);
    color: var(--brand);
    font-size: .92rem;
    font-weight: 700;
}

    .section-tag.dark {
        background: rgba(15,23,42,.08);
        color: #0f172a;
    }

.landing-title {
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.05;
    font-weight: 800;
    letter-spacing: -.03em;
    margin-bottom: .9rem;
}

.landing-copy {
    color: var(--muted);
    font-size: 1.03rem;
    line-height: 1.8;
    max-width: 760px;
}

.onboarding-copy {
    max-width: 700px;
}

.landing-check-list {
    list-style: none;
    padding: 0;
    margin: 1.25rem 0 0;
}

    .landing-check-list li {
        display: flex;
        align-items: flex-start;
        gap: .7rem;
        margin-bottom: .85rem;
        color: var(--muted);
    }

    .landing-check-list i {
        color: var(--brand);
        margin-top: .2rem;
        font-size: 1rem;
    }

.dashboard-frame {
    overflow: hidden;
    border-radius: 26px;
    border: 1px solid rgba(15,23,42,.08);
    box-shadow: 0 20px 55px rgba(15, 23, 42, .08);
    background: #fff;
}

    .dashboard-frame img {
        display: block;
        width: 100%;
        height: auto;
    }

.onboarding-step {
    padding: 1.4rem;
    border-radius: 22px;
    border: 1px solid rgba(15,23,42,.08);
    background: #fff;
    box-shadow: 0 14px 40px rgba(15, 23, 42, .05);
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    margin-bottom: 1rem;
    background: rgba(13,110,253,.1);
    color: var(--brand);
    font-weight: 800;
}

.onboarding-step h5 {
    font-weight: 700;
    margin-bottom: .65rem;
}

.onboarding-step p {
    color: var(--muted);
    line-height: 1.7;
}

.landing-plan-card {
    position: relative;
    padding: 1.5rem;
    border-radius: 24px;
    border: 1px solid rgba(15,23,42,.08);
    background: #fff;
    box-shadow: 0 14px 40px rgba(15, 23, 42, .05);
}

    .landing-plan-card.featured {
        border-color: rgba(13,110,253,.28);
        box-shadow: 0 20px 55px rgba(13,110,253,.14);
        transform: translateY(-4px);
    }

.landing-plan-badge {
    display: inline-flex;
    align-items: center;
    padding: .45rem .75rem;
    border-radius: 999px;
    background: rgba(15,23,42,.06);
    color: #0f172a;
    font-size: .82rem;
    font-weight: 700;
}

    .landing-plan-badge.primary {
        background: rgba(13,110,253,.12);
        color: var(--brand);
    }

    .landing-plan-badge.warning {
        background: rgba(245,158,11,.12);
        color: #a16207;
    }

.plan-price {
    font-size: 2.35rem;
    line-height: 1;
    font-weight: 800;
    margin-top: 1rem;
}

    .plan-price span {
        font-size: 1rem;
        color: var(--muted);
        font-weight: 600;
        margin-left: .2rem;
    }

.final-cta {
    padding: 2rem;
    border-radius: 28px;
    background: radial-gradient(circle at top right, rgba(13,110,253,.12), transparent 26%), linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
    border: 1px solid rgba(15,23,42,.08);
    box-shadow: 0 18px 48px rgba(15, 23, 42, .06);
}

.final-cta-title {
    font-size: clamp(2rem, 4vw, 2.9rem);
    line-height: 1.04;
    font-weight: 800;
    letter-spacing: -.03em;
    margin-bottom: .75rem;
}

.final-cta-copy {
    color: var(--muted);
    font-size: 1.04rem;
}

@media (max-width: 1199px) {
    .hero-value-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .market-stage {
        min-height: 500px;
    }
}

@media (max-width: 991px) {
    .trader-hero {
        padding: 1.5rem;
        border-radius: 24px;
    }

    .trader-hero-title {
        max-width: none;
    }

    .market-stage {
        min-height: auto;
        padding-top: 1rem;
    }

    .stage-badge-top {
        top: 8px;
        left: 8px;
    }

    .stage-badge-middle {
        right: 8px;
        top: 96px;
    }

    .market-stage-terminal {
        position: relative;
        right: auto;
        bottom: auto;
        width: min(72%, 320px);
        margin: -26px auto 0;
    }

    .landing-block,
    .final-cta {
        padding: 1.5rem;
    }
}

@media (max-width: 575px) {
    .hero-value-grid {
        grid-template-columns: 1fr 1fr;
    }

    .market-stage-badge {
        position: static;
        max-width: none;
        margin-bottom: .85rem;
    }

    .market-stage-terminal {
        width: 88%;
        margin-top: 1rem;
    }

    .landing-plan-card.featured {
        transform: none;
    }
}