/* CryptoGig — "warm cyberpunk": dark, soft glows, semantic color = trust system. */
:root {
  --bg: #0B0D12; --surface: #141822; --surface-2: #1C2130; --border: #262C3D;
  --text: #E8ECF4; --muted: #8B93A7;
  --mint: #2EE6A8; --amber: #FFB648; --coral: #FF6B6B; --iris: #7C6CFF;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --r: 14px;
}
* { box-sizing: border-box; margin: 0; }
html, body { background: var(--bg); color: var(--text);
  font: 15px/1.45 Inter, system-ui, -apple-system, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
.mono, .addr, .pid, .num { font-family: var(--mono); }
.muted { color: var(--muted); }

/* shell */
.page { max-width: 560px; margin: 0 auto; padding: 16px 16px 120px; display: grid; gap: 14px; }
.boot { height: 100vh; display: grid; place-content: center; gap: 16px; text-align: center; }
.boot-logo { font-size: 22px; letter-spacing: .12em; color: var(--iris); }
.boot-bar { width: 120px; height: 3px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.boot-bar i { display: block; height: 100%; width: 40%; background: var(--iris); animation: slide 1s infinite; }
@keyframes slide { 0% { transform: translateX(-100%);} 100% { transform: translateX(300%);} }

/* topbar & brand */
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 2px 2px 0; }
.brand { font-weight: 700; letter-spacing: .06em; }
.brand::before { content: "◈ "; color: var(--iris); }
.brand-big { font-size: 26px; font-weight: 800; letter-spacing: .1em; text-align: center; margin: 24px 0 4px; }
.brand-big::before { content: "◈ "; color: var(--iris); }
.brand-sub { text-align: center; color: var(--muted); margin-bottom: 24px; }
.pid { font-size: 12px; color: var(--iris); background: var(--surface); border: 1px solid var(--border);
  padding: 5px 10px; border-radius: 99px; }

/* cards */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 16px; }
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.card.bal { position: relative; padding: 14px; }
.card.bal::before { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px; border-radius: 99px; }
.b-mint::before { background: var(--mint); } .b-amber::before { background: var(--amber); } .b-iris::before { background: var(--iris); }
.bal-l { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.bal-v { font-size: 20px; font-weight: 700; margin-top: 6px; }
.bal-s { font-size: 11px; color: var(--muted); margin-top: 4px; }
.terms { white-space: pre-wrap; color: var(--text); }
.center { text-align: center; display: grid; gap: 10px; justify-items: center; }

/* badges — semantic only, never decorative */
.badge { font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 99px; white-space: nowrap; }
.c-mint  { color: var(--mint);  background: color-mix(in srgb, var(--mint) 12%, transparent); }
.c-amber { color: var(--amber); background: color-mix(in srgb, var(--amber) 12%, transparent); }
.c-iris  { color: var(--iris);  background: color-mix(in srgb, var(--iris) 14%, transparent); }
.c-coral { color: var(--coral); background: color-mix(in srgb, var(--coral) 12%, transparent); }
.c-muted { color: var(--muted); background: var(--surface-2); }
.chip { font-size: 11px; color: var(--muted); border: 1px solid var(--border); padding: 3px 9px; border-radius: 99px; }

/* buttons & inputs */
.btn { border: 0; border-radius: 12px; padding: 12px 16px; font-weight: 600; font-size: 14px; cursor: pointer;
  background: var(--surface-2); color: var(--text); transition: transform .06s, opacity .15s; }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--iris); color: #0B0D12; }
.btn.ghost { background: transparent; border: 1px solid var(--border); }
.btn.danger { background: transparent; border: 1px solid var(--coral); color: var(--coral); }
.btn.sm { padding: 7px 12px; font-size: 12px; }
.btn.block { width: 100%; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.field { display: grid; gap: 6px; }
.f-l { font-size: 12px; color: var(--muted); }
.input { width: 100%; background: var(--surface-2); border: 1px solid var(--border); color: var(--text);
  border-radius: 12px; padding: 12px 14px; font-size: 15px; outline: none; }
.input:focus { border-color: var(--iris); }
textarea.ta { min-height: 110px; resize: vertical; font: inherit; }
select.input { appearance: none; }
.form { display: grid; gap: 12px; }
.hint { font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.preview { border: 1px dashed var(--amber); color: var(--amber); border-radius: 12px; padding: 12px 14px; font-size: 13.5px; }
.preview .hint { color: var(--muted); margin-top: 4px; }

/* rows / lists */
.rows { display: grid; gap: 8px; }
.row { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r); padding: 13px 14px; }
.row .grow { flex: 1; min-width: 0; }
.row-t { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-s { font-size: 12px; color: var(--muted); margin-top: 2px; }
.right { text-align: right; }
.num.big { font-size: 22px; font-weight: 700; }
.num.pos { color: var(--mint); } .num.neg { color: var(--coral); }
.sect { display: grid; gap: 10px; }
.sect-h { font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.empty { color: var(--muted); text-align: center; padding: 34px 12px; border: 1px dashed var(--border); border-radius: var(--r); }
.banner { display: block; background: color-mix(in srgb, var(--amber) 10%, transparent); color: var(--amber);
  border: 1px solid color-mix(in srgb, var(--amber) 30%, transparent); border-radius: 12px; padding: 11px 14px; font-size: 13.5px; }

/* deposit / identity */
.dep { display: grid; gap: 10px; }
.dep-h { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--muted); }
.addr { background: var(--surface-2); border-radius: 10px; padding: 11px 12px; font-size: 12.5px;
  word-break: break-all; color: var(--text); }
.dep-a { display: flex; gap: 10px; align-items: center; }
.warn { font-size: 11.5px; color: var(--amber); }
.ident { background: linear-gradient(135deg, #1A1633 0%, #141822 55%, #0f2b26 100%);
  border: 1px solid var(--border); border-radius: 18px; padding: 20px; display: flex; justify-content: space-between; }
.ident-brand { font-size: 11px; letter-spacing: .14em; color: var(--muted); }
.ident-id { font-size: 21px; font-weight: 700; margin: 12px 0 6px; letter-spacing: .04em; }
.ident-s { font-size: 11.5px; color: var(--muted); }
.ident-r { color: var(--iris); font-weight: 800; opacity: .8; }

/* timeline */
.timeline { display: flex; gap: 0; margin-top: 16px; }
.step { flex: 1; display: grid; justify-items: center; gap: 6px; font-size: 10.5px; color: var(--muted); position: relative; }
.step i { width: 10px; height: 10px; border-radius: 99px; background: var(--surface-2); border: 2px solid var(--border); z-index: 1; }
.step::before { content: ""; position: absolute; top: 5px; left: -50%; width: 100%; height: 2px; background: var(--border); }
.step:first-child::before { display: none; }
.step.done i { background: var(--mint); border-color: var(--mint); }
.step.done::before { background: var(--mint); }
.step.now i { border-color: var(--iris); box-shadow: 0 0 10px var(--iris); animation: blink 1.6s infinite; }
@keyframes blink { 50% { box-shadow: 0 0 3px var(--iris); } }

/* ring (countdown) */
.ring { width: 96px; height: 96px; border-radius: 50%; display: grid; place-items: center; margin: 6px auto; }
.ring span { width: 74px; height: 74px; border-radius: 50%; background: var(--surface); display: grid; place-items: center;
  font-family: var(--mono); font-size: 13px; font-weight: 700; }

/* nav + FAB */
#nav { position: fixed; bottom: 0; left: 0; right: 0; z-index: 40; padding-bottom: env(safe-area-inset-bottom); }
.nav-in { max-width: 560px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr 76px 1fr 1fr;
  background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(14px);
  border-top: 1px solid var(--border); }
.nav-in a { display: grid; justify-items: center; gap: 3px; padding: 10px 0 12px; font-size: 10.5px; color: var(--muted); }
.nav-in a .ico { font-size: 17px; }
.nav-in a.active { color: var(--iris); }
.fab { width: 58px; height: 58px; margin-top: -26px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--iris); color: #0B0D12; font-size: 24px; justify-self: center;
  box-shadow: 0 6px 22px color-mix(in srgb, var(--iris) 45%, transparent); animation: pulse 3s infinite; }
@keyframes pulse {
  0%,100% { box-shadow: 0 6px 22px color-mix(in srgb, var(--iris) 45%, transparent); }
  50%     { box-shadow: 0 6px 30px color-mix(in srgb, var(--iris) 80%, transparent); }
}
#mainfallback { position: fixed; left: 16px; right: 16px; bottom: 84px; z-index: 45; max-width: 528px; margin: 0 auto; }

/* modal / sheet / toast */
.overlay { position: fixed; inset: 0; background: rgba(5, 6, 10, .72); backdrop-filter: blur(4px);
  display: grid; place-items: center; z-index: 60; padding: 20px; }
.modal { width: 100%; max-width: 420px; }
.sheet { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 18px;
  display: grid; gap: 10px; width: 100%; max-width: 420px; }
.sheet-t { font-weight: 700; margin-bottom: 4px; }
.sheet-s { font-size: 12px; color: var(--muted); }
.m-t { font-size: 17px; font-weight: 700; }
.toast { position: fixed; top: 16px; left: 50%; transform: translate(-50%, -80px); z-index: 70;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text);
  padding: 11px 18px; border-radius: 12px; font-size: 13.5px; transition: transform .25s; max-width: 90vw; }
.toast.show { transform: translate(-50%, 0); }
.t-warn { border-color: var(--amber); color: var(--amber); }
.back { color: var(--muted); font-size: 13px; }
.jd-h { display: flex; justify-content: space-between; gap: 10px; align-items: start; }
.jd-t { font-size: 18px; font-weight: 700; }
.jd-budget { display: flex; gap: 10px; align-items: center; margin-top: 12px; }
.auth { max-width: 560px; margin: 0 auto; padding: 0 16px 60px; display: grid; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tab { background: transparent; border: 1px solid var(--border); color: var(--muted); border-radius: 10px; padding: 9px; font-weight: 600; }
.tab.on { color: var(--iris); border-color: var(--iris); background: color-mix(in srgb, var(--iris) 8%, transparent); }
