/* Trinex Pay — Mini App. Чёрный + хром/серебро, зелёный — успех, красный — ошибки. */
:root {
  --bg: #0a0a0b;
  --bg2: #111113;
  --card: #161618;
  --card2: #1d1d20;
  --line: rgba(255, 255, 255, 0.08);
  --line2: rgba(255, 255, 255, 0.14);
  --text: #f4f4f5;
  --muted: #9a9aa2;
  --dim: #5f5f66;
  --chrome: linear-gradient(180deg, #ffffff 0%, #d9d9de 38%, #9c9ca4 62%, #e9e9ee 100%);
  --chrome-text: linear-gradient(180deg, #ffffff 0%, #e2e2e6 45%, #8f8f97 100%);
  --green: #2fd35b;
  --green-bg: rgba(47, 211, 91, 0.12);
  --red: #ff4d4f;
  --red-bg: rgba(255, 77, 79, 0.12);
  --blue: #6aa8ff;
  --amber: #ffc24a;
  --r: 16px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --head: "Montserrat", "Inter", sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.4 var(--font); }
body { min-height: 100vh; overscroll-behavior-y: none; }
body::before {   /* лёгкое свечение сверху, как блики хрома на логотипе */
  content: ""; position: fixed; inset: 0 0 auto 0; height: 340px; pointer-events: none; z-index: 0;
  background: radial-gradient(70% 60% at 50% 0%, rgba(255,255,255,0.09), transparent 70%);
}
#app { position: relative; z-index: 1; max-width: 520px; margin: 0 auto; padding: 14px 16px calc(28px + env(safe-area-inset-bottom)); }
button, input, textarea { font: inherit; color: inherit; }
a { color: inherit; }

.boot { min-height: 80vh; display: grid; place-items: center; }
.boot img { width: 96px; height: 96px; border-radius: 50%; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .55; transform: scale(.96); } }

/* ── типографика ── */
.h1 { font: 900 26px/1.1 var(--head); letter-spacing: .5px; text-transform: uppercase; margin: 0;
      background: var(--chrome-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.h2 { font: 800 18px/1.2 var(--head); letter-spacing: .3px; text-transform: uppercase; margin: 0 0 12px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .2px; }

/* ── блоки ── */
.page { display: flex; flex-direction: column; gap: 14px; animation: in .22s ease-out; }
@keyframes in { from { opacity: 0; transform: translateY(6px); } }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; }
.card--chrome { position: relative; background: linear-gradient(160deg, #1f1f23 0%, #121214 60%); border-color: var(--line2); }
.card--chrome::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.06) 48%, transparent 66%); }
.label { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; margin: 0 0 8px; }
.row { display: flex; align-items: center; gap: 10px; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sep { height: 1px; background: var(--line); margin: 12px 0; }

/* ── кнопки ── */
.btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 52px;
       border: 0; border-radius: 14px; font-weight: 700; font-size: 16px; cursor: pointer; padding: 0 18px;
       transition: transform .08s, opacity .15s; }
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .35; pointer-events: none; }
.btn--chrome { background: var(--chrome); color: #0b0b0c; box-shadow: 0 6px 24px rgba(255,255,255,0.08), inset 0 1px 0 #fff; }
.btn--ghost { background: var(--card2); border: 1px solid var(--line); color: var(--text); font-weight: 600; }
.btn--danger { background: var(--red-bg); color: var(--red); border: 1px solid rgba(255,77,79,.3); }
.btn--sm { min-height: 40px; font-size: 14px; border-radius: 12px; width: auto; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; cursor: pointer;
        display: flex; flex-direction: column; gap: 6px; text-align: left; min-height: 84px; position: relative; }
.tile:active { transform: scale(.98); }
.tile__ico { font-size: 22px; }
.tile__t { font-weight: 700; }
.tile__s { font-size: 12px; color: var(--muted); }
.tile.on { border-color: #e5e5ea; background: linear-gradient(160deg, #26262a, #18181b); box-shadow: 0 0 0 1px rgba(255,255,255,.35) inset; }
.tile.on::after { content: "✓"; position: absolute; top: 10px; right: 12px; width: 22px; height: 22px; border-radius: 50%;
                  background: var(--green); color: #04150a; font-weight: 900; font-size: 13px; display: grid; place-items: center; }
.badge { position: absolute; top: 10px; right: 10px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px;
         background: var(--amber); color: #1a1200; font-size: 12px; font-weight: 800; display: grid; place-items: center; }

/* ── главная ── */
.hero { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 6px 0 2px; }
.hero__logo { width: 132px; height: 132px; border-radius: 50%; box-shadow: 0 0 0 1px rgba(255,255,255,.15), 0 12px 50px rgba(255,255,255,.12); }
.hero__sub { color: var(--muted); font-size: 14px; text-align: center; }
.rate { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.rate__v { font: 900 30px/1 var(--head); }
.rate__v small { font: 700 15px var(--font); color: var(--muted); margin-left: 4px; }
.rate__pdf { margin-top: 10px; font-size: 13px; color: var(--muted); }
.notice { border-radius: 14px; padding: 12px 14px; font-size: 14px; line-height: 1.45; }
.notice--warn { background: rgba(255,194,74,.1); border: 1px solid rgba(255,194,74,.28); color: #ffd98a; }
.notice--err { background: var(--red-bg); border: 1px solid rgba(255,77,79,.3); color: #ff9c9d; }
.notice--ok { background: var(--green-bg); border: 1px solid rgba(47,211,91,.3); color: #8ff0ab; }
.notice--info { background: var(--card2); border: 1px solid var(--line); color: var(--muted); }
.active-order { cursor: pointer; }
.links { display: flex; gap: 10px; }
.links .btn { flex: 1; }

/* ── шаги ── */
.steps { display: flex; gap: 6px; }
.steps i { flex: 1; height: 3px; border-radius: 2px; background: rgba(255,255,255,.1); }
.steps i.on { background: var(--chrome); }
.steps i.done { background: var(--green); }
.steps-l { display: flex; justify-content: space-between; font-size: 11px; font-weight: 600; color: var(--dim); margin-top: 6px; }
.steps-l .on { color: var(--text); } .steps-l .done { color: var(--green); }

/* ── поля ── */
.field { display: flex; align-items: center; background: var(--bg2); border: 1px solid var(--line2); border-radius: 14px;
         padding: 0 14px; min-height: 54px; transition: border-color .15s; }
.field:focus-within { border-color: #d9d9de; }
.field input, .field textarea { flex: 1; min-width: 0; background: none; border: 0; outline: 0; font-size: 17px; padding: 14px 0; }
.field textarea { resize: none; font-size: 14px; min-height: 60px; }
.field--big input { font: 800 26px var(--head); }
.field.err { border-color: var(--red); }
.seg { display: flex; background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 3px; gap: 3px; }
.seg button { flex: 1; border: 0; background: none; border-radius: 9px; min-height: 36px; font-weight: 700; font-size: 14px; color: var(--muted); cursor: pointer; }
.seg button.on { background: var(--chrome); color: #0b0b0c; }
.seg--mini button { min-height: 30px; padding: 0 12px; font-size: 13px; }
.conv { margin-top: 10px; display: flex; justify-content: space-between; align-items: baseline; }
.conv b { font: 800 20px var(--head); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.chip { border: 1px solid var(--line2); background: var(--card2); border-radius: 20px; padding: 6px 12px; font-size: 13px; font-weight: 600; cursor: pointer; }
.hint { font-size: 12.5px; color: var(--muted); margin-top: 8px; }
.hint.err { color: var(--red); }

.switch { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.switch__box { margin-left: auto; width: 48px; height: 28px; border-radius: 14px; background: #2a2a2e; position: relative; flex: none; transition: background .2s; }
.switch__box::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #8d8d94; transition: .2s; }
.switch.on .switch__box { background: var(--green); }
.switch.on .switch__box::after { left: 23px; background: #fff; }
.pdf-ico { width: 40px; height: 40px; border-radius: 10px; background: #2b1414; color: #ff6b6b; font: 900 11px var(--head);
           display: grid; place-items: center; flex: none; border: 1px solid rgba(255,107,107,.3); }

/* банк */
.bank-pick { position: relative; }
.bank-list { margin-top: 8px; max-height: 300px; overflow-y: auto; border: 1px solid var(--line2); border-radius: 14px; background: var(--bg2); }
.bank-opt { display: flex; align-items: center; gap: 10px; padding: 11px 14px; cursor: pointer; border-bottom: 1px solid var(--line); }
.bank-opt:last-child { border-bottom: 0; }
.bank-opt:active { background: var(--card2); }
.bank-logo { width: 28px; height: 28px; border-radius: 8px; background: #fff; object-fit: contain; flex: none; }
.bank-logo--none { display: grid; place-items: center; background: var(--card2); color: var(--muted); font-size: 14px; font-weight: 700; }
.bank-chosen { display: flex; align-items: center; gap: 12px; background: var(--bg2); border: 1px solid var(--line2); border-radius: 14px; padding: 12px 14px; cursor: pointer; }
.bank-chosen .bank-logo { width: 34px; height: 34px; }
.bank-chosen b { flex: 1; }
.bank-pop { display: flex; gap: 8px; overflow-x: auto; margin: 10px -2px 0; padding: 0 2px 4px; scrollbar-width: none; }
.bank-pop::-webkit-scrollbar { display: none; }
.bank-pop .chip { display: flex; align-items: center; gap: 6px; white-space: nowrap; flex: none; }
.sum__r span:last-child .bank-logo { width: 20px; height: 20px; border-radius: 5px; vertical-align: -5px; margin-right: 4px; display: inline-grid; font-size: 11px; }
.bank-pop .bank-logo { width: 18px; height: 18px; border-radius: 5px; font-size: 11px; }

/* итог / оплата */
.sum { display: flex; flex-direction: column; gap: 8px; }
.sum__r { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.sum__r span:first-child { color: var(--muted); }
.sum__r span:last-child { text-align: right; font-weight: 600; overflow-wrap: anywhere; }
.sum__big { display: flex; justify-content: space-between; align-items: baseline; }
.sum__big b { font: 900 24px var(--head); }
.copy { display: flex; align-items: center; gap: 10px; background: var(--bg2); border: 1px solid var(--line2); border-radius: 14px; padding: 12px 14px; cursor: pointer; }
.copy__v { flex: 1; min-width: 0; font-weight: 700; overflow-wrap: anywhere; }
.copy__v.addr { font-family: ui-monospace, Menlo, monospace; font-size: 13.5px; letter-spacing: .2px; }
.copy__i { flex: none; font-size: 12px; font-weight: 700; color: #0b0b0c; background: var(--chrome); border-radius: 8px; padding: 6px 10px; }
.netpill { display: inline-flex; align-items: center; gap: 6px; background: #2a1212; border: 1px solid rgba(255,77,79,.35); color: #ff8a8b; border-radius: 20px; padding: 4px 10px; font-size: 12px; font-weight: 800; letter-spacing: .4px; }
ol.how { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: #d6d6db; }

/* успех */
.done-ico { width: 92px; height: 92px; border-radius: 26px; margin: 18px auto 4px; display: grid; place-items: center;
            background: linear-gradient(160deg, #3be66a, #17a83f); box-shadow: 0 12px 40px rgba(47,211,91,.35), inset 0 2px 0 rgba(255,255,255,.4);
            font-size: 52px; color: #fff; font-weight: 900; animation: pop .35s cubic-bezier(.2,1.4,.4,1); }
@keyframes pop { from { transform: scale(.4); opacity: 0; } }

/* заказы */
.ord { display: flex; flex-direction: column; gap: 6px; cursor: pointer; }
.ord:active { transform: scale(.99); }
.st { display: inline-flex; align-items: center; gap: 5px; border-radius: 20px; padding: 3px 10px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.st--new { background: rgba(255,194,74,.12); color: var(--amber); }
.st--in_progress { background: rgba(106,168,255,.12); color: var(--blue); }
.st--completed { background: var(--green-bg); color: var(--green); }
.st--cancelled { background: var(--red-bg); color: var(--red); }
.timeline { display: flex; justify-content: space-between; position: relative; margin: 6px 4px 2px; }
.timeline::before { content: ""; position: absolute; left: 10px; right: 10px; top: 10px; height: 2px; background: var(--line2); }
.tl { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 11.5px; color: var(--dim); width: 33%; text-align: center; }
.tl i { width: 22px; height: 22px; border-radius: 50%; background: #2a2a2e; border: 2px solid var(--bg); display: grid; place-items: center; font-style: normal; font-size: 12px; color: #000; font-weight: 900; }
.tl.on { color: var(--text); } .tl.on i { background: var(--green); }
.tl.cur i { background: var(--chrome); }
.tl.bad i { background: var(--red); color: #fff; }

/* рефералы */
.big-num { font: 900 32px/1 var(--head); }
.stat { background: var(--bg2); border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.stat b { display: block; font: 800 20px var(--head); margin-top: 4px; }
.list-row { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.list-row:last-child { border-bottom: 0; }

.empty { text-align: center; color: var(--muted); padding: 40px 10px; }
.empty b { display: block; font-size: 40px; margin-bottom: 8px; }

.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); opacity: 0;
         background: #f4f4f5; color: #0b0b0c; font-weight: 700; font-size: 14px; padding: 11px 18px; border-radius: 12px;
         pointer-events: none; transition: .25s; z-index: 50; max-width: calc(100% - 32px); text-align: center; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.toast.err { background: var(--red); color: #fff; }
.spin { width: 18px; height: 18px; border: 2.5px solid rgba(0,0,0,.25); border-top-color: #000; border-radius: 50%; animation: rot .7s linear infinite; }
@keyframes rot { to { transform: rotate(360deg); } }
