/* BoostlyAds - iOS-style design system. Fiery red-orange accent, light + dark. */
:root {
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", "Segoe UI", Roboto, Inter, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --r-lg: 22px; --r-md: 16px; --r-sm: 12px;
  --side-w: 272px;
  --grad: linear-gradient(135deg, #c81c16 0%, #c93506 100%);
  --grad-bright: linear-gradient(135deg, #f03a2a 0%, #f26a0e 100%);
  --ease: cubic-bezier(.2, .8, .2, 1);
}
html, html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a0a0b; --bg-soft: #111113;
  --card: #1a1a1d; --card2: #26262a; --card3: #303035;
  --line: rgba(255,255,255,.09); --line-strong: rgba(255,255,255,.16);
  --text: #f5f5f7; --muted: #a1a1a8;
  --accent: #ff7a50; --accent-soft: rgba(255,106,61,.16);
  --ok: #34d17a; --ok-bg: rgba(52,209,122,.15);
  --bad: #ff7468; --bad-bg: rgba(255,84,70,.16);
  --warn: #ffb340; --warn-bg: rgba(255,179,64,.15);
  --glow: rgba(255,92,40,.24); --glass: rgba(20,20,22,.74);
  --shadow: 0 1px 0 rgba(255,255,255,.04) inset, 0 14px 34px rgba(0,0,0,.5);
  --ring: 0 0 0 4px rgba(255,122,80,.30);
}
html[data-theme="light"] {
  color-scheme: light;
  --bg: #f2f2f7; --bg-soft: #ffffff;
  --card: #ffffff; --card2: #f2f2f7; --card3: #e5e5ea;
  --line: rgba(60,60,67,.14); --line-strong: rgba(60,60,67,.26);
  --text: #1c1c1e; --muted: #636366;
  --accent: #b32c08; --accent-soft: rgba(179,44,8,.10);
  --ok: #176b32; --ok-bg: rgba(23,107,50,.12);
  --bad: #b3221a; --bad-bg: rgba(179,34,26,.10);
  --warn: #8f4b00; --warn-bg: rgba(143,75,0,.12);
  --glow: rgba(255,120,40,.22); --glass: rgba(255,255,255,.78);
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 12px 30px rgba(70,40,20,.09);
  --ring: 0 0 0 4px rgba(179,44,8,.24);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; position: relative;
  background: var(--bg); color: var(--text);
  font: 400 16px/1.45 var(--font);
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
  overflow-x: clip;
}
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(900px 460px at 85% -8%, var(--glow), transparent 70%),
    radial-gradient(700px 420px at -10% 8%, rgba(255,149,0,.10), transparent 70%);
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img, video, svg { max-width: 100%; }
h1, h2, h3, p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
.ico { flex: none; display: inline-block; vertical-align: middle; }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 10px; }
::selection { background: var(--accent-soft); }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.mono { font-family: var(--mono); letter-spacing: .02em; }
.center { text-align: center; }
.row { display: flex; flex-wrap: wrap; align-items: stretch; }
.row.gap { gap: 12px; }
.row.gap > * { flex: 1 1 260px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- shell ---------- */
.shell { display: block; min-height: 100vh; }
.main-col { min-width: 0; }
.sidebar { display: none; }
.wrap {
  width: 100%; max-width: 760px; margin: 0 auto;
  padding: 8px 18px calc(110px + env(safe-area-inset-bottom));
}
body.public .wrap { padding-bottom: 56px; max-width: 1080px; }

.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: calc(10px + env(safe-area-inset-top)) 18px 10px;
  background: var(--glass); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; font-size: 19px; letter-spacing: -.02em; }
.brand:hover { text-decoration: none; }
.logo {
  width: 34px; height: 34px; border-radius: 11px; display: inline-grid; place-items: center;
  background: var(--grad-bright); color: #fff;
  box-shadow: 0 6px 16px rgba(240,80,30,.40), inset 0 1px 0 rgba(255,255,255,.35);
}
.top-right { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-width: 40px; height: 40px; padding: 0 11px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--card); color: var(--text); cursor: pointer; font-size: 14px; font-weight: 600;
  transition: transform .15s var(--ease), background .2s;
}
.icon-btn:hover { text-decoration: none; background: var(--card2); }
.icon-btn:active { transform: scale(.94); }
.badge {
  position: absolute; top: -4px; right: -3px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--grad); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
  box-shadow: 0 0 0 2px var(--bg);
}
.chip-bal {
  display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 13px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 14px; border: 1px solid transparent;
}
.chip-bal:hover { text-decoration: none; border-color: var(--accent); }
.theme-btn .i-moon { display: none; }
html[data-theme="light"] .theme-btn .i-sun { display: none; }
html[data-theme="light"] .theme-btn .i-moon { display: inline-block; }

/* ---------- bottom tab bar (phones) ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: flex; justify-content: space-around; align-items: stretch;
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
  background: var(--glass); backdrop-filter: saturate(180%) blur(22px); -webkit-backdrop-filter: saturate(180%) blur(22px);
  border-top: 1px solid var(--line);
}
.tabbar a, .tabbar button {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 2px;
  min-height: 52px; background: none; border: 0; cursor: pointer;
  color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .01em; border-radius: 14px;
  transition: color .2s, transform .15s var(--ease);
}
.tabbar a:hover { text-decoration: none; }
.tabbar a:active, .tabbar button:active { transform: scale(.93); }
.tabbar a .ico { transition: transform .25s var(--ease); }
.tabbar a.on { color: var(--accent); }
.tabbar a.on .ico { transform: translateY(-1px) scale(1.08); }
.tabbar .tab-new .tab-plus {
  width: 44px; height: 32px; border-radius: 12px; display: grid; place-items: center; color: #fff;
  background: var(--grad); box-shadow: 0 6px 16px rgba(217,60,20,.38);
}
.tabbar .tab-new { color: var(--text); }

/* ---------- headings ---------- */
.page-title { font-size: 32px; line-height: 1.1; font-weight: 800; letter-spacing: -.03em; margin: 18px 0 6px; }
.lede { color: var(--muted); font-size: 17px; margin: 0 0 14px; }
.lede.small { font-size: 15px; }
.section-title {
  font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--muted);
  margin: 28px 4px 10px; display: flex; align-items: center; gap: 8px;
}
.hello h2 { font-size: 30px; font-weight: 800; letter-spacing: -.03em; margin: 18px 0 2px; }
.hello p { margin-bottom: 14px; }
.footnote { color: var(--muted); font-size: 13.5px; line-height: 1.5; margin: 14px 6px 0; }
.more-link { display: inline-flex; align-items: center; gap: 4px; margin: 14px 6px 0; font-weight: 600; }

/* ---------- cards ---------- */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 18px; box-shadow: var(--shadow); margin: 0 0 14px;
}
.card h3 { font-size: 17px; font-weight: 700; letter-spacing: -.01em; margin-bottom: 6px; }
.card p { line-height: 1.55; }
.card .kv:first-of-type { border-top: 0; }

.kv { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); }
.kv:first-child { border-top: 0; padding-top: 2px; }
.kv > span { color: var(--muted); font-size: 15px; flex: none; }
.kv > b { font-weight: 600; text-align: right; min-width: 0; overflow-wrap: anywhere; }
.kv > b.link { font-weight: 500; font-size: 14px; color: var(--accent); }

/* ---------- inset grouped list ---------- */
.list { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow); margin: 0 0 14px; }
.item {
  display: flex; align-items: center; gap: 12px; padding: 13px 16px; color: var(--text);
  border-top: 1px solid var(--line); transition: background .15s;
}
.item:first-child { border-top: 0; }
a.item:hover { text-decoration: none; background: var(--card2); }
a.item:active { background: var(--card3); }
.item-ico {
  flex: none; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center;
  background: var(--warn-bg); color: var(--warn);
}
.item-ico.ok { background: var(--ok-bg); color: var(--ok); }
.item-ico.bad { background: var(--bad-bg); color: var(--bad); }
.item-ico.brand { background: var(--accent-soft); color: var(--accent); }
.item-main { flex: 1; min-width: 0; }
.item-title { font-weight: 600; overflow-wrap: anywhere; }
.item-title.small { font-weight: 500; font-size: 15px; line-height: 1.45; white-space: pre-wrap; }
.item-sub { color: var(--muted); font-size: 13.5px; margin-top: 2px; overflow-wrap: anywhere; }
.item-side { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 5px; flex: none; }
.amt { font-weight: 700; font-variant-numeric: tabular-nums; }
a.item > .chev { color: var(--muted); opacity: .6; margin-left: -4px; }
.note-media { display: block; width: 100%; max-height: 340px; object-fit: cover; margin-top: 10px; border-radius: 14px; background: var(--card2); }

/* ---------- status pills ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 700; letter-spacing: .01em; background: var(--warn-bg); color: var(--warn); white-space: nowrap;
}
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.ok { background: var(--ok-bg); color: var(--ok); }
.pill.bad { background: var(--bad-bg); color: var(--bad); }

/* ---------- buttons ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 0 22px; border-radius: 15px; border: 1px solid transparent;
  font-size: 17px; font-weight: 600; letter-spacing: -.01em; cursor: pointer; text-align: center;
  transition: transform .15s var(--ease), box-shadow .25s, filter .2s, background .2s;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(.975); }
.btn.primary {
  color: #fff; background: var(--grad);
  box-shadow: 0 10px 24px rgba(217,60,20,.34), inset 0 1px 0 rgba(255,255,255,.28);
}
.btn.primary:hover { filter: brightness(.93); box-shadow: 0 14px 30px rgba(217,60,20,.42), inset 0 1px 0 rgba(255,255,255,.28); }
.btn.light { background: #fff; color: #b8230f; box-shadow: 0 8px 20px rgba(0,0,0,.18); }
.btn.ghost { background: var(--card2); color: var(--text); border-color: var(--line); }
.btn.ghost:hover { background: var(--card3); }
.btn.danger { background: var(--bad-bg); color: var(--bad); }
.btn.danger:hover { filter: brightness(1.1); }
.btn.full { width: 100%; }
.btn.sm { min-height: 40px; padding: 0 16px; font-size: 15px; border-radius: 12px; }
.btn[disabled] { opacity: .65; cursor: default; transform: none; }
.btn.loading { color: transparent !important; pointer-events: none; }
.btn.loading::after {
  content: ""; position: absolute; width: 20px; height: 20px; border-radius: 50%;
  border: 2.5px solid rgba(255,255,255,.4); border-top-color: #fff; animation: spin .7s linear infinite;
}
.btn.ghost.loading::after, .btn.danger.loading::after { border-color: var(--line-strong); border-top-color: var(--accent); }
.btn.done { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- forms ---------- */
.form { display: grid; gap: 16px; }
.form.tight { padding: 16px; margin: 0; }
label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); letter-spacing: .01em; }
label > input, label > select, label > textarea { margin-top: 7px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=url], input[type=search], input[type=file], select, textarea {
  display: block; width: 100%; min-height: 50px; padding: 12px 14px; font-size: 16px; font-weight: 500; color: var(--text);
  background: var(--card2); border: 1.5px solid transparent; border-radius: 14px; outline: none; appearance: none; -webkit-appearance: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
html[data-theme="light"] input:not([type=file]), html[data-theme="light"] select, html[data-theme="light"] textarea { background: #f2f2f7; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: var(--ring); background: var(--card); }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; font-weight: 400; }
textarea { min-height: 96px; resize: vertical; line-height: 1.45; }
select {
  padding-right: 42px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 15px center;
}
input[type=file] { padding: 10px; font-size: 14px; min-height: 0; }
input[type=file]::file-selector-button {
  margin-right: 12px; padding: 8px 14px; border: 0; border-radius: 10px; background: var(--accent-soft); color: var(--accent); font-weight: 700; cursor: pointer;
}
input[type=number] { -moz-appearance: textfield; appearance: textfield; font-variant-numeric: tabular-nums; }
.estimate {
  display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-radius: 14px;
  background: var(--accent-soft); color: var(--text);
}
.estimate span { color: var(--muted); font-size: 14px; font-weight: 600; }
.estimate b { font-size: 22px; font-weight: 800; letter-spacing: -.02em; color: var(--accent); font-variant-numeric: tabular-nums; }
.searchbar { display: flex; gap: 10px; margin: 0 0 14px; }
.searchbar input { flex: 1; min-width: 0; }
.searchbar .btn { min-height: 50px; padding: 0 18px; }
.inline-form { display: inline; margin: 0; }
.logout-form { margin-top: 22px; }
.logout-form .btn { width: 100%; }

/* ---------- alerts ---------- */
.alert {
  display: flex; gap: 10px; align-items: flex-start; padding: 13px 15px; margin: 0 0 14px; border-radius: 15px;
  background: var(--bad-bg); color: var(--bad); font-weight: 600; font-size: 15px; line-height: 1.4; border: 1px solid transparent;
}
.alert.ok { background: var(--ok-bg); color: var(--ok); }

/* ---------- balance card + stats ---------- */
.balance-card {
  position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 22px; margin: 0 0 14px; border-radius: 26px; color: #fff; background: var(--grad);
  box-shadow: 0 18px 40px rgba(217,60,20,.34), inset 0 1px 0 rgba(255,255,255,.25);
}
.balance-card::before, .balance-card::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255,255,255,.12); pointer-events: none; }
.balance-card::before { width: 190px; height: 190px; right: -50px; top: -80px; }
.balance-card::after { width: 120px; height: 120px; right: 60px; bottom: -70px; background: rgba(255,255,255,.08); }
.balance-card > * { position: relative; z-index: 1; }
.balance-card .label { font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #fff; }
.balance-card .amount { font-size: clamp(30px, 8vw, 42px); font-weight: 800; letter-spacing: -.03em; line-height: 1.1; margin-top: 4px; font-variant-numeric: tabular-nums; }
.balance-card .muted { color: #fff; font-weight: 600; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0 0 14px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 14px 12px; box-shadow: var(--shadow); min-width: 0; }
.stat .n { font-size: clamp(17px, 4.6vw, 24px); font-weight: 800; letter-spacing: -.03em; line-height: 1.15; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.stat .n .cur { font-size: .58em; font-weight: 700; color: var(--muted); margin-right: 3px; letter-spacing: 0; }
.stat .k { color: var(--muted); font-size: 12.5px; font-weight: 600; margin-top: 4px; }

/* ---------- quick tiles ---------- */
.quick { display: grid; gap: 10px; margin: 0 0 6px; }
.tile {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px; color: var(--text);
  background: var(--card); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow);
  transition: transform .18s var(--ease), border-color .2s;
}
.tile:hover { text-decoration: none; border-color: var(--accent); transform: translateY(-1px); }
.tile:active { transform: scale(.98); }
.tile .ti { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; color: #fff; background: var(--grad-bright); box-shadow: 0 6px 14px rgba(240,80,30,.3); flex: none; }
.tile .tt { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.tile .t { font-weight: 700; letter-spacing: -.01em; }
.tile .s { color: var(--muted); font-size: 13.5px; }
.tile .chev { color: var(--muted); opacity: .6; }

/* ---------- empty state ---------- */
.empty { display: grid; justify-items: center; gap: 4px; text-align: center; color: var(--muted); padding: 26px 18px; margin: 0 0 14px; background: var(--card); border: 1px dashed var(--line-strong); border-radius: var(--r-lg); }
.empty p { max-width: 34ch; font-size: 15px; }
.empty-svg { width: 132px; height: auto; margin-bottom: 4px; }
.em-shadow { fill: var(--line); }
.em-card { fill: var(--card2); stroke: var(--line-strong); stroke-width: 1.2; }
.em-card.back { fill: var(--card3); stroke: none; opacity: .8; }
.em-line { fill: var(--muted); opacity: .55; }
.em-line.soft { opacity: .22; }

/* ---------- landing ---------- */
.top-actions { display: flex; align-items: center; gap: 8px; }
.hero { display: grid; gap: 18px; align-items: center; padding: 22px 0 6px; }
.hero h1 { font-size: clamp(38px, 10.5vw, 64px); line-height: 1.02; font-weight: 800; letter-spacing: -.04em; margin: 4px 0 14px; }
.hero.center { justify-items: center; text-align: center; padding: 60px 0; }
.hero h1.big { font-size: clamp(70px, 22vw, 130px); margin: 0; }
.grad-text { background: var(--grad-bright); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }
html[data-theme="light"] .grad-text { background-image: var(--grad); }
.eyebrow { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 13px; font-weight: 700; letter-spacing: .02em; }
.hero .lede { font-size: 18px; max-width: 46ch; margin-bottom: 22px; }
.hero .btn { min-width: 160px; }
.hero-art { display: flex; justify-content: center; }
.hero-svg { width: 100%; max-width: 440px; height: auto; overflow: visible; }
.ph-body { fill: var(--card); stroke: var(--line-strong); stroke-width: 2; }
.ph-screen { fill: var(--bg); }
.ph-notch { fill: var(--text); opacity: .85; }
.ph-chip { fill: var(--card2); }
.ph-bar { fill: var(--muted); opacity: .5; }
.ph-bar.hot { fill: var(--accent); opacity: 1; }
.ph-row { fill: var(--card); stroke: var(--line); }
.ph-dot.ok, .ph-pill.ok { fill: var(--ok); }
.ph-dot.warn, .ph-pill.warn { fill: var(--warn); }
.ph-pill { opacity: .85; }
.ph-line { fill: var(--text); opacity: .8; }
.ph-line.soft { opacity: .25; }
.ph-home { fill: var(--text); opacity: .35; }
.chip-bg { fill: var(--card); stroke: var(--line-strong); stroke-width: 1.2; }
.chip-t { fill: var(--text); font: 700 14px var(--font); }
.fl { filter: drop-shadow(0 10px 16px rgba(0,0,0,.28)); }
.platforms { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 8px; }
.plat { padding: 8px 14px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); font-size: 14px; font-weight: 600; color: var(--text); }
.cards { display: grid; gap: 12px; margin: 26px 0 8px; }
.card.feat { margin: 0; }
.fi { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 15px; margin-bottom: 12px; color: #fff; background: var(--grad-bright); box-shadow: 0 8px 18px rgba(240,80,30,.32); }
.steps { display: grid; gap: 12px; margin: 14px 0 6px; padding: 0; list-style: none; counter-reset: s; }
.step { position: relative; padding: 18px 18px 18px 70px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); counter-increment: s; }
.step::before {
  content: counter(s); position: absolute; left: 18px; top: 16px; width: 38px; height: 38px; border-radius: 13px; display: grid; place-items: center;
  font-weight: 800; color: #fff; background: var(--grad);
}
.step h3 { font-size: 17px; font-weight: 700; margin-bottom: 3px; }
.cta {
  position: relative; overflow: hidden; margin: 28px 0 8px; padding: 30px 22px; border-radius: 28px; color: #fff; text-align: center; background: var(--grad);
  box-shadow: 0 20px 44px rgba(217,60,20,.32);
}
.cta::before { content: ""; position: absolute; width: 260px; height: 260px; right: -70px; top: -120px; border-radius: 50%; background: rgba(255,255,255,.12); }
.cta > * { position: relative; }
.cta h2 { font-size: clamp(26px, 6vw, 36px); font-weight: 800; letter-spacing: -.03em; margin-bottom: 8px; }
.cta p { margin-bottom: 18px; }
.site-foot { margin: 34px 6px 0; color: var(--muted); font-size: 13.5px; display: flex; flex-wrap: wrap; gap: 6px 16px; justify-content: space-between; }

/* ---------- auth ---------- */
.auth { max-width: 440px; margin: 18px auto 0; }
.auth-head { text-align: center; margin: 12px 0 20px; }
.auth-logo { width: 68px; height: 68px; margin: 0 auto 14px; border-radius: 22px; display: grid; place-items: center; color: #fff; background: var(--grad-bright); box-shadow: 0 14px 30px rgba(240,80,30,.40), inset 0 1px 0 rgba(255,255,255,.35); }
.auth-head .page-title { margin: 0 0 4px; font-size: 30px; }
.auth .footnote { text-align: center; }
.field { position: relative; }
.field > .ico { position: absolute; left: 14px; bottom: 15px; color: var(--muted); pointer-events: none; }
.field > input { padding-left: 44px; }

/* ---------- payment ---------- */
.pay { text-align: left; }
.card .label, .pay .label { font-size: 12px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.pay .amount { font-size: 44px; font-weight: 800; letter-spacing: -.035em; line-height: 1.1; margin: 4px 0 14px; font-variant-numeric: tabular-nums; background: var(--grad-bright); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }
html[data-theme="light"] .pay .amount { background-image: var(--grad); }
.pay .btn.full { margin-top: 12px; }
.countdown { margin-top: 14px; padding: 10px 14px; border-radius: 12px; background: var(--warn-bg); color: var(--warn); font-weight: 700; font-variant-numeric: tabular-nums; text-align: center; }
.status { margin-top: 10px; display: flex; align-items: center; justify-content: center; gap: 9px; color: var(--muted); font-size: 14.5px; font-weight: 600; text-align: center; }
.status::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); animation: pulse 1.4s ease-in-out infinite; flex: none; }
.status.ok { color: var(--ok); }
.status.ok::before { background: var(--ok); animation: none; }
@keyframes pulse { 0%, 100% { transform: scale(.7); opacity: .6; } 50% { transform: scale(1.15); opacity: 1; } }

/* ---------- referral ---------- */
.code { font: 800 32px var(--mono); letter-spacing: .14em; color: var(--accent); margin: 4px 0 16px; overflow-wrap: anywhere; }
.linkbox { padding: 13px 14px; border-radius: 14px; background: var(--card2); font: 500 13px var(--mono); word-break: break-all; margin: 6px 0 12px; line-height: 1.5; }

/* ---------- pager, filters ---------- */
.pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 4px 0 14px; }
.pager .btn { min-height: 42px; font-size: 15px; padding: 0 18px; }
.filters { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 14px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.filters::-webkit-scrollbar { display: none; }
.chip { flex: none; padding: 9px 16px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); color: var(--text); font-weight: 600; font-size: 14px; white-space: nowrap; }
.chip:hover { text-decoration: none; background: var(--card2); }
.chip.on { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 6px 16px rgba(217,60,20,.3); }

/* ---------- desktop sidebar ---------- */
.side-brand { padding: 4px 8px 18px; }
.side-nav { display: grid; gap: 4px; }
.side-nav a {
  display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 14px;
  color: var(--muted); font-weight: 600; transition: background .15s, color .15s;
}
.side-nav a:hover { text-decoration: none; background: var(--card2); color: var(--text); }
.side-nav a.on { background: var(--accent-soft); color: var(--accent); }
.side-nav .count { margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px; background: var(--grad); color: #fff; font-size: 12px; font-weight: 700; line-height: 22px; text-align: center; }
.side-bal { display: block; margin: 18px 4px 0; padding: 16px; border-radius: 20px; color: #fff; background: var(--grad); box-shadow: 0 12px 28px rgba(217,60,20,.32); }
.side-bal:hover { text-decoration: none; filter: brightness(1.06); }
.side-bal .l { font-size: 11.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.side-bal .v { font-size: 24px; font-weight: 800; letter-spacing: -.02em; margin-top: 2px; font-variant-numeric: tabular-nums; }
.side-foot { margin-top: auto; display: grid; gap: 6px; padding-top: 16px; }
.side-foot .side-link {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 14px; border-radius: 14px; border: 0; background: none;
  color: var(--muted); font-weight: 600; cursor: pointer; text-align: left;
}
.side-foot .side-link:hover { background: var(--card2); color: var(--text); text-decoration: none; }
.admin-tag { margin-left: 4px; padding: 2px 8px; border-radius: 8px; background: var(--accent-soft); color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }

@media (min-width: 640px) {
  .cards { grid-template-columns: repeat(3, 1fr); }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .step { padding: 70px 18px 18px; }
  .step::before { top: 18px; }
}
@media (min-width: 900px) {
  .shell { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); }
  body.app .sidebar {
    display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; padding: 24px 16px 20px;
    background: var(--glass); backdrop-filter: saturate(180%) blur(22px); -webkit-backdrop-filter: saturate(180%) blur(22px);
    border-right: 1px solid var(--line);
  }
  body.app .topbar, body.app .tabbar { display: none; }
  body.app .wrap { max-width: 1000px; padding: 26px 44px 64px; margin: 0; }
  body.app .page-title { font-size: 38px; margin-top: 8px; }
  body.app .quick { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  body.app .stats { gap: 14px; }
  body.app .stat { padding: 18px; }
  body.app .wrap > form.card, body.app .wrap > .card.pay, body.app .wrap > .card:not(.feat) { max-width: 640px; }
  body.app .wrap > .list, body.app .wrap > .empty { max-width: 860px; }
  body.public .topbar { padding-left: max(32px, calc((100vw - 1080px) / 2)); padding-right: max(32px, calc((100vw - 1080px) / 2)); }
  .hero { grid-template-columns: 1.05fr .95fr; gap: 28px; padding: 54px 0 20px; }
  .hero.center { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  .hide-xs { display: none; }
  .page-title { font-size: 28px; }
  .brand { font-size: 18px; }
  .wrap { padding-left: 14px; padding-right: 14px; }
  .card, .list { border-radius: 20px; }
}
@media (max-width: 899px) {
  .hide-mobile { display: none !important; }
}

/* ---------- motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  @keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
  @keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
  .wrap > * { animation: rise .5s var(--ease) both; }
  .wrap > *:nth-child(2) { animation-delay: .04s; }
  .wrap > *:nth-child(3) { animation-delay: .08s; }
  .wrap > *:nth-child(4) { animation-delay: .12s; }
  .wrap > *:nth-child(5) { animation-delay: .16s; }
  .wrap > *:nth-child(n+6) { animation-delay: .2s; }
  .fl1 { animation: float 6s ease-in-out infinite; }
  .fl2 { animation: float 7s ease-in-out -2s infinite; }
  .fl3 { animation: float 6.5s ease-in-out -4s infinite; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media (max-width: 420px) {
  body.app .brand-name { display: none; }
}

/* ---------- field wrapper, profile ---------- */
.field { display: block; }
label > .field { margin-top: 7px; }
.profile { display: flex; align-items: center; gap: 14px; margin: 4px 0 16px; }
.avatar { width: 64px; height: 64px; border-radius: 22px; display: grid; place-items: center; font-size: 28px; font-weight: 800; color: #fff; background: var(--grad-bright); box-shadow: 0 10px 22px rgba(240,80,30,.34); flex: none; }
.profile .nm { font-size: 22px; font-weight: 800; letter-spacing: -.02em; overflow-wrap: anywhere; }
.profile .em { color: var(--muted); font-size: 14.5px; overflow-wrap: anywhere; }
.ico.flip { transform: scaleX(-1); }
.list > .empty { margin: 0; border: 0; border-radius: 0; background: none; }

/* ===================== P6: dialogs, sheets, pickers, toasts, linking, support ===================== */
.hidden { display: none !important; }
body.ui-lock { overflow: hidden; }

/* overlay + shared surface */
.ui-overlay {
  position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 20px;
  background: rgba(8,8,10,.46); -webkit-backdrop-filter: blur(12px) saturate(1.3); backdrop-filter: blur(12px) saturate(1.3);
  opacity: 0; transition: opacity .22s var(--ease);
}
html[data-theme="light"] .ui-overlay { background: rgba(28,28,30,.34); }
.ui-overlay.show { opacity: 1; }
.ui-overlay.is-sheet { align-items: flex-end; padding: 0; }
.ui-dialog, .ui-sheet {
  background: var(--card); color: var(--text); border: 1px solid var(--line);
  box-shadow: var(--shadow), 0 30px 80px rgba(0,0,0,.4);
}

/* confirm dialog (iOS alert style) */
.ui-dialog {
  width: min(344px, 100%); border-radius: 26px; padding: 24px 18px 16px; text-align: center;
  transform: scale(.93) translateY(6px); opacity: 0; transition: transform .28s var(--ease), opacity .2s;
}
.ui-overlay.show .ui-dialog { transform: none; opacity: 1; }
.ui-dialog .ui-ico {
  width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; margin: 0 auto 14px;
  background: var(--accent-soft); color: var(--accent);
}
.ui-dialog .ui-ico .ico { width: 26px; height: 26px; }
.ui-dialog.danger .ui-ico { background: var(--bad-bg); color: var(--bad); }
.ui-dialog h3 { font-size: 20px; font-weight: 750; letter-spacing: -.02em; line-height: 1.25; }
.ui-dialog p { margin-top: 8px; color: var(--muted); font-size: 15px; line-height: 1.5; }
.ui-actions { display: grid; gap: 10px; margin-top: 20px; }
.ui-actions .btn { width: 100%; }

/* bottom sheet / picker list */
.ui-sheet {
  width: 100%; max-width: 560px; max-height: min(80vh, 680px); display: flex; flex-direction: column;
  border-radius: 28px 28px 0 0; border-bottom: 0; padding: 6px 0 calc(16px + env(safe-area-inset-bottom));
  transform: translateY(105%); transition: transform .34s var(--ease);
}
.ui-overlay.show .ui-sheet { transform: none; }
.ui-grab { width: 40px; height: 5px; border-radius: 3px; background: var(--line-strong); margin: 6px auto 8px; flex: none; }
.ui-sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 20px 12px; flex: none; }
.ui-sheet-head h3 { font-size: 19px; font-weight: 750; letter-spacing: -.02em; }
.ui-x {
  width: 36px; height: 36px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer;
  background: var(--card2); color: var(--muted); transition: background .2s, transform .15s;
}
.ui-x:hover { background: var(--card3); }
.ui-x:active { transform: scale(.92); }
.ui-x .ico { width: 16px; height: 16px; }
.ui-list { overflow-y: auto; padding: 0 12px; display: grid; gap: 4px; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.ui-opt {
  width: 100%; display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 10px 14px;
  border: 0; border-radius: 16px; background: transparent; color: var(--text); text-align: left; cursor: pointer;
  font-size: 17px; font-weight: 600; letter-spacing: -.01em; transition: background .15s, transform .12s;
}
.ui-opt:hover { background: var(--card2); }
.ui-opt:active { transform: scale(.985); }
.ui-opt:focus-visible { box-shadow: var(--ring); background: var(--card2); }
.ui-opt .tick { width: 22px; height: 22px; flex: none; display: grid; place-items: center; color: var(--accent); opacity: 0; }
.ui-opt .tick .ico { width: 20px; height: 20px; }
.ui-opt .lbl { min-width: 0; overflow-wrap: anywhere; }
.ui-opt .sub { margin-left: auto; padding-left: 12px; color: var(--muted); font-size: 14px; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ui-opt[aria-selected="true"] { background: var(--accent-soft); color: var(--accent); }
.ui-opt[aria-selected="true"] .sub { color: var(--accent); opacity: .85; }
.ui-opt[aria-selected="true"] .tick { opacity: 1; }
@media (min-width: 700px) {
  .ui-overlay.is-sheet { align-items: center; padding: 20px; }
  .ui-sheet { width: min(460px, 100%); border-radius: 28px; border-bottom: 1px solid var(--line); padding-bottom: 16px; transform: scale(.95) translateY(8px); opacity: 0; transition: transform .28s var(--ease), opacity .2s; }
  .ui-overlay.show .ui-sheet { transform: none; opacity: 1; }
  .ui-grab { display: none; }
  .ui-sheet-head { padding-top: 16px; }
}

/* themed select trigger */
.pick-wrap { position: relative; }
select.picked { position: absolute; left: 0; bottom: 0; width: 1px; height: 1px; min-height: 0; margin: 0; padding: 0; border: 0; opacity: 0; pointer-events: none; }
.picker {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 50px; margin-top: 7px;
  padding: 12px 14px; border: 1.5px solid transparent; border-radius: 14px; background: var(--card2); color: var(--text);
  font-size: 16px; font-weight: 500; text-align: left; cursor: pointer; transition: border-color .2s, box-shadow .2s, background .2s, transform .12s;
}
html[data-theme="light"] .picker { background: #f2f2f7; }
.picker:active { transform: scale(.992); }
.picker:focus-visible, .picker.open { outline: none; border-color: var(--accent); box-shadow: var(--ring); background: var(--card); }
.picker.invalid { border-color: var(--bad); box-shadow: 0 0 0 4px var(--bad-bg); }
.picker .pv { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picker .pv .sub { margin-left: 8px; color: var(--muted); font-size: 14px; font-weight: 600; }
.picker.placeholder .pv { color: var(--muted); font-weight: 400; }
.picker > .ico { color: var(--muted); flex: none; width: 16px; height: 16px; transition: transform .25s var(--ease); }
.picker.open > .ico { transform: rotate(180deg); }
.picker[disabled] { opacity: .6; cursor: not-allowed; transform: none; }

/* toasts */
.ui-toasts {
  position: fixed; left: 0; right: 0; top: calc(12px + env(safe-area-inset-top)); z-index: 1100;
  display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 0 14px; pointer-events: none;
}
.ui-toast {
  pointer-events: auto; width: min(420px, 100%); display: flex; gap: 10px; align-items: flex-start; padding: 13px 15px; border-radius: 18px;
  background: var(--card); color: var(--text); border: 1px solid var(--line); box-shadow: var(--shadow), 0 14px 40px rgba(0,0,0,.25);
  font-size: 15px; font-weight: 600; line-height: 1.4; transform: translateY(-14px) scale(.98); opacity: 0; transition: transform .3s var(--ease), opacity .25s;
}
.ui-toast.show { transform: none; opacity: 1; }
.ui-toast.ok .ico { color: var(--ok); }
.ui-toast.err .ico { color: var(--bad); }

/* inline alerts: entrance, dismiss button, fade-out */
.alert { animation: alertIn .38s var(--ease) both; transition: opacity .3s, transform .3s, max-height .32s, margin .32s, padding .32s; max-height: 220px; }
.alert > span { flex: 1; min-width: 0; }
.alert-x {
  flex: none; width: 26px; height: 26px; margin: -2px -4px -2px 4px; border: 0; border-radius: 50%; display: grid; place-items: center;
  background: transparent; color: currentColor; opacity: .6; cursor: pointer; transition: opacity .2s, background .2s;
}
.alert-x:hover { opacity: 1; background: rgba(127,127,127,.18); }
.alert-x .ico { width: 14px; height: 14px; }
.alert.leaving { opacity: 0; transform: translateY(-6px); max-height: 0; margin-top: 0; margin-bottom: 0; padding-top: 0; padding-bottom: 0; overflow: hidden; }
@keyframes alertIn { from { opacity: 0; transform: translateY(-8px) scale(.985); } to { opacity: 1; transform: none; } }

/* deposit / link cards, support */
.cancel-form { margin-top: 14px; }
.pay .btn.hidden { display: none !important; }
.support-list { display: grid; gap: 10px; }
.tile .ti.wa { background: linear-gradient(135deg, #2bd46b 0%, #12a150 100%); box-shadow: 0 6px 14px rgba(18,161,80,.3); }
.footnote a { font-weight: 600; }
.linkcard p { margin-top: 10px; line-height: 1.5; }
.linkcard .status { margin: 14px 0; }
.linkcard form .btn, .linkcard > .btn { margin-top: 4px; }
.field.at .atsign { position: absolute; left: 16px; bottom: 14px; color: var(--muted); font-weight: 700; pointer-events: none; }
.field.at > input { padding-left: 34px; }
.field.at { display: block; margin-top: 7px; }
.field.at > input { margin-top: 0; }

@media (prefers-reduced-motion: reduce) {
  .ui-overlay, .ui-dialog, .ui-sheet, .ui-toast, .alert, .picker, .picker > .ico { transition: none !important; animation: none !important; }
}

/* ===================== P7: customer-service modal ===================== */
.ui-dialog.ui-support { width: min(400px, 100%); text-align: left; position: relative; padding: 22px 16px 16px; }
.ui-support .ui-ico { margin: 0 0 12px 4px; }
.ui-support h3, .ui-support p { padding: 0 44px 0 4px; }
.ui-support .ui-x-abs { position: absolute; top: 10px; right: 10px; width: 44px; height: 44px; }
.ui-support .ui-support-slot { margin-top: 16px; }
.ui-support .tile { text-align: left; }
.ui-support .ui-actions { margin-top: 14px; }

/* ===================== P8: unbreakable layout, flat buttons, full-width header, rich desktop ===================== */
:root { --top-h: 64px; --btn: #c92f15; --btn-hover: #b52a12; }
html { scroll-padding-top: calc(var(--top-h) + 12px); }

/* ---- nothing can break the layout: long words, long URLs, huge media ---- */
html, body { max-width: 100%; overflow-x: clip; }
body { overflow-wrap: break-word; word-wrap: break-word; }
.shell, .main-col, .wrap, .wrap > *, .card, .list, .item, .item-main, .tile, .tile .tt, .kv, .kv > *, .form, .form > *, label, .field,
.estimate, .stat, .balance-card > *, .profile > div, .pick-wrap, .alert > span, .pay, .hero-copy, .hero-art, .auth, .auth-split, .step, .cta,
.linkbox, .ui-dialog, .ui-sheet, .ui-opt, .col, .fund-main, .trust-panel, .secure-strip, .ss-t, .tp-list li, .tp-list li > div, .dash > *, .cols2 > * { min-width: 0; }
.wrap :is(h1, h2, h3, h4, p, span, b, strong, div, a, li, label, small, em) { overflow-wrap: anywhere; }
.btn, .pill, .chip, .vbadge, .count, .badge { overflow-wrap: normal; }
img, video, svg, canvas, iframe, embed, object { max-width: 100%; }
img, video { height: auto; }
input, select, textarea, button { max-width: 100%; }
pre, code, .linkbox, .mono { max-width: 100%; overflow-wrap: anywhere; }
pre { overflow-x: auto; }
.form { grid-template-columns: minmax(0, 1fr); }
select { text-overflow: ellipsis; }
.kv { flex-wrap: wrap; row-gap: 4px; }
.kv > b { flex: 1 1 auto; }
.page-title, .hello h2, .profile .nm, .card h3 { overflow-wrap: anywhere; hyphens: auto; }
.estimate { gap: 8px 12px; flex-wrap: wrap; }
.estimate b { overflow-wrap: anywhere; text-align: right; margin-left: auto; max-width: 100%; }
.pay .amount { font-size: clamp(30px, 8vw, 44px); overflow-wrap: anywhere; }
.stat .n, .side-bal .v, .balance-card .amount { overflow-wrap: anywhere; }
.item-side { flex: 0 1 auto; min-width: 0; max-width: 48%; }
.item-side .amt { overflow-wrap: anywhere; max-width: 100%; }
.pill { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.note-media { width: 100%; max-width: 100%; height: auto; max-height: 420px; object-fit: contain; }
.item-main img, .item-main video { max-width: 100%; height: auto; }
.tabbar a span:not(.tab-plus), .tabbar button span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-nav a > span:not(.count) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand { min-width: 0; flex: 0 1 auto; overflow: hidden; }
.brand-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.logo { flex: none; }
.top-right { flex: none; min-width: 0; }
.top-right .btn { white-space: nowrap; }
.chip-bal { max-width: 46vw; }
.chip-bal span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.alert span { overflow-wrap: anywhere; }
.ui-dialog, .ui-sheet, .ui-support { max-width: calc(100vw - 24px); }
.ui-dialog h3, .ui-dialog p, .ui-toast span, .ui-sheet-head h3 { overflow-wrap: anywhere; min-width: 0; }
.ui-opt { align-items: center; height: auto; }
.ui-opt .tick { margin-top: 0; }
.ui-opt .sub { white-space: normal; text-align: right; max-width: 40%; overflow-wrap: anywhere; }
.picker { max-width: 100%; height: auto; }
.picker .pv {
  white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2;
  overflow: hidden; overflow-wrap: anywhere; line-height: 1.3; flex: 1 1 auto;
}
.picker .pv .sub { display: block; margin: 2px 0 0; }

/* ---- flat buttons: no gradients, glow or inset highlights ---- */
.btn.primary, .btn.primary:hover { background: var(--btn); box-shadow: none; filter: none; }
.btn.primary:hover { background: var(--btn-hover); }
.btn:active, .icon-btn:active, .tile:active, .tabbar a:active, .tabbar button:active { transform: none; filter: brightness(.92); }
.btn.light, .btn.light:hover { box-shadow: none; }
.tabbar .tab-new .tab-plus { background: var(--btn); box-shadow: none; }
.chip.on { background: var(--btn); box-shadow: none; }
.tile:hover { transform: none; }
.logo, .auth-logo, .avatar, .fi, .tile .ti, .tile .ti.wa { box-shadow: none; }
.balance-card, .side-bal, .cta { box-shadow: none; }

/* ---- header: the BoostlyAds bar is on every page, every size ---- */
body.app .brand-name { display: inline; }
.icon-btn { min-width: 40px; height: 40px; padding: 0 9px; }
.user-chip {
  display: inline-flex; align-items: center; gap: 9px; height: 40px; padding: 0 14px 0 5px; max-width: 220px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--line); color: var(--text); font-weight: 600; font-size: 14px;
}
.user-chip:hover { text-decoration: none; background: var(--card2); }
.user-chip .un { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.avatar-sm { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--btn); color: #fff; font-weight: 800; font-size: 14px; flex: none; }
@media (max-width: 479px) { .chip-bal { display: none; } .top-right .btn.sm { padding: 0 12px; font-size: 14px; min-height: 40px; } .top-right { gap: 6px; } }
@media (max-width: 380px) { .top-right { gap: 4px; } .top-right .btn.sm { padding: 0 10px; } .topbar { padding-left: 12px; padding-right: 12px; gap: 6px; } .brand { font-size: 17px; gap: 8px; } .logo { width: 30px; height: 30px; } }

/* ---- shared components ---- */
.ep-mark { display: inline-grid; line-height: 0; flex: none; }
.ep-svg { display: block; border-radius: 10px; }
.vbadge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; background: var(--ok-bg); color: var(--ok); font-size: 12.5px; font-weight: 700; white-space: nowrap; flex: none; }
.vbadge.big { padding: 8px 16px; font-size: 15px; }
.secure-strip {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px 12px; padding: 12px 14px; margin: 0 0 16px; border-radius: 16px;
  background: var(--card2); background: color-mix(in srgb, #4f46e5 13%, var(--card)); border: 1px solid rgba(79,70,229,.32);
}
.ss-t { display: flex; flex-direction: column; flex: 1 1 170px; }
.ss-t b { font-size: 15px; letter-spacing: -.01em; }
.ss-t small { color: var(--muted); font-size: 12.5px; line-height: 1.35; }
.trust-panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; box-shadow: var(--shadow); margin: 0 0 14px; }
.tp-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.tp-title { font-size: 20px; font-weight: 800; letter-spacing: -.02em; margin-bottom: 6px; }
.tp-list { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 16px; }
.tp-list li { display: flex; gap: 12px; align-items: flex-start; }
.tp-list b { display: block; font-size: 15px; }
.tp-list small { display: block; color: var(--muted); font-size: 13.5px; line-height: 1.45; margin-top: 2px; }
.tp-i { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: none; }
.side-trust { display: flex; align-items: center; gap: 10px; padding: 12px 14px; margin-bottom: 8px; border-radius: 14px; background: var(--card2); color: var(--muted); font-size: 12.5px; font-weight: 600; line-height: 1.3; }
.bi { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex: none; color: var(--c, var(--text)); background: var(--bgc, var(--card2)); }
.bi.instagram { --c: #e1306c; --bgc: rgba(225,48,108,.14); }
.bi.tiktok { --c: #14b8c4; --bgc: rgba(20,184,196,.14); }
.bi.x { --c: var(--text); --bgc: rgba(127,127,127,.18); }
.bi.youtube { --c: #ef3b2d; --bgc: rgba(239,59,45,.14); }
.bi.telegram { --c: #2a9fdc; --bgc: rgba(42,159,220,.15); }
.bi.whatsapp { --c: #22b45a; --bgc: rgba(34,180,90,.15); }
.bi.appstore { --c: #4f7cff; --bgc: rgba(79,124,255,.15); }
.plat { display: inline-flex; align-items: center; gap: 8px; padding: 5px 14px 5px 5px; }
.hero-trust { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 4px 0 2px; }
.ht-t { font-size: 14px; color: var(--muted); }
.ht-t b { color: var(--text); }
.cta-row > * { flex: 0 1 auto; }
.only-desktop { display: none; }
.only-mobile { display: block; }
.center-title { justify-content: center; text-align: center; font-size: 24px; text-transform: none; letter-spacing: -.02em; color: var(--text); font-weight: 800; margin: 44px 4px 16px; }
.card.feat { transition: border-color .2s; }
.card.feat:hover { border-color: var(--accent); }
.trust-band {
  display: flex; align-items: center; flex-wrap: wrap; gap: 18px 22px; margin: 30px 0 8px; padding: 26px; border-radius: 26px;
  background: var(--card2); background: color-mix(in srgb, #4f46e5 14%, var(--card)); border: 1px solid rgba(79,70,229,.32);
}
.tb-copy { flex: 1 1 280px; }
.tb-copy h2 { font-size: 24px; font-weight: 800; letter-spacing: -.02em; margin-bottom: 6px; }
.tb-copy p { color: var(--muted); line-height: 1.55; }
.sf-links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.auth-aside { display: none; }
.auth-split { display: block; }
.bc-art { display: none; }
.cols2 { display: grid; gap: 0 28px; }
.col { min-width: 0; }
.quick.one { grid-template-columns: 1fr; }
.tips h3, .side-info h3 { margin-bottom: 4px; }
.tip-list, .flow { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 12px; }
.tip-list li { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; line-height: 1.45; color: var(--muted); }
.tip-list .tp-i { width: 26px; height: 26px; border-radius: 9px; }
.flow li { display: flex; gap: 12px; align-items: flex-start; color: var(--muted); font-size: 14.5px; line-height: 1.45; }
.flow b { width: 28px; height: 28px; border-radius: 10px; display: grid; place-items: center; background: var(--btn); color: #fff; flex: none; font-size: 14px; }
.more-link.back { margin: 14px 4px 0; }
.cards2 { display: grid; gap: 0; }
.cards2 .card { margin-bottom: 14px; }
.col > .section-title:first-child { margin-top: 4px; }

/* inbox: icon stays at the top of the message, however tall the message or media gets */
.item-ico { align-self: flex-start; }
.item.note { align-items: flex-start; }

/* ---- hero dashboard illustration ---- */
.hero-dash { width: 100%; max-width: 640px; height: auto; overflow: visible; }
.dh-win { fill: var(--card); stroke: var(--line-strong); stroke-width: 1.5; }
.dh-sep { fill: var(--line); }
.dh-act { fill: var(--accent-soft); }
.dh-line { fill: var(--muted); opacity: .28; }
.dh-tile { fill: var(--card2); }
.dh-bar { fill: var(--card3); }
.dh-w { fill: #fff; font: 700 12px var(--font); }
.dh-w.s11 { font-size: 11px; letter-spacing: .08em; opacity: .92; }
.dh-w.s26 { font-size: 28px; font-weight: 800; letter-spacing: -.02em; }
.dh-btn { fill: #b8230f; font: 700 14px var(--font); }
.dh-n { fill: var(--text); font: 800 16px var(--font); }
.dh-n.s13 { font-size: 13px; font-weight: 700; }
.dh-k { fill: var(--muted); font: 600 11px var(--font); }
.dh-k.b { font-weight: 700; }
.dh-ok { fill: var(--ok-bg); }
.dh-warn { fill: var(--warn-bg); }
.dh-okstroke { stroke: var(--ok); }
.dh-okt { fill: var(--ok); font: 700 13px var(--font); }
.dh-okt.s12 { font-size: 12px; }
.dh-pill.ok { fill: var(--ok); opacity: .9; }
.dh-pill.warn { fill: var(--warn); opacity: .9; }
.dh-float { fill: var(--card); stroke: var(--line-strong); stroke-width: 1.2; filter: drop-shadow(0 12px 22px rgba(0,0,0,.30)); }
.dh-brandbg { fill: var(--accent-soft); }

/* ---- fund ---- */
.fund-grid { display: block; }
.fund-grid .trust-panel { margin-top: 14px; }

/* ================= desktop ================= */
@media (min-width: 900px) {
  /* app shell: header across the top, sidebar below it */
  body.public .shell { display: block; }
  body.app .shell { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); grid-template-rows: var(--top-h) minmax(0, 1fr); grid-template-areas: "top top" "side main"; min-height: 100vh; }
  body.app .topbar { display: flex; grid-area: top; height: var(--top-h); padding: 0 28px 0 24px; }
  body.app .sidebar { grid-area: side; top: var(--top-h); height: calc(100vh - var(--top-h)); padding: 22px 16px 20px; overflow-y: auto; }
  body.app .main-col { grid-area: main; }
  body.app .tabbar { display: none; }
  body.public .topbar { height: var(--top-h); padding-top: 0; padding-bottom: 0; padding-left: max(32px, calc((100% - 1180px) / 2 + 18px)); padding-right: max(32px, calc((100% - 1180px) / 2 + 18px)); }
  .topbar { height: var(--top-h); }
  .top-right { gap: 10px; }
  .brand { font-size: 21px; }
  .logo { width: 38px; height: 38px; border-radius: 12px; }
  .icon-btn { min-width: 42px; height: 42px; }
  .chip-bal { height: 42px; }
  .user-chip { height: 42px; }
  body.app .wrap { max-width: 1240px; padding: 28px 48px 72px; margin: 0 auto; }
  body.public .wrap { max-width: 1180px; padding: 12px 18px 72px; }
  body.app .page-title { font-size: 40px; margin-top: 6px; }
  body.app .wrap > form.card, body.app .wrap > .card.pay, body.app .wrap > .card:not(.feat) { max-width: none; }
  body.app .wrap > .list, body.app .wrap > .empty { max-width: 920px; }
  .cols2 { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .cards2 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; align-items: stretch; }
  .only-desktop { display: block; }
  .only-mobile { display: none; }
  .hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 36px; padding: 56px 0 28px; }
  .hero h1 { font-size: clamp(46px, 5.1vw, 76px); }
  .hero .lede { font-size: 19px; max-width: 48ch; }
  .hero-art { justify-content: flex-end; }
  .hero-trust { margin: 6px 0 4px; }
  .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
  .card.feat { padding: 24px; }
  .steps { gap: 18px; }
  .trust-band { padding: 34px 40px; margin-top: 44px; }
  .cta { padding: 54px 32px; margin-top: 44px; border-radius: 32px; }
  .site-foot { margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--line); }
  .center-title { font-size: 32px; margin: 64px 4px 22px; }

  .auth-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); max-width: 1040px; margin: 28px auto 0; min-height: 640px; border-radius: 32px; overflow: hidden; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); }
  .auth-aside { display: flex; flex-direction: column; justify-content: center; gap: 24px; padding: 52px 46px; color: #fff; position: relative; overflow: hidden; background: linear-gradient(150deg, #a81d10 0%, #bd2c0c 55%, #c9400b 100%); }
  .auth-aside::before, .auth-aside::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255,255,255,.10); pointer-events: none; }
  .auth-aside::before { width: 320px; height: 320px; right: -110px; top: -110px; }
  .auth-aside::after { width: 220px; height: 220px; left: -80px; bottom: -90px; background: rgba(255,255,255,.07); }
  .auth-aside > * { position: relative; z-index: 1; }
  .aa-logo { width: 62px; height: 62px; border-radius: 20px; display: grid; place-items: center; background: rgba(255,255,255,.18); color: #fff; }
  .auth-aside h2 { font-size: 34px; line-height: 1.12; font-weight: 800; letter-spacing: -.03em; }
  .aa-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
  .aa-list li { display: flex; align-items: center; gap: 14px; font-size: 16px; font-weight: 600; line-height: 1.35; }
  .aa-i { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; background: rgba(255,255,255,.18); flex: none; }
  .aa-plats { display: flex; flex-wrap: wrap; gap: 12px; }
  .aa-plats .ico { width: 36px; height: 36px; padding: 8px; border-radius: 12px; background: rgba(255,255,255,.16); }
  .aa-ep { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; font-size: 14px; font-weight: 600; margin-top: 4px; }
  .aa-ep .vbadge { background: #fff; color: #176b32; }
  .auth-split .auth { max-width: none; margin: 0; padding: 48px 52px; display: flex; flex-direction: column; justify-content: center; }
  .auth-split .auth .card { box-shadow: none; border: 0; background: transparent; padding: 0; }
  .auth-split .auth-head { margin-top: 0; }

  .fund-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 28px; align-items: start; }
  .fund-grid .trust-panel { margin-top: 0; position: sticky; top: calc(var(--top-h) + 24px); }
  .balance-card .bc-art { display: block; width: 120px; height: 56px; margin-left: auto; opacity: .9; }
  .balance-card { flex-wrap: nowrap; padding: 28px; }
  .stat { padding: 20px; }
  .side-bal { margin-top: 16px; }
}
@media (min-width: 1100px) {
  .dash { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); column-gap: 28px; align-items: start; }
  .dash-b .quick { grid-template-columns: 1fr; }
  .dash-b .section-title:first-child, .dash-d .section-title:first-child, .dash-c .section-title:first-child { margin-top: 4px; }
  body.app .quick { margin-top: 0; }
}
@media (max-width: 899px) {
  .dash > div > .section-title:first-child { margin-top: 28px; }
}


/* ---------- P8b: containment + small-phone header fit ---------- */
.item-side { flex: 0 1 auto; min-width: 0; max-width: 46%; }
.item-side .amt, .item-side .pill { max-width: 100%; }
.pill { overflow: hidden; text-overflow: ellipsis; }
.brand { flex: 0 1 auto; min-width: 0; }
.brand-name { overflow: hidden; text-overflow: ellipsis; }
.top-right { flex: none; }
@media (max-width: 380px) {
  .topbar { padding-left: 10px; padding-right: 10px; gap: 4px; }
  .top-right { gap: 4px; }
  .icon-btn { padding: 0 6px; }
  .brand { gap: 7px; font-size: 16px; }
  .logo { width: 28px; height: 28px; border-radius: 9px; }
  .top-right .btn.sm { padding: 0 10px; font-size: 13px; }
}
@media (max-width: 340px) { .logo { display: none; } }

/* ---------- password reveal ---------- */
input[type=password] { padding-right: 52px; }
.field > .pw-eye {
  position: absolute; right: 5px; bottom: 5px; width: 40px; height: 40px; padding: 0; margin: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 12px; background: transparent; color: var(--muted);
  cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation;
  transition: color .15s, background .15s;
}
.field > .pw-eye:hover, .field > .pw-eye:focus-visible { color: var(--text); background: var(--card3); outline: none; }
.field > .pw-eye.on { color: var(--accent); }
.field > .pw-eye span { display: inline-flex; line-height: 0; }
.field > .pw-eye .e-shut { display: none; }
.field > .pw-eye.on .e-open { display: none; }
.field > .pw-eye.on .e-shut { display: inline-flex; }

/* ---------- P9: desktop + logo ---------- */
@media (min-width: 1100px) { body.app .dash-b .quick { grid-template-columns: 1fr; } }
.logo, .aa-logo, .auth-logo { background: none; padding: 0; overflow: hidden; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: inherit; }
.logo img, .aa-logo img, .auth-logo img { width: 100%; height: 100%; display: block; object-fit: cover; border-radius: 50%; }

/* ---- P14: single-column tile stacks stay full width on desktop ---- */
body.app .quick.one { grid-template-columns: minmax(0, 1fr); }

/* ---- P14: no native scrollbars anywhere (scrolling still works) ---- */
* { scrollbar-width: none; -ms-overflow-style: none; }
*::-webkit-scrollbar, *::-webkit-scrollbar-thumb, *::-webkit-scrollbar-track { width: 0; height: 0; display: none; background: transparent; }

/* ---- P14: drop browser-default widgets inside inputs ---- */
input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
input[type="number"]::-webkit-inner-spin-button, input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input::-ms-reveal, input::-ms-clear { display: none; }
input[type="search"]::-webkit-search-cancel-button, input[type="search"]::-webkit-search-decoration { -webkit-appearance: none; display: none; }
input:-webkit-autofill, input:-webkit-autofill:hover, input:-webkit-autofill:focus, textarea:-webkit-autofill, select:-webkit-autofill {
  -webkit-text-fill-color: var(--text); caret-color: var(--text); transition: background-color 600000s 0s, color 600000s 0s;
  box-shadow: 0 0 0 1000px var(--card2) inset;
}

/* ---- P14b: 900-1099 band must not squeeze (narrow laptop / tablet landscape) ---- */
@media (min-width: 900px) and (max-width: 1099px) {
  body.app { --side-w: 224px; }
  body.app .wrap { padding-left: 32px; padding-right: 32px; }
  body.app .quick { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hist-grid { grid-template-columns: minmax(0, 1fr); }
  .item-side { max-width: 38%; }
}

/* P16: engagement quantity hint */
.hintline { display: block; color: var(--muted); font-size: 13px; font-weight: 600; line-height: 1.45; margin: -4px 0 12px; }
.hintline[hidden] { display: none; }

/* P17 broadcast audience toggle */
.aud { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.aud .aud-opt { position: relative; display: block; margin: 0; }
.aud .aud-opt input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.aud .aud-opt span { display: block; text-align: center; padding: 11px 6px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); color: var(--text); font-weight: 600; font-size: 14px; }
.aud .aud-opt input:checked + span { background: var(--accent); border-color: var(--accent); color: #fff; }
.aud .aud-opt input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

/* P19: notification images keep their natural ratio, rounded, click to zoom */
img.note-media { width: auto; max-width: 100%; height: auto; max-height: 420px; object-fit: contain; border-radius: 16px; background: transparent; cursor: zoom-in; -webkit-tap-highlight-color: transparent; }
.lb { position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(0,0,0,.88); opacity: 0; transition: opacity .18s ease; cursor: zoom-out; }
.lb.on { opacity: 1; }
.lb img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; border-radius: 16px; box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.lb-x { position: absolute; top: calc(14px + env(safe-area-inset-top, 0px)); right: 14px; width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgba(255,255,255,.16); color: #fff; font-size: 22px; line-height: 40px; text-align: center; cursor: pointer; }

/* P20: perfectly centered close X drawn with two bars */
.lb-x { padding: 0; font-size: 0; line-height: 0; display: block; }
.lb-x::before, .lb-x::after { content: ""; position: absolute; left: 50%; top: 50%; width: 18px; height: 2px; margin: -1px 0 0 -9px; border-radius: 2px; background: #fff; }
.lb-x::before { transform: rotate(45deg); }
.lb-x::after { transform: rotate(-45deg); }

/* P23: low-minimum line in hero */
.from-pill { display: inline-flex; align-items: center; gap: 8px; margin: 2px 0 10px; padding: 8px 14px; border-radius: 14px; background: var(--ok-bg); color: var(--ok); font-size: 15px; font-weight: 600; }
.from-pill b { font-weight: 800; }