:root {
  --navy: #0b1120;
  --navy-2: #111827;
  --card: rgba(15, 23, 42, 0.86);
  --card-2: rgba(30, 41, 59, 0.55);
  --green: #10b981;
  --green-soft: rgba(16, 185, 129, 0.14);
  --blue: #2563eb;
  --cyan: #38bdf8;
  --text: #f8fafc;
  --muted: #94a3b8;
  --faint: #64748b;
  --border: rgba(255, 255, 255, 0.1);
  --danger: #ef4444;
  --warning: #f59e0b;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 12% 2%, rgba(16,185,129,.22), transparent 28%),
    radial-gradient(circle at 85% 12%, rgba(37,99,235,.22), transparent 30%),
    radial-gradient(circle at 50% 90%, rgba(56,189,248,.10), transparent 26%),
    var(--navy);
  color: var(--text);
  overflow-x: hidden;
}

a { color: inherit; }
input, textarea, select { font-size: 16px; }

.wrap { max-width: 1440px; margin: 0 auto; padding: 28px; }

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  padding: 22px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.035);
  border-radius: 28px;
  box-shadow: 0 30px 80px rgba(0,0,0,.24);
  backdrop-filter: blur(10px);
  margin-bottom: 24px;
}

.brand { display: flex; gap: 18px; align-items: center; }
.eyebrow { color: #6ee7b7; letter-spacing: .22em; font-size: 12px; font-weight: 800; text-transform: uppercase; margin-bottom: 4px; }
h1 { margin: 0; font-size: 34px; line-height: 1.05; letter-spacing: -0.04em; }
.subtitle { color: var(--muted); font-size: 15px; margin-top: 7px; }
.topbar-right { display: grid; justify-items: end; gap: 12px; }
.brand-logo { width: 150px; max-width: 150px; height: auto; display: block; object-fit: contain; flex: 0 0 auto; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; align-items: center; }
.actions form { margin: 0; }
.broker-actions { justify-content: flex-start; margin-top: 16px; }

.pill, .button, button {
  border-radius: 999px;
  padding: 11px 15px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.055);
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 750;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
}

.button.primary, button.primary { color: #04111c; background: var(--green); border-color: var(--green); box-shadow: 0 12px 30px rgba(16,185,129,.25); }
button:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.grid { display: grid; gap: 18px; }
.grid > *, .card { min-width: 0; }
.kpis { grid-template-columns: repeat(5, minmax(0, 1fr)); margin-bottom: 18px; }

.card { border: 1px solid var(--border); background: var(--card); border-radius: 26px; padding: 20px; box-shadow: 0 24px 70px rgba(0,0,0,.20); }
.kpi { min-height: 155px; position: relative; overflow: hidden; }
.kpi:after { content: ""; position: absolute; inset: auto -50px -80px auto; width: 130px; height: 130px; background: rgba(16,185,129,.16); border-radius: 50%; filter: blur(8px); }
.kpi .icon { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: rgba(255,255,255,.07); color: #6ee7b7; font-size: 18px; margin-bottom: 26px; }
.kpi-label { color: var(--muted); font-size: 13px; margin-bottom: 6px; }
.kpi-value { font-weight: 900; font-size: 27px; letter-spacing: -0.04em; }
.kpi-value, .public-proof-card strong { max-width: 100%; overflow-wrap: anywhere; }
.kpi-note { color: var(--faint); font-size: 12px; margin-top: 8px; }

.main-grid { grid-template-columns: 2fr 1fr; margin-bottom: 18px; }
.two-grid { grid-template-columns: 1fr 1fr; margin-bottom: 18px; }
.section-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; margin-bottom: 18px; }
h2 { margin: 0; font-size: 20px; letter-spacing: -0.02em; }
.section-sub { color: var(--muted); font-size: 13px; margin-top: 5px; }

.chart { position: relative; height: 310px; border-radius: 22px; background: linear-gradient(rgba(148,163,184,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(148,163,184,.06) 1px, transparent 1px); background-size: 100% 20%, 12.5% 100%; overflow: hidden; border: 1px solid rgba(255,255,255,.06); }
.line-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.chart-axis { position: absolute; top: 0; right: 34px; bottom: 0; width: 96px; pointer-events: none; }
.chart-axis span { position: absolute; right: 0; width: 96px; transform: translateY(-50%); padding: 4px 9px; border-radius: 999px; background: rgba(15,23,42,.72); border: 1px solid rgba(255,255,255,.10); color: #cbd5e1; font-size: 11px; font-weight: 800; white-space: nowrap; text-align: right; }
.chart-hover-points { position: absolute; inset: 0; pointer-events: none; }
.chart-point { position: absolute; width: 24px; height: 24px; transform: translate(-50%, -50%); border-radius: 50%; pointer-events: auto; cursor: crosshair; }
.chart-point:after { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: #10B981; box-shadow: 0 0 0 5px rgba(16,185,129,.16); opacity: .18; transition: opacity .15s ease, transform .15s ease; }
.chart-point:hover:after { opacity: 1; transform: scale(1.15); }
.chart-point span, .bar-tooltip { position: absolute; z-index: 5; left: 50%; bottom: 26px; transform: translateX(-50%) translateY(6px); min-width: 170px; padding: 10px 12px; border-radius: 14px; background: rgba(2,6,23,.94); border: 1px solid rgba(16,185,129,.28); box-shadow: 0 18px 45px rgba(0,0,0,.34); color: var(--muted); font-size: 12px; line-height: 1.35; opacity: 0; visibility: hidden; transition: opacity .15s ease, transform .15s ease, visibility .15s ease; pointer-events: none; text-align: left; }
.chart-point.edge-left span { left: 0; transform: translateX(0) translateY(6px); }
.chart-point.edge-right span { left: auto; right: 0; transform: translateX(0) translateY(6px); }
.chart-point span strong, .bar-tooltip strong { display: block; margin-top: 3px; color: #6ee7b7; font-size: 15px; }
.bar-tooltip small { display: block; margin-top: 4px; color: #cbd5e1; font-size: 11px; }
.chart-point:hover span, .bar-col:hover .bar-tooltip { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.chart-point.edge-left:hover span, .chart-point.edge-right:hover span { transform: translateX(0) translateY(0); }
.chart-labels { position: absolute; left: 42px; right: 170px; bottom: 20px; display: flex; justify-content: space-between; color: var(--faint); font-size: 12px; }
.dynamic-labels { display: block; }
.dynamic-labels span { position: absolute; bottom: 0; white-space: nowrap; }
.chart-badge-inline { background: rgba(16,185,129,.12); color: #6ee7b7; border: 1px solid rgba(16,185,129,.25); padding: 8px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; white-space: nowrap; }

.bars { height: 310px; display: flex; align-items: flex-end; justify-content: space-around; gap: 12px; padding: 22px 16px 38px; border-radius: 22px; background: linear-gradient(rgba(148,163,184,.06) 1px, transparent 1px); background-size: 100% 20%; border: 1px solid rgba(255,255,255,.06); overflow-x: auto; }
.year-bars { height: 310px; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: stretch; gap: clamp(4px, 1vw, 14px); padding: 22px 14px 58px; border-radius: 22px; background: linear-gradient(rgba(148,163,184,.06) 1px, transparent 1px); background-size: 100% 20%; border: 1px solid rgba(255,255,255,.06); overflow: visible; }
.year-month-col { min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; position: relative; }
.year-group { height: 100%; display: flex; align-items: flex-end; justify-content: center; gap: clamp(2px, .35vw, 5px); min-width: 0; }
.bar-col { flex: 1 0 44px; height: 100%; display: flex; flex-direction: column; justify-content: center; gap: 0; position: relative; }
.year-series { flex: 1 1 0; min-width: 8px; max-width: 34px; }
.year-series:after { content: attr(title); display: none; }
.year-mini { position: absolute; left: 50%; bottom: -17px; transform: translateX(-50%); color: var(--faint); font-size: 9px; font-weight: 800; letter-spacing: .02em; }
.bar-stack { width: 100%; display: flex; flex-direction: column; }
.positive-stack { height: 72%; justify-content: flex-end; }
.negative-stack { height: 28%; justify-content: flex-start; }
.bar-zero-line { width: 100%; height: 1px; background: rgba(203,213,225,.24); }
.bar { width: 100%; border-radius: 10px 10px 0 0; background: var(--green); box-shadow: 0 0 24px rgba(16,185,129,.22); min-height: 0; }
.bar.cyan { background: var(--cyan); box-shadow: 0 0 24px rgba(56,189,248,.18); border-radius: 0 0 10px 10px; }
.bar.negative { background: var(--danger); box-shadow: 0 0 24px rgba(239,68,68,.18); }
.bar-col:hover .bar, .bar-col:hover .bar.cyan { filter: brightness(1.15); }
.bar-label { position: absolute; left: 50%; bottom: -37px; transform: translateX(-50%); color: var(--faint); font-size: 12px; white-space: nowrap; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 14px; color: var(--muted); font-size: 12px; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; background: var(--green); }
.dot.cyan { background: var(--cyan); }
.dot.red-dot { background: var(--danger); }
.year-swatch { display: inline-block; width: 18px; height: 9px; border-radius: 999px; margin-right: 6px; vertical-align: middle; background: rgba(148,163,184,.30); border: 1px solid rgba(255,255,255,.18); }
.year-swatch-0 { background: rgba(96,165,250,.55); }
.year-swatch-1 { background: rgba(248,113,113,.55); }
.year-swatch-2 { background: rgba(251,191,36,.55); }

.lifecycle { display: grid; gap: 11px; }
.life-step { display: flex; gap: 12px; padding: 14px; border-radius: 18px; background: rgba(255,255,255,.035); border: 1px solid rgba(255,255,255,.075); }
.check { flex: 0 0 24px; width: 24px; height: 24px; border-radius: 50%; background: var(--green-soft); color: #6ee7b7; display: grid; place-items: center; font-weight: 900; border: 1px solid rgba(16,185,129,.22); }
.muted-check { background: rgba(148,163,184,.10); color: #cbd5e1; border-color: rgba(148,163,184,.20); }
.life-title { font-weight: 850; font-size: 14px; }
.life-text { color: var(--muted); margin-top: 2px; font-size: 12px; line-height: 1.4; }

.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; overflow: hidden; border-radius: 18px; font-size: 13px; }
thead { background: rgba(255,255,255,.05); color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-size: 11px; }
th, td { padding: 13px 14px; text-align: left; border-bottom: 1px solid rgba(255,255,255,.075); vertical-align: middle; }
tbody tr { background: rgba(15,23,42,.35); }
.clipped { display: inline-block; max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.green { color: #6ee7b7; font-weight: 850; }
.red { color: #fca5a5; font-weight: 850; }
.positive { color: #6ee7b7; font-weight: 850; }
.negative { color: #fca5a5; font-weight: 850; }
.neutral { color: var(--muted); }
.blue-text { color: #93c5fd; font-weight: 850; }
.muted { color: var(--muted); }
.status { display: inline-block; padding: 6px 9px; border-radius: 999px; font-size: 11px; font-weight: 850; background: rgba(148,163,184,.10); color: #cbd5e1; white-space: nowrap; }
.status.closed { background: rgba(16,185,129,.12); color: #6ee7b7; }
.status.assigned { background: rgba(37,99,235,.16); color: #93c5fd; }
.status.open, .status.warn { background: rgba(245,158,11,.14); color: #fcd34d; }

.metric-list, .symbol-list { display: grid; gap: 10px; }
.metric-list div, .symbol-list div { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 13px 14px; border-radius: 16px; background: rgba(255,255,255,.035); border: 1px solid rgba(255,255,255,.075); }
.metric-list span, .symbol-list span { color: var(--muted); font-size: 13px; }
.metric-list strong, .symbol-list strong { font-size: 15px; }
.callout { margin-top: 14px; padding: 14px; border-radius: 18px; font-size: 13px; line-height: 1.45; color: #cbd5e1; background: rgba(255,255,255,.035); border: 1px solid rgba(255,255,255,.075); }
.callout.good { background: rgba(16,185,129,.10); border-color: rgba(16,185,129,.22); color: #a7f3d0; }
.callout.warn { background: rgba(245,158,11,.10); border-color: rgba(245,158,11,.24); color: #fde68a; }
.import-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 14px 0 16px; }
.import-summary div { padding: 14px; border-radius: 18px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); }
.import-summary strong { display: block; font-size: 24px; line-height: 1; color: #6ee7b7; margin-bottom: 6px; }
.import-summary span { color: var(--muted); font-size: 12px; }
.skipped-details { margin: 0 0 16px; padding: 14px; border-radius: 18px; background: rgba(245,158,11,.08); border: 1px solid rgba(245,158,11,.20); color: #fde68a; }
.skipped-details summary { cursor: pointer; font-weight: 850; }
.skipped-list { display: grid; gap: 8px; margin-top: 12px; max-height: 300px; overflow: auto; }
.skipped-list div { display: grid; grid-template-columns: 120px 1fr; gap: 10px; padding: 9px 10px; border-radius: 12px; background: rgba(15,23,42,.45); color: #cbd5e1; }
.skipped-list span { color: var(--muted); }
.success-card { margin-bottom: 18px; border-color: rgba(16,185,129,.35); }
.error-card { margin-bottom: 18px; border-color: rgba(239,68,68,.45); color: #fecaca; }
.error-card ul { margin: 10px 0 0; padding-left: 20px; }
.trade-form { display: grid; gap: 14px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.form-grid.compact { gap: 12px; }
.field { display: grid; gap: 7px; }
.field label { color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.field input, .field select, .field textarea {
  width: 100%;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 14px;
  background: rgba(15,23,42,.72);
  color: var(--text);
  padding: 12px 13px;
  outline: none;
}
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: rgba(16,185,129,.55); box-shadow: 0 0 0 3px rgba(16,185,129,.10); }
.help-text { color: var(--faint); font-size: 12px; line-height: 1.35; }
.customer-workflow-hero { display: flex; justify-content: space-between; align-items: stretch; gap: 20px; margin-bottom: 18px; background: linear-gradient(135deg, rgba(16,185,129,.13), rgba(37,99,235,.07) 50%, rgba(15,23,42,.88)); }
.customer-workflow-hero h2 { font-size: 30px; margin: 9px 0 8px; }
.customer-workflow-hero p { margin: 0; color: var(--muted); max-width: 720px; line-height: 1.5; }
.workflow-metrics { display: grid; grid-template-columns: repeat(3, minmax(120px, 1fr)); gap: 10px; min-width: min(520px, 100%); }
.workflow-metrics div { padding: 14px; border-radius: 18px; background: rgba(255,255,255,.045); border: 1px solid rgba(255,255,255,.08); }
.workflow-metrics span { display: block; color: var(--muted); font-size: 12px; margin-bottom: 6px; }
.workflow-metrics strong { display: block; font-size: 20px; letter-spacing: -.03em; }
.form-section-title { display: flex; align-items: center; gap: 10px; padding: 13px 14px; border-radius: 18px; background: rgba(255,255,255,.035); border: 1px solid rgba(255,255,255,.075); }
.form-section-title span { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--green-soft); color: #6ee7b7; font-weight: 900; }
.form-section-title strong { font-size: 14px; }
.form-section-title em { color: var(--muted); font-size: 12px; font-style: normal; margin-left: auto; text-align: right; }
.workflow-rule-list div { align-items: flex-start; }
.preview-legend { display: flex; flex-wrap: wrap; gap: 12px; margin: -4px 0 16px; color: var(--muted); font-size: 12px; }
.preview-legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; background: var(--green); }
.legend-dot.review { background: var(--warning); }
.legend-dot.skipped { background: var(--faint); }
.preview-table input, .preview-table select, .preview-table textarea { width: 100%; min-width: 112px; border: 1px solid rgba(255,255,255,.10); border-radius: 12px; background: rgba(15,23,42,.72); color: var(--text); padding: 9px 10px; outline: none; }
.preview-table input[type="checkbox"] { width: 20px; min-width: 20px; height: 20px; accent-color: var(--green); }
.preview-table .mini-input { margin-top: 7px; }
.preview-table .needs-review-row { background: rgba(245,158,11,.07); }
.preview-table .ready-row { background: rgba(16,185,129,.045); }
.preview-table .assignment-review-row { outline: 1px solid rgba(245,158,11,.28); outline-offset: -1px; }

.customer-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 22px;
  margin-bottom: 18px;
  background: linear-gradient(135deg, rgba(16,185,129,.14), rgba(37,99,235,.08) 48%, rgba(15,23,42,.86));
}
.customer-hero h2 { font-size: 32px; margin-top: 8px; }
.customer-hero p { max-width: 680px; margin: 8px 0 0; color: var(--muted); }
.plan-badge { display: inline-flex; width: fit-content; border: 1px solid rgba(16,185,129,.28); background: var(--green-soft); color: #6ee7b7; border-radius: 999px; padding: 6px 10px; font-size: 11px; font-weight: 850; text-transform: uppercase; letter-spacing: .12em; }
.customer-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.customer-pnl-stack { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr) minmax(0, 1fr); gap: 18px; margin-bottom: 14px; }
.customer-total-card { min-height: 210px; }
.customer-total-card .kpi-value { font-size: clamp(34px, 5vw, 56px); color: #6ee7b7; }
.customer-component-card .kpi-value { font-size: clamp(28px, 3vw, 36px); }
.premium-card .icon, .premium-card:after { color: #fcd34d; background: rgba(245,158,11,.13); }
.premium-card .kpi-value { color: #fcd34d; }
.trading-card .icon, .trading-card:after { color: #93c5fd; background: rgba(37,99,235,.13); }
.trading-card .kpi-value { color: #93c5fd; }
.nesting-note { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 18px; color: #cbd5e1; line-height: 1.45; }
.nesting-note strong { color: #6ee7b7; white-space: nowrap; }
.customer-secondary-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.mini-metric { border: 1px solid rgba(255,255,255,.075); background: rgba(15,23,42,.55); border-radius: 18px; padding: 15px; }
.mini-metric span, .mini-metric small { display: block; color: var(--muted); font-size: 12px; }
.mini-metric strong { display: block; margin: 5px 0 4px; font-size: 22px; letter-spacing: -.03em; }
.monthly-chart-grid { grid-template-columns: 1fr; margin-bottom: 18px; }
.customer-chart-card { color: #6ee7b7; }
.customer-chart-card.premium-chart { color: #fcd34d; }
.customer-chart-card.trading-chart { color: #93c5fd; }
.customer-chart-card h2, .customer-chart-card .section-sub, .customer-chart-card .chart-footnotes, .customer-chart-card .customer-chart-summary span { color: var(--text); }
.customer-chart-card .section-sub, .customer-chart-card .chart-footnotes span, .customer-chart-card .customer-chart-summary span { color: var(--muted); }
.customer-chart-head { align-items: center; }
.customer-chart-summary { min-width: 132px; padding: 10px 12px; border-radius: 16px; border: 1px solid rgba(255,255,255,.075); background: rgba(255,255,255,.035); text-align: right; }
.customer-chart-summary span { display: block; font-size: 11px; margin-bottom: 3px; }
.customer-chart-summary strong { font-size: 18px; }
.monthly-line-chart { position: relative; height: 250px; border-radius: 22px; background: linear-gradient(rgba(148,163,184,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(148,163,184,.04) 1px, transparent 1px); background-size: 100% 25%, 8.33% 100%; overflow: hidden; border: 1px solid rgba(255,255,255,.06); }
.monthly-line-chart .zero-line { stroke: rgba(203,213,225,.38); stroke-width: 2; stroke-dasharray: 8 8; }
.monthly-axis { right: 28px; }
.monthly-point:after { background: currentColor; box-shadow: 0 0 0 5px color-mix(in srgb, currentColor 18%, transparent); }
.customer-month-labels { left: 52px; right: 60px; bottom: 16px; display: block; }
.customer-month-labels span { position: absolute; transform: translateX(-50%); color: var(--faint); font-size: 11px; }
.chart-footnotes { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 12px; font-size: 12px; }
.chart-footnotes strong { color: var(--text); }
.customer-action-grid { align-items: stretch; }
.customer-sync-card { display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center; }
.sync-icon { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 16px; color: #6ee7b7; background: var(--green-soft); border: 1px solid rgba(16,185,129,.22); font-size: 22px; font-weight: 900; }
.promo-card { background: linear-gradient(135deg, rgba(16,185,129,.13), rgba(15,23,42,.90)); }
.promo-card p { margin: 8px 0 16px; color: var(--muted); }
.promo-label { color: #6ee7b7; text-transform: uppercase; letter-spacing: .12em; font-size: 11px; font-weight: 850; }
.disclaimer-footer { color: var(--faint); font-size: 12px; line-height: 1.5; margin-top: 18px; padding: 0 4px 16px; }
.positions-hero { align-items: stretch; }
.broker-hero { align-items: stretch; }
.connected-list { display: grid; gap: 9px; margin-top: 14px; }
.connected-list div { display: flex; justify-content: space-between; gap: 12px; padding: 12px 13px; border-radius: 15px; background: rgba(16,185,129,.08); border: 1px solid rgba(16,185,129,.18); }
.connected-list span { color: var(--muted); }
.positions-stack { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.positions-list { display: grid; gap: 9px; }
.position-row { display: grid; grid-template-columns: 1.35fr .7fr .85fr .95fr .9fr; gap: 12px; align-items: center; padding: 13px 15px; border-radius: 16px; background: rgba(15,23,42,.48); border: 1px solid rgba(255,255,255,.075); color: var(--text); text-decoration: none; }
.position-row.active { border-color: rgba(16,185,129,.35); background: rgba(16,185,129,.07); }
.position-row.position-head { background: transparent; border: none; padding-top: 0; padding-bottom: 3px; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; font-weight: 850; }
.position-row strong { font-size: 15px; margin-right: 8px; }
.position-row em { font-style: normal; }
.position-empty { padding: 20px; border-radius: 16px; background: rgba(255,255,255,.035); border: 1px solid rgba(255,255,255,.075); }
.position-detail { border-color: rgba(16,185,129,.20); }
.position-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.position-metrics div { padding: 15px; border-radius: 18px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); }
.position-metrics span, .position-metrics small { display: block; color: var(--muted); font-size: 12px; line-height: 1.35; }
.position-metrics strong { display: block; margin: 6px 0 4px; font-size: 23px; letter-spacing: -.03em; }
.compact-head { margin-top: 4px; margin-bottom: 10px; }
.compact-head h3 { margin: 0; font-size: 16px; }

.public-performance {
  background:
    radial-gradient(circle at 18% 8%, rgba(16,185,129,.30), transparent 30%),
    radial-gradient(circle at 80% 2%, rgba(56,189,248,.20), transparent 28%),
    linear-gradient(180deg, #07111f 0%, #0b1120 48%, #020617 100%);
}
.public-wrap { max-width: 1280px; padding-top: 34px; padding-bottom: 34px; }
.public-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, .65fr);
  gap: 28px;
  align-items: stretch;
  margin-bottom: 18px;
  padding: clamp(24px, 4vw, 42px);
  background:
    linear-gradient(135deg, rgba(16,185,129,.18), rgba(37,99,235,.10) 48%, rgba(15,23,42,.90)),
    rgba(15,23,42,.88);
  border-color: rgba(16,185,129,.22);
}
.public-logo { margin-bottom: 28px; width: 190px; max-width: 190px; }
.public-hero h1 { font-size: clamp(42px, 7vw, 78px); max-width: 850px; }
.public-hero p { max-width: 760px; margin: 18px 0 0; color: #cbd5e1; font-size: clamp(16px, 2vw, 20px); line-height: 1.55; }
.public-proof-card {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 260px;
  padding: 24px;
  border-radius: 28px;
  border: 1px solid rgba(16,185,129,.24);
  background: radial-gradient(circle at 20% 10%, rgba(16,185,129,.20), transparent 34%), rgba(2,6,23,.55);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}
.public-proof-card span, .public-proof-card small { color: var(--muted); line-height: 1.4; }
.public-proof-card strong { display: block; margin: 9px 0; color: #6ee7b7; font-size: clamp(34px, 3.8vw, 48px); letter-spacing: -.06em; line-height: .98; white-space: nowrap; }
.public-kpis .kpi { background: linear-gradient(180deg, rgba(15,23,42,.90), rgba(15,23,42,.70)); }
.public-kpis .kpi-value { font-size: clamp(24px, 2.6vw, 36px); }
.public-main-grid { grid-template-columns: 1fr; margin-bottom: 18px; }
.public-main-grid .chart { height: clamp(310px, 40vw, 420px); }
.public-disclaimer {
  max-width: 980px;
  margin: 24px auto 0;
  padding: 16px 20px;
  text-align: center;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 18px;
  background: rgba(15,23,42,.52);
}
.embed-mode { background: transparent; }
.embed-mode .public-wrap { padding: 0; max-width: none; }
.embed-mode .public-kpis { grid-template-columns: repeat(5, minmax(150px, 1fr)); }
.embed-mode .card { box-shadow: none; }
.embed-mode .public-disclaimer { margin: 14px 0 0; }
.compact-premium-card {
  padding: clamp(16px, 2.4vw, 24px);
  border-radius: 24px;
  background:
    radial-gradient(circle at 14% 0%, rgba(16,185,129,.20), transparent 34%),
    linear-gradient(135deg, rgba(15,23,42,.96), rgba(2,6,23,.94));
  overflow: hidden;
}
.compact-premium-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(210px, .38fr);
  gap: 18px;
  align-items: stretch;
  margin-bottom: 16px;
}
.compact-premium-head h1 { font-size: clamp(24px, 4vw, 42px); }
.compact-premium-head p { margin: 8px 0 0; color: #cbd5e1; font-size: 14px; line-height: 1.45; max-width: 620px; }
.compact-premium-stat {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 16px;
  border-radius: 20px;
  border: 1px solid rgba(16,185,129,.25);
  background: rgba(255,255,255,.045);
}
.compact-premium-stat span, .compact-premium-stat small { color: var(--muted); font-size: 12px; font-weight: 750; }
.compact-premium-stat strong { display: block; margin: 4px 0; color: #6ee7b7; font-size: clamp(30px, 5vw, 46px); line-height: .98; letter-spacing: -.06em; white-space: nowrap; }
.compact-year-bars { height: 190px; padding: 14px 10px 42px; border-radius: 18px; }
.compact-year-bars .bar-label { bottom: -29px; font-size: 10px; }
.compact-year-bars .year-mini { bottom: -14px; font-size: 7px; }
.compact-premium-legend { margin-top: 10px; font-size: 11px; }
.compact-premium-note { margin: 8px 0 0; color: var(--faint); font-size: 11px; line-height: 1.35; text-align: center; }

@media (max-width: 1180px) {
  .kpis { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .customer-pnl-stack { grid-template-columns: 1fr; }
  .positions-stack, .position-metrics { grid-template-columns: 1fr; }
  .position-row { grid-template-columns: 1.2fr .55fr .85fr; }
  .position-row span:nth-child(4), .position-row span:nth-child(5) { display: none; }
  .customer-secondary-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .customer-workflow-hero { flex-direction: column; }
  .workflow-metrics { min-width: 0; }
  .public-hero { grid-template-columns: 1fr; }
  .embed-mode .public-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .compact-premium-head { grid-template-columns: 1fr; }
  .main-grid, .two-grid { grid-template-columns: 1fr; }
  .topbar { align-items: flex-start; flex-direction: column; }
  .brand { align-items: flex-start; flex-direction: column; }
  .topbar-right { justify-items: start; }
  .brand-logo { width: 130px; max-width: 130px; }
  .actions { justify-content: flex-start; }
}

@media (max-width: 640px) {
  .wrap { padding: 16px; }
  h1 { font-size: 27px; }
  .customer-hero, .nesting-note { flex-direction: column; }
  .customer-hero h2 { font-size: 26px; }
  .customer-workflow-hero h2 { font-size: 25px; }
  .workflow-metrics { grid-template-columns: 1fr; }
  .form-section-title { align-items: flex-start; flex-wrap: wrap; }
  .form-section-title em { margin-left: 36px; text-align: left; width: 100%; }
  .customer-hero-actions, .customer-hero-actions .button { width: 100%; justify-content: stretch; }
  .customer-hero-actions .button { text-align: center; }
  .customer-secondary-strip { grid-template-columns: 1fr; }
  .customer-sync-card { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: 1fr; }
  .public-hero h1 { font-size: 36px; }
  .public-hero { padding: 18px 16px; border-radius: 24px; }
  .public-logo { width: 135px; max-width: 135px; margin-bottom: 70px; }
  .public-proof-card { min-height: 190px; }
  .public-proof-card strong { font-size: clamp(30px, 10vw, 38px); }
  .public-kpis .kpi-value { font-size: clamp(28px, 8vw, 34px); }
  .embed-mode .public-kpis { grid-template-columns: 1fr; }
  .compact-premium-card { padding: 14px; border-radius: 20px; }
  .compact-premium-stat { padding: 12px; }
  .compact-premium-head { gap: 12px; margin-bottom: 12px; }
  .compact-premium-head h1 { font-size: 24px; }
  .compact-premium-head p { font-size: 12px; }
  .compact-premium-stat strong { font-size: 31px; }
  .card { padding: 16px; }
  .form-grid { grid-template-columns: 1fr; }
  .import-summary { grid-template-columns: 1fr; }
  .skipped-list div { grid-template-columns: 1fr; }
  .section-head { flex-direction: column; align-items: flex-start; }
  table { font-size: 12px; }
  th, td { padding: 10px 9px; }
  .chart, .bars, .year-bars { height: 250px; }
  .compact-year-bars { height: 170px; }
  .year-bars { gap: 4px; padding: 18px 8px 52px; }
  .compact-year-bars { padding: 12px 6px 40px; }
  .year-group { gap: 2px; }
  .year-mini { font-size: 7px; }
  .bar-label { font-size: 10px; }
}
