@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --navy: #000a52; --navy-2: #121d6b; --orange: #e35d12; --orange-2: #f07a33;
  --ink: #1d2045; --muted: #6b6f8e; --line: #e4e6f0; --bg: #f4f5fa; --card: #fff;
  --green: #1a9e5a; --red: #c0392b; --amber: #d68a00;
  --radius: 12px; --shadow: 0 2px 10px rgba(27, 30, 75, .07);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif; color: var(--ink); background: var(--bg); font-size: 15px; line-height: 1.5; }
a { color: var(--orange); }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; }
img { max-width: 100%; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.hidden { display: none !important; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }

/* ---------- buttons & forms ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; border: 0; cursor: pointer; background: var(--orange); color: #fff; font: 600 15px/1 inherit; font-family: inherit; padding: 13px 22px; border-radius: 8px; text-decoration: none; transition: .15s; }
.btn:hover { background: #e05812; }
.btn:disabled { opacity: .6; cursor: progress; }
.btn-navy { background: var(--navy); } .btn-navy:hover { background: var(--navy-2); }
.btn-ghost { background: transparent; color: var(--navy); border: 1.5px solid var(--line); } .btn-ghost:hover { background: #fff; border-color: var(--navy); }
.btn-green { background: var(--green); } .btn-red { background: var(--red); }
.btn-sm { padding: 8px 12px; font-size: 13px; }
label { display: block; font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 14px; }
label .req { color: var(--orange); }
input, select, textarea { display: block; width: 100%; margin-top: 6px; padding: 11px 12px; border: 1.5px solid var(--line); border-radius: 8px; font: 400 15px inherit; font-family: inherit; color: var(--ink); background: #fff; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px rgba(227, 93, 18, .18); }
input[type=checkbox], input[type=radio] { display: inline-block; width: auto; margin: 0 8px 0 0; accent-color: var(--orange); }
.check { display: flex; align-items: flex-start; font-weight: 500; }
.field-error { color: var(--red); font-size: 12px; font-weight: 500; margin-top: 4px; }
.has-error input, .has-error select, .has-error textarea { border-color: var(--red); }
.hint { font-weight: 400; color: var(--muted); font-size: 12px; margin-top: 4px; }
.grid { display: grid; gap: 0 18px; }
.g2 { grid-template-columns: repeat(2, 1fr); } .g3 { grid-template-columns: repeat(3, 1fr); } .g4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 760px) { .g2, .g3, .g4 { grid-template-columns: 1fr; } }

.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.card.narrow { max-width: 460px; width: 100%; }
.alert { padding: 12px 14px; border-radius: 8px; font-size: 14px; margin-bottom: 14px; }
.alert-err { background: #fdecea; color: #8e2b20; } .alert-ok { background: #e7f6ee; color: #12623a; } .alert-info { background: #fff4ec; color: #8a3b0f; }
.badge { display: inline-block; font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 99px; background: #eef0f7; color: var(--navy); text-transform: capitalize; white-space: nowrap; }
.b-approved, .b-confirmed, .b-paid { background: #e2f5ea; color: #12623a; }
.b-pending, .b-payable { background: #fff1d6; color: #8a5a00; }
.b-rejected, .b-cancelled, .b-void, .b-suspended { background: #fde3e0; color: #8e2b20; }

/* ---------- top bar ---------- */
.topbar { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 14px; }
.logo { font-weight: 800; letter-spacing: 5px; color: var(--navy); font-size: 20px; text-decoration: none; }
.logo b { color: var(--orange); }
.brand-mini { font-weight: 800; color: var(--navy); margin-bottom: 14px; } .brand-mini span { color: var(--orange); }
.nav a { margin-left: 18px; color: var(--navy); text-decoration: none; font-weight: 500; font-size: 14px; }

/* ---------- landing ---------- */
.hero { background: #fff; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1fr 1.1fr; align-items: center; gap: 30px; padding-top: 36px; padding-bottom: 20px; }
.hero h1 { font-size: 64px; font-weight: 900; color: var(--navy); line-height: .95; margin-bottom: 12px; }
.hero h1 .outline { color: transparent; -webkit-text-stroke: 2px var(--navy); }
.hero p.lead { font-size: 19px; font-weight: 600; color: var(--navy); max-width: 360px; }
.hero .cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 18px; }
.powered { display: inline-block; font-size: 11px; font-weight: 700; color: var(--orange); border: 1.5px solid var(--orange); border-radius: 6px; padding: 3px 8px; margin-bottom: 18px; letter-spacing: .5px; }
.band-orange { background: var(--orange); color: #fff; padding: 22px 0 26px; }
.band-orange h3 { text-align: center; background: var(--navy); color: #fff; display: table; margin: 0 auto 18px; padding: 6px 26px; border-radius: 8px; font-size: 16px; }
.audience { display: grid; grid-template-columns: repeat(6, 1fr); text-align: center; font-weight: 700; font-size: 12px; text-transform: uppercase; }
.audience div { border-right: 1px solid rgba(255, 255, 255, .5); padding: 4px 8px; }
.audience div:last-child { border: 0; }
.audience .ico { font-size: 30px; display: block; margin-bottom: 6px; }
.band-navy { background: var(--navy); color: #fff; text-align: center; padding: 34px 0; }
.band-navy .big { font-size: 46px; font-weight: 800; line-height: 1.05; }
.band-navy .big span { color: transparent; -webkit-text-stroke: 1.5px #fff; }
.section { padding: 46px 0; }
.section h2 { font-size: 28px; color: var(--navy); }
.earn-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.earn { background: #fff; border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); border-top: 4px solid var(--orange); }
.earn .pct { font-size: 40px; font-weight: 800; color: var(--orange); }
.tree { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 18px; font-size: 13px; }
.tree .node { background: var(--navy); color: #fff; padding: 10px 14px; border-radius: 10px; text-align: center; min-width: 150px; }
.tree .node small { display: block; color: #ffc29f; font-weight: 600; }
.tree .arrow { color: var(--orange); font-weight: 800; font-size: 22px; }
.perks { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.perk { background: #fff; border-radius: var(--radius); padding: 18px 14px; text-align: center; box-shadow: var(--shadow); font-size: 12px; font-weight: 600; text-transform: uppercase; color: var(--navy); }
.perk b { display: block; color: var(--orange); font-size: 26px; font-weight: 800; }
footer.site { background: var(--orange); color: #fff; text-align: center; padding: 16px; font-weight: 600; font-size: 14px; }
@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; } .hero h1 { font-size: 46px; }
  .audience { grid-template-columns: repeat(3, 1fr); row-gap: 14px; } .audience div:nth-child(3) { border: 0; }
  .earn-grid, .perks { grid-template-columns: 1fr 1fr; } .band-navy .big { font-size: 32px; }
}

/* ---------- registration ---------- */
.reg { display: grid; grid-template-columns: 300px 1fr; gap: 24px; align-items: start; }
.reg-side { background: var(--navy); color: #fff; border-radius: var(--radius); padding: 24px; position: sticky; top: 84px; }
.reg-side ol { padding-left: 18px; margin: 10px 0 0; } .reg-side li { margin-bottom: 10px; font-size: 14px; }
.reg-side .docs span { display: inline-block; background: rgba(255,255,255,.12); padding: 4px 10px; border-radius: 6px; margin: 4px 4px 0 0; font-size: 12px; }
.fs { border: 0; padding: 0; margin: 0 0 8px; }
.fs legend { font-weight: 700; color: var(--navy); font-size: 17px; margin-bottom: 14px; display: flex; align-items: center; gap: 10px; }
.fs legend .n { background: var(--orange); color: #fff; width: 28px; height: 28px; display: inline-grid; place-items: center; border-radius: 50%; font-size: 14px; }
.ref-ok { color: var(--green); font-size: 12px; margin-top: 4px; font-weight: 600; }
.upload { border: 2px dashed var(--line); border-radius: 10px; padding: 14px; text-align: center; background: #fafbff; cursor: pointer; font-weight: 500; }
.upload input { display: none; }
.upload.filled { border-color: var(--green); background: #f0faf4; }
.success-box { text-align: center; padding: 40px 20px; }
.success-box .tick { width: 70px; height: 70px; border-radius: 50%; background: var(--green); color: #fff; font-size: 38px; display: grid; place-items: center; margin: 0 auto 16px; }
@media (max-width: 900px) { .reg { grid-template-columns: 1fr; } .reg-side { position: static; } }

/* ---------- app shell (portal & admin) ---------- */
.shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.side { background: var(--navy); color: #cfd2ef; padding: 20px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.side .logo { color: #fff; display: block; padding: 4px 10px 2px; }
.side .sub { font-size: 12px; padding: 0 10px 18px; color: #ffb48b; font-weight: 600; }
.side a.tab { display: flex; align-items: center; gap: 10px; color: #cfd2ef; text-decoration: none; padding: 10px 12px; border-radius: 8px; font-size: 14px; font-weight: 500; margin-bottom: 2px; }
.side a.tab:hover { background: rgba(255,255,255,.07); color: #fff; }
.side a.tab.active { background: var(--orange); color: #fff; }
.side .count { margin-left: auto; background: #fff; color: var(--orange); border-radius: 99px; padding: 0 7px; font-size: 11px; font-weight: 700; }
.main { padding: 26px 30px 60px; min-width: 0; }
.main-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.main-head h1 { font-size: 24px; color: var(--navy); margin: 0; }
.menu-btn { display: none; }
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; z-index: 50; width: 250px; transform: translateX(-100%); transition: .2s; }
  .side.open { transform: none; box-shadow: 0 0 40px rgba(0,0,0,.4); }
  .menu-btn { display: inline-flex; } .main { padding: 18px 16px 50px; }
}

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.kpi { background: #fff; border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.kpi .l { font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .4px; }
.kpi .v { font-size: 24px; font-weight: 700; color: var(--navy); margin-top: 4px; }
.kpi .s { font-size: 12px; color: var(--muted); }
.kpi.accent { background: var(--navy); } .kpi.accent .l { color: #ffb48b; } .kpi.accent .v { color: #fff; } .kpi.accent .s { color: #cfd2ef; }
@media (max-width: 1000px) { .kpis { grid-template-columns: 1fr 1fr; } }

.code-card { background: linear-gradient(120deg, var(--navy), var(--navy-2)); color: #fff; border-radius: var(--radius); padding: 22px 24px; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.code-card .lbl { font-size: 12px; color: #ffb48b; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; }
.code-big { font-size: 38px; font-weight: 800; letter-spacing: 8px; font-variant-numeric: tabular-nums; }
.code-card .code-big { color: #fff; }
.card .code-big, .center-page .code-big { color: var(--navy); text-align: center; background: #fff4ec; border: 2px dashed var(--orange); border-radius: 10px; padding: 10px; }

.two-col { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; }
@media (max-width: 1000px) { .two-col { grid-template-columns: 1fr; } }

table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); font-weight: 600; padding: 10px 10px; border-bottom: 1.5px solid var(--line); white-space: nowrap; }
table.t td { padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.t tr:last-child td { border-bottom: 0; }
table.t td.num, table.t th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table-wrap { overflow-x: auto; }
.empty { text-align: center; color: var(--muted); padding: 30px 10px; }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: 1px; }

.bars { display: flex; align-items: flex-end; gap: 10px; height: 160px; padding-top: 10px; }
.bars .bar { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; font-size: 11px; color: var(--muted); }
.bars .stack { width: 100%; max-width: 38px; display: flex; flex-direction: column-reverse; border-radius: 5px 5px 0 0; overflow: hidden; }
.bars .own { background: var(--orange); } .bars .ovr { background: var(--navy); }
.legend { display: flex; gap: 16px; font-size: 12px; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }

/* toolbar & filters */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; margin-bottom: 14px; }
.toolbar label { margin: 0; min-width: 140px; flex: 1; }
.toolbar input, .toolbar select { margin-top: 4px; padding: 9px 10px; font-size: 14px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.chip { border: 1.5px solid var(--line); background: #fff; padding: 7px 14px; border-radius: 99px; cursor: pointer; font: 500 13px inherit; font-family: inherit; color: var(--navy); }
.chip.active { background: var(--navy); color: #fff; border-color: var(--navy); }

/* products */
.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.prod { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; border: 2px solid transparent; }
.prod.best { border-color: var(--orange); }
.prod .img { height: 130px; background: #f5f6fb; display: grid; place-items: center; position: relative; }
.prod .img img { max-height: 120px; }
.prod .ribbon { position: absolute; top: 10px; left: 10px; background: var(--orange); color: #fff; font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 6px; }
.prod .body { padding: 14px 16px 16px; display: flex; flex-direction: column; flex: 1; }
.prod .model { font-size: 12px; color: var(--muted); font-weight: 600; }
.prod h4 { font-size: 15px; margin: 4px 0 8px; color: var(--navy); }
.prod .tags { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 10px; }
.prod .tags span { font-size: 11px; background: #eef0f7; padding: 2px 8px; border-radius: 5px; font-weight: 600; color: var(--navy); }
.prod .tags span.o { background: #fff1e8; color: #b84a10; }
.prod ul { margin: 0 0 12px; padding-left: 18px; font-size: 13px; color: #44486a; }
.prod .price { margin-top: auto; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.prod .price b { font-size: 20px; color: var(--navy); }
.prod .price s { color: var(--muted); font-size: 13px; }
.prod .price .off { color: var(--green); font-size: 12px; font-weight: 700; }
.prod .earn-line { font-size: 12px; color: #8a3b0f; background: #fff4ec; padding: 6px 10px; border-radius: 6px; margin-top: 8px; }
.prod .actions { display: flex; gap: 8px; margin-top: 10px; }
.stars { color: #f5a623; letter-spacing: 1px; }

/* advisor */
.advisor { display: grid; grid-template-columns: 380px 1fr; gap: 18px; align-items: start; }
@media (max-width: 1000px) { .advisor { grid-template-columns: 1fr; } }
.opt-group { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.opt-group input { display: none; }
.opt-group label { margin: 0; border: 1.5px solid var(--line); padding: 7px 12px; border-radius: 8px; cursor: pointer; font-weight: 500; font-size: 13px; background: #fff; }
.opt-group input:checked + label { background: var(--navy); color: #fff; border-color: var(--navy); }
.reco-head { background: #fff4ec; border-left: 4px solid var(--orange); padding: 14px 16px; border-radius: 8px; margin-bottom: 14px; }
.reco-head h3 { margin: 0 0 6px; color: var(--navy); }
.reco-head ul { margin: 6px 0 0; padding-left: 18px; font-size: 14px; }
.pitch { background: var(--navy); color: #fff; border-radius: 10px; padding: 14px 16px; margin-bottom: 14px; font-size: 14px; }
.pitch b { color: #ffb48b; }

/* resources */
.res-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.res { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; }
.res .thumb { height: 140px; background: var(--navy); display: grid; place-items: center; color: #fff; font-size: 46px; position: relative; overflow: hidden; }
.res .thumb img, .res .thumb iframe { width: 100%; height: 100%; object-fit: cover; border: 0; }
.res .kind { position: absolute; top: 10px; left: 10px; background: var(--orange); color: #fff; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 5px; text-transform: uppercase; }
.res .body { padding: 14px 16px; flex: 1; display: flex; flex-direction: column; }
.res h4 { margin: 0 0 6px; color: var(--navy); font-size: 15px; }
.res p { font-size: 13px; color: var(--muted); margin: 0 0 12px; flex: 1; }

/* modal */
.modal-bg { position: fixed; inset: 0; background: rgba(15, 17, 45, .55); display: grid; place-items: center; z-index: 100; padding: 20px; }
.modal { background: #fff; border-radius: 14px; max-width: 760px; width: 100%; max-height: 90vh; overflow-y: auto; padding: 24px; }
.modal h2 { color: var(--navy); }
.modal .close { float: right; background: none; border: 0; font-size: 26px; cursor: pointer; color: var(--muted); }
.kv { display: grid; grid-template-columns: 170px 1fr; gap: 6px 14px; font-size: 14px; margin-bottom: 14px; }
.kv div:nth-child(odd) { color: var(--muted); }
.doc-links a { margin-right: 12px; font-weight: 600; }

.center-page { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: linear-gradient(160deg, var(--navy) 0 45%, var(--bg) 45%); }
.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: var(--navy); color: #fff; padding: 12px 20px; border-radius: 8px; z-index: 200; font-size: 14px; box-shadow: 0 6px 24px rgba(0,0,0,.25); }
.q { font-size: 13px; font-weight: 600; margin-bottom: 14px; }
.audience svg { display: block; margin: 0 auto 6px; }
.two-col > *, .main { min-width: 0; }
code { word-break: break-all; font-size: 12px; }

/* v2: returns, statements, review flags, stock */
.kf-ret { color: #8e2b20; font-weight: 500; margin-top: 2px; }
.kf-neg { color: #8e2b20; }
.kf-stmt { margin-top: 14px; grid-template-columns: 1fr auto; max-width: 420px; margin-left: auto; }
.b-active { background: #e2f5ea; color: #12623a; } .b-disabled { background: #fde3e0; color: #8e2b20; }
.b-coupon-pending, .b-needs-review { background: #fff1d6; color: #8a5a00; }
.stock-out { display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 99px; background: #f1f1f4; color: #6b6f8e; }
.log-error { color: #8e2b20; } .log-warn { color: #8a5a00; }
.cust-price { margin: 6px 0 4px; padding: 8px 10px; border-radius: 8px; background: #fff4ec; color: var(--ink); font-size: 13px; line-height: 1.45; }
.cust-price span { display: block; font-size: 15px; }
.cust-price span b { color: var(--orange); font-size: 17px; }
.cust-price em { color: var(--muted); font-style: normal; font-size: 12.5px; }
