/* StrikePilot - shared styles for the user app and the admin panel (light + dark) */
:root {
  --bg: #f3f6fb; --card: #ffffff; --ink: #14203a; --muted: #6b7489; --line: #e3e8f1; --soft: #f7f9fc;
  --blue: #1f5fbf; --blue-2: #4f9bff; --blue-soft: #e8f0fd; --navy: #14274e;
  --green: #0f9d58; --green-soft: #e6f6ee; --red: #d93025; --red-soft: #fdecea; --amber: #b26a00; --amber-soft: #fff4e0;
  --shadow: 0 6px 22px rgba(20, 39, 78, .08); --r: 14px;
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #0d1220; --card: #151c2e; --ink: #e7ecf6; --muted: #98a2b8; --line: #263049; --soft: #1a2236;
  --blue: #5b9dff; --blue-2: #8bbcff; --blue-soft: #1a2a4a; --navy: #c9dbff;
  --green: #34c27a; --green-soft: #12301f; --red: #ff6b5e; --red-soft: #3a1714; --amber: #f0b44c; --amber-soft: #3a2a0e;
  --shadow: 0 6px 22px rgba(0, 0, 0, .35);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--ink); font: 14px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; }
a { color: var(--blue); cursor: pointer; text-decoration: none; font-weight: 600; }
.num { font-variant-numeric: tabular-nums; }
.pos { color: var(--green) !important; } .neg { color: var(--red) !important; }
.hint { color: var(--muted); font-size: 13px; }
h1, h2, h3 { margin: 0; }
.spin { display: inline-block; width: 16px; height: 16px; border: 2px solid var(--line); border-top-color: var(--blue); border-radius: 50%; animation: sp .8s linear infinite; vertical-align: -3px; }
@keyframes sp { to { transform: rotate(360deg); } }

/* ---------- logo */
.lg { width: 36px; height: 36px; flex: none; } .lg svg { width: 100%; height: 100%; }
.brand { display: flex; align-items: center; gap: 10px; } .brand .nm { font-weight: 800; font-size: 19px; letter-spacing: -.2px; } .brand .tg { font-size: 12px; color: var(--muted); }

/* ---------- auth */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }
.a-hero { background: linear-gradient(150deg, #14274e 0%, #1f5fbf 70%, #4f9bff 130%); color: #fff; padding: 40px 48px; display: flex; flex-direction: column; justify-content: space-between; }
.a-hero .brand .tg { color: #c9dbff; } .a-hero h1 { font-size: 38px; line-height: 1.12; margin: 26px 0 12px; letter-spacing: -.5px; } .a-hero h1 em { font-style: normal; color: #9cc4ff; }
.a-hero p { color: #d7e5ff; max-width: 420px; font-size: 15px; } .a-hero ul { padding: 0; list-style: none; margin: 18px 0 0; } .a-hero li { padding: 6px 0 6px 26px; position: relative; color: #e7efff; }
.a-hero li:before { content: ""; position: absolute; left: 0; top: 10px; width: 14px; height: 8px; border-left: 2px solid #9cc4ff; border-bottom: 2px solid #9cc4ff; transform: rotate(-45deg); }
.a-form { display: flex; flex-direction: column; justify-content: center; padding: 40px clamp(20px, 6vw, 80px); max-width: 620px; width: 100%; margin: 0 auto; }
.a-form h2 { font-size: 28px; letter-spacing: -.4px; } .a-form h2 em { font-style: normal; color: var(--blue); } .a-form .sb { color: var(--muted); margin: 4px 0 20px; }
.alt { text-align: center; margin-top: 14px; color: var(--muted); }
@media (max-width: 860px) { .auth { grid-template-columns: 1fr; } .a-hero { padding: 22px 20px; } .a-hero h1 { font-size: 26px; margin: 14px 0 6px; } .a-hero ul, .a-hero p { display: none; } .a-form { padding: 24px 16px 40px; } }

/* ---------- forms */
.fld { margin-bottom: 13px; } .fld label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 5px; }
.fld input, .fld select, .fld textarea, input.in, select.in, textarea.in { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink); font: inherit; outline: none; }
.fld input:focus, .fld select:focus, .fld textarea:focus, .in:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.fld input[readonly] { background: var(--soft); color: var(--muted); }
.fld .err { display: none; color: var(--red); font-size: 12px; margin-top: 4px; } .fld.bad input, .fld.bad select, .fld.bad textarea { border-color: var(--red); } .fld.bad .err { display: block; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; } .row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0 12px; }
@media (max-width: 560px) { .row2, .row3 { grid-template-columns: 1fr; } }
.chk { display: flex; gap: 9px; align-items: flex-start; margin: 8px 0; font-size: 13px; cursor: pointer; } .chk input { margin-top: 2px; width: 16px; height: 16px; flex: none; }
.meter { height: 5px; background: var(--line); border-radius: 4px; margin-top: 6px; overflow: hidden; } .meter i { display: block; height: 100%; width: 0; transition: .2s; }
.msg { display: none; padding: 10px 12px; border-radius: 9px; font-weight: 600; margin: 8px 0 12px; } .msg.r { display: block; background: var(--red-soft); color: var(--red); } .msg.g { display: block; background: var(--green-soft); color: var(--green); } .msg.a { display: block; background: var(--amber-soft); color: var(--amber); }

/* ---------- buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 15px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font: inherit; font-weight: 700; cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: var(--blue); } .btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.pri, .go { background: var(--blue); border-color: var(--blue); color: #fff; } .btn.red { background: var(--red); border-color: var(--red); color: #fff; } .btn.grn { background: var(--green); border-color: var(--green); color: #fff; }
.btn.sm { padding: 5px 10px; font-size: 12.5px; border-radius: 8px; } .btn.wide, .go { width: 100%; }
.go { display: block; padding: 12px; border-radius: 11px; border: 0; font: inherit; font-weight: 800; font-size: 15px; cursor: pointer; }
.go:disabled { opacity: .6; }

/* ---------- shell */
.top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 14px; padding: 10px 18px; background: var(--card); border-bottom: 1px solid var(--line); }
.top .brand { cursor: pointer; } .top .brand .nm { font-size: 17px; }
.nav { display: flex; gap: 4px; margin-left: 10px; flex-wrap: wrap; } .nav button { border: 0; background: none; color: var(--muted); font: inherit; font-weight: 700; padding: 8px 12px; border-radius: 9px; cursor: pointer; }
.nav button.on { background: var(--blue-soft); color: var(--blue); }
.top .right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--blue); color: #fff; font-weight: 800; cursor: pointer; }
.iconbtn { width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.iconbtn svg, .bottom svg, .menu svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.body { padding: 18px 16px 90px; } .wrap { max-width: 1180px; margin: 0 auto; }
.bottom { display: none; }
@media (max-width: 760px) {
  .top .nav, .hide-s { display: none !important; }
  .bottom { display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 30; background: var(--card); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .bottom button { flex: 1; border: 0; background: none; color: var(--muted); font: inherit; font-size: 11px; font-weight: 700; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 0; cursor: pointer; }
  .bottom button.on { color: var(--blue); }
}
.menu { position: fixed; top: 58px; right: 12px; z-index: 50; width: 260px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 6px; display: none; }
.menu.show { display: block; } .menu .who { padding: 10px 12px; border-bottom: 1px solid var(--line); margin-bottom: 4px; } .menu .who span { display: block; color: var(--muted); font-size: 12px; word-break: break-all; }
.menu button { width: 100%; display: flex; align-items: center; gap: 10px; border: 0; background: none; color: var(--ink); font: inherit; font-weight: 600; padding: 10px 12px; border-radius: 9px; cursor: pointer; text-align: left; }
.menu button:hover { background: var(--soft); } .menu button.out { color: var(--red); }
.scrim { position: fixed; inset: 0; z-index: 40; display: none; } .scrim.show { display: block; }
@media (max-width: 760px) { .menu { top: auto; bottom: 70px; left: 10px; right: 10px; width: auto; } }

/* ---------- content */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; margin-bottom: 14px; box-shadow: var(--shadow); }
.card h3 { font-size: 16px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; } .card h3 .btn { margin-left: auto; }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 99px; background: var(--soft); color: var(--muted); font-size: 12px; font-weight: 700; border: 0; white-space: nowrap; }
.pill.g { background: var(--green-soft); color: var(--green); } .pill.r { background: var(--red-soft); color: var(--red); } .pill.a { background: var(--amber-soft); color: var(--amber); } .pill.b { background: var(--blue-soft); color: var(--blue); }
button.pill { cursor: pointer; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; display: inline-block; }
.banner { display: flex; gap: 12px; padding: 13px 15px; border-radius: 12px; margin-bottom: 14px; } .banner b { display: block; margin-bottom: 2px; }
.banner.g { background: var(--green-soft); color: var(--green); } .banner.a { background: var(--amber-soft); color: var(--amber); } .banner.r { background: var(--red-soft); color: var(--red); } .banner.b { background: var(--blue-soft); color: var(--blue); }
.banner .btn { margin-top: 8px; }
.big { font-size: 30px; font-weight: 800; letter-spacing: -.5px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; align-items: center; } .chips button { border: 1px solid var(--line); background: var(--card); color: var(--ink); font: inherit; font-weight: 700; font-size: 13px; padding: 6px 12px; border-radius: 99px; cursor: pointer; }
.chips button.on { background: var(--blue); border-color: var(--blue); color: #fff; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 14px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 13px 14px; box-shadow: var(--shadow); } .stat label { color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; } .stat .v { font-size: 22px; font-weight: 800; margin-top: 2px; } .stat .s { color: var(--muted); font-size: 12px; }
@media (max-width: 900px) { .stats { grid-template-columns: 1fr 1fr; } }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; } @media (max-width: 860px) { .grid2 { grid-template-columns: 1fr; } }
.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin: 10px 0; } .kv label { display: block; color: var(--muted); font-size: 12px; font-weight: 600; } .kv div > div { font-weight: 700; }
.pcard { border: 1px solid var(--line); border-radius: 12px; padding: 13px; background: var(--card); margin-bottom: 10px; }
.pcard .h { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; } .pcard .sc { font-weight: 800; font-size: 15px; }
.tag { display: inline-block; font-size: 11px; font-weight: 800; padding: 1px 7px; border-radius: 5px; } .tag.buy { background: var(--blue-soft); color: var(--blue); } .tag.sell { background: var(--amber-soft); color: var(--amber); }
.leg { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-top: 1px dashed var(--line); }
.steps { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; } .step { flex: 1; min-width: 90px; display: flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.step i { width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--soft); border: 1px solid var(--line); font-style: normal; font-size: 12px; flex: none; }
.step.done i { background: var(--green); color: #fff; border-color: var(--green); } .step.cur { color: var(--ink); } .step.cur i { background: var(--blue); color: #fff; border-color: var(--blue); }
.planbox { border: 2px solid var(--line); border-radius: 14px; padding: 14px; } .price { font-size: 26px; font-weight: 800; } .price small { font-size: 13px; color: var(--muted); font-weight: 600; }
.pgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 12px 0; } .pgrid label { display: block; color: var(--muted); font-size: 12px; font-weight: 600; } .pgrid div > div { font-weight: 700; }
@media (max-width: 560px) { .pgrid { grid-template-columns: 1fr 1fr; } }
.qr { width: 190px; height: 190px; margin: 0 auto; background: #fff; padding: 8px; border-radius: 10px; border: 1px solid var(--line); } .qr img, .qr canvas { width: 100% !important; height: 100% !important; }
.lay { display: grid; grid-template-columns: 220px 1fr; gap: 18px; align-items: start; } @media (max-width: 640px) { .lay { grid-template-columns: 1fr; } }
details.acc { border: 1px solid var(--line); border-radius: 12px; background: var(--card); margin-bottom: 10px; } details.acc summary { padding: 12px 14px; font-weight: 700; cursor: pointer; } details.acc .in { padding: 0 14px 14px; color: var(--muted); line-height: 1.6; }
.sw { width: 46px; height: 26px; border-radius: 99px; border: 0; background: var(--line); position: relative; cursor: pointer; flex: none; } .sw:after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.sw.on { background: var(--green); } .sw.on:after { left: 23px; }

/* ---------- tables */
.tbl-wrap { overflow-x: auto; } table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: .3px; padding: 9px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--card); position: sticky; top: 0; }
.tbl td { padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: top; } .tbl tr:hover td { background: var(--soft); }
.tbl .r { text-align: right; } .tbl tfoot td { font-weight: 800; border-top: 2px solid var(--line); border-bottom: 0; }
.tbl td.wrap { white-space: normal; min-width: 220px; }
.cards-m { display: none; } @media (max-width: 760px) { .tbl-wrap.m-hide { display: none; } .cards-m { display: block; } }

/* ---------- modal + toast */
.modalbg { position: fixed; inset: 0; z-index: 100; background: rgba(8, 14, 30, .55); display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal { background: var(--card); border-radius: 16px; padding: 20px; width: 100%; max-width: 460px; max-height: 92vh; overflow: auto; box-shadow: var(--shadow); border: 1px solid var(--line); }
.modal.wide { max-width: 760px; } .modal h3 { margin-bottom: 10px; font-size: 18px; } .modal .acts { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.toastbox { position: fixed; left: 50%; transform: translateX(-50%); bottom: 84px; z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; width: calc(100% - 24px); max-width: 480px; pointer-events: none; }
.toast { background: var(--navy); color: var(--card); padding: 11px 16px; border-radius: 11px; font-weight: 700; box-shadow: var(--shadow); } .toast.g { background: var(--green); color: #fff; } .toast.r { background: var(--red); color: #fff; }
[data-theme="dark"] .toast { background: #e7ecf6; color: #14203a; } [data-theme="dark"] .toast.g, [data-theme="dark"] .toast.r { color: #fff; }
.empty { text-align: center; padding: 26px; color: var(--muted); }
.tk { padding: 10px 0; border-top: 1px solid var(--line); cursor: pointer; } .tk .t { display: flex; justify-content: space-between; gap: 8px; font-weight: 700; } .tk .d { color: var(--muted); font-size: 12px; }
.msgs { max-height: 320px; overflow: auto; margin: 10px 0; } .bubble { padding: 9px 12px; border-radius: 12px; margin: 6px 0; background: var(--soft); white-space: pre-wrap; } .bubble.me { background: var(--blue-soft); margin-left: 40px; } .bubble.them { margin-right: 40px; } .bubble small { display: block; color: var(--muted); font-size: 11px; margin-top: 3px; }
.mono { font-family: Consolas, Menlo, monospace; font-size: 12px; }
