/* Globus Mini App — візуальна мова як у Fimex: світлі картки на сірому тлі, синій акцент, червоні залишки. */
:root {
  --bg: #f2f2f7; --card: #ffffff; --text: #1c1c1e; --muted: #8e8e93; --faint: #c7c7cc;
  --line: #e5e5ea; --tile: #e3e3ea; --seg: #eeeef3; --row-alt: #f6f6f9;
  --accent: #3346d3; --accent-2: #2b3baa; --accent-soft: #e9ecfc;
  --red: #e5484d; --green: #4cb963; --green-head: #74c86f; --orange: #f0a04b; --brown: #a6774f;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 4px 18px rgba(0,0,0,.05);
  --backdrop: rgba(0,0,0,.38); --tabbar: rgba(255,255,255,.96);
  --radius: 14px; --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0e0e11; --card: #1c1c20; --text: #f2f2f7; --muted: #8e8e99; --faint: #48484f;
  --line: #2c2c32; --tile: #2e2e35; --seg: #26262c; --row-alt: #212126;
  --accent: #7484ff; --accent-2: #8f9bff; --accent-soft: #252a4d;
  --shadow: none; --backdrop: rgba(0,0,0,.6); --tabbar: rgba(28,28,32,.96);
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg); color: var(--text);
  font: 15px/1.35 -apple-system, BlinkMacSystemFont, "SF Pro Text", Inter, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased; overscroll-behavior: none;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, textarea { font: inherit; color: var(--text); }
svg { display: block; }
.ic { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ic.sm { width: 18px; height: 18px; } .ic.xs { width: 15px; height: 15px; } .ic.lg { width: 26px; height: 26px; }
.muted { color: var(--muted); } .blue { color: var(--accent); } .red { color: var(--red); } .green { color: var(--green); }
.hidden { display: none !important; }

#app { max-width: 540px; margin: 0 auto; min-height: 100%; position: relative; }
#view { padding: 12px 16px calc(84px + var(--safe-b)); }

/* ------------------------------------------------ нижня панель */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--tabbar);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line);
  padding-bottom: var(--safe-b);
}
.tabbar-in { max-width: 540px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); height: 56px; }
.tab { position: relative; display: flex; align-items: center; justify-content: center; color: var(--muted); }
.tab .ic { width: 25px; height: 25px; stroke-width: 1.5; }
.tab.on { color: var(--text); }
.tab.on::before { content: ""; position: absolute; top: -1px; left: 22%; right: 22%; height: 2.5px; border-radius: 2px; background: var(--text); }
.tab .dot { position: absolute; top: 12px; left: calc(50% + 8px); width: 8px; height: 8px; border-radius: 50%; background: var(--red); }

/* ------------------------------------------------ головна */
.searchbar {
  display: flex; align-items: center; gap: 12px; height: 46px; padding: 0 14px; margin-bottom: 14px;
  background: var(--card); border: 1px solid var(--tile); border-radius: 12px;
}
.searchbar .ph { flex: 1; color: var(--muted); font-size: 16px; white-space: nowrap; overflow: hidden; }
.searchbar .cur { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 15px; }
.flag-c { display: inline-flex; width: 18px; height: 18px; border-radius: 50%; overflow: hidden; align-items: center; justify-content: center; font-size: 15px; line-height: 1; }
.iconbtn { position: relative; display: flex; align-items: center; justify-content: center; color: var(--text); }
.iconbtn .badge { position: absolute; top: -3px; right: -4px; width: 8px; height: 8px; border-radius: 50%; background: var(--red); border: 1.5px solid var(--card); }

.brands { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px 16px; margin: 4px 0 22px; }
.brand {
  aspect-ratio: 1; border-radius: 13px; border: 1px solid var(--tile); background: var(--card);
  display: flex; align-items: center; justify-content: center; padding: 10px; transition: border-color .15s, transform .1s;
}
.brand:active { transform: scale(.96); }
.brand.on { border: 1.5px solid var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.brand svg { width: 70%; max-height: 62%; fill: currentColor; stroke: none; }
.brand .b-apple { width: 36%; color: #6e6e73; } :root[data-theme="dark"] .brand .b-apple { color: #d1d1d6; }
.brand .b-samsung { color: #1428a0; width: 86%; } :root[data-theme="dark"] .brand .b-samsung { color: #8ea2ff; }
.brand .b-xiaomi-box { width: 46%; aspect-ratio: 1; border-radius: 28%; background: #ff6900; display: flex; align-items: center; justify-content: center; }
.brand .b-xiaomi-box svg { width: 62%; color: #fff; }
.brand .b-oneplus { width: 46%; color: #f50514; }
.brand .b-meta { width: 64%; color: #0467df; }
.brand .b-google, .brand .b-honor-t, .brand .b-lenovo-t, .brand .b-marshall { font-weight: 600; letter-spacing: -.3px; }
.brand .b-google { font-size: 17px; } .b-google .g1 { color: #4285f4 } .b-google .g2 { color: #ea4335 } .b-google .g3 { color: #fbbc05 } .b-google .g4 { color: #34a853 }
.brand .b-honor { width: 80%; color: #e0a53a; }
.brand .b-hp { width: 50%; color: #0096d6; }
.brand .b-lenovo { width: 86%; color: #e2231a; }
.brand .b-sony { width: 82%; color: #1c1c1e; } :root[data-theme="dark"] .brand .b-sony { color: #f2f2f7; }
.brand .b-marshall { font: italic 600 16px/1 "Snell Roundhand", "Brush Script MT", "Segoe Script", cursive; color: var(--text); }
.brand .b-text { font-weight: 700; font-size: 13px; }

.sec-title { text-align: center; font-size: 17px; font-weight: 600; margin: 4px 0 10px; }
.sec-title.big { font-size: 21px; font-weight: 700; margin-top: 8px; }
.pricelink { display: flex; align-items: center; justify-content: center; gap: 6px; color: var(--accent-2); font-size: 16px; margin: -2px auto 16px; }
.pricelink span { text-decoration: underline; text-underline-offset: 3px; }
.ltabs { display: flex; justify-content: center; gap: 22px; margin-bottom: 10px; }
.ltab { color: var(--muted); font-size: 15.5px; padding-bottom: 6px; border-bottom: 2px solid transparent; }
.ltab.on { color: var(--accent); border-color: var(--accent); font-weight: 500; }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); }
.list .row { display: flex; align-items: center; gap: 12px; padding: 13px 16px; font-size: 16.5px; position: relative; }
.list .row + .row::before { content: ""; position: absolute; top: 0; left: 52px; right: 0; height: 1px; background: var(--line); }
.list .row .ic { color: var(--muted); flex: none; }

.cats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 10px; padding: 0 6px; }
.cat { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 10px 4px 14px; border-radius: 12px; }
.cat:active { background: var(--seg); }
.cat svg { width: 92px; height: 70px; fill: none; stroke: var(--text); stroke-width: 1.7; stroke-linejoin: round; stroke-linecap: round; }
.cat svg .f { fill: var(--bg); } .cat svg .s { fill: var(--text); stroke: none; }
.cat .lbl { font-size: 15.5px; text-align: center; }
.tag-blue { color: var(--accent); font-weight: 600; } .tag-orange { color: var(--orange); font-weight: 600; }

.models { display: flex; flex-direction: column; gap: 10px; }
.mbtn {
  position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px;
  background: var(--card); border: 1px solid var(--tile); border-radius: 10px; font-size: 16.5px; padding: 8px 18px;
}
.mbtn:active { background: var(--seg); }
.mbtn .ic { width: 18px; height: 18px; flex: none; }
.ribbon { position: absolute; top: 0; left: 0; width: 46px; height: 46px; overflow: hidden; pointer-events: none; }
.ribbon::before { content: "NEW"; position: absolute; top: 9px; left: -15px; width: 64px; transform: rotate(-45deg); background: var(--accent); color: #fff; font-size: 9px; font-weight: 700; text-align: center; letter-spacing: .5px; padding: 1px 0; }

/* ------------------------------------------------ шторки */
.layer { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.layer .bd { position: absolute; inset: 0; background: var(--backdrop); opacity: 0; transition: opacity .25s; }
.layer.open .bd { opacity: 1; }
.sheet {
  position: relative; width: 100%; max-width: 540px; background: var(--bg); border-radius: 14px 14px 0 0;
  display: flex; flex-direction: column; transform: translateY(100%); transition: transform .3s cubic-bezier(.2,.8,.2,1);
  max-height: calc(100% - 40px);
}
.sheet.full { height: calc(100% - 40px); }
.sheet.white { background: var(--card); }
.layer.open .sheet { transform: none; }
.sh-head { display: grid; grid-template-columns: 60px 1fr 60px; align-items: center; min-height: 56px; padding: 0 14px; background: var(--card); border-radius: 14px 14px 0 0; border-bottom: 1px solid var(--line); flex: none; }
.sh-head.plain { border-bottom: 0; }
.sh-head .t { text-align: center; font-size: 17px; font-weight: 500; display: flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap; overflow: hidden; }
.sh-head .t.big { font-size: 19px; font-weight: 600; }
.sh-head .l { justify-self: start; color: var(--accent); } .sh-head .r { justify-self: end; color: var(--muted); }
.sh-head .l.txt, .sh-head .r.txt { color: var(--accent); font-size: 16.5px; }
.sh-body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.sh-foot { padding: 12px 16px calc(12px + var(--safe-b)); flex: none; }
.grab { position: absolute; top: 7px; left: 50%; width: 36px; height: 5px; margin-left: -18px; border-radius: 3px; background: var(--faint); z-index: 2; }

.layer.center { align-items: center; }
.popup { position: relative; width: calc(100% - 48px); max-width: 420px; background: var(--card); border-radius: 18px; overflow: hidden; transform: scale(.94); opacity: 0; transition: transform .2s, opacity .2s; }
.layer.open .popup { transform: none; opacity: 1; }

.menu-layer { position: fixed; inset: 0; z-index: 70; }
.menu { position: absolute; min-width: 230px; max-width: 300px; background: var(--card); border-radius: 13px; box-shadow: 0 10px 40px rgba(0,0,0,.18); overflow: hidden; animation: pop .15s ease-out; }
.menu .mi { display: flex; align-items: center; gap: 12px; padding: 13px 16px; font-size: 16.5px; width: 100%; text-align: left; }
.menu .mi + .mi { border-top: 1px solid var(--line); }
.menu .mi .ic { color: var(--accent); }
.menu .mi.on { color: var(--accent); }
.menu .mi .chev { margin-left: auto; color: var(--muted); }
.menu .mi.dim { color: var(--muted); font-size: 15px; }
.menu .sub .mi { padding-left: 52px; }
@keyframes pop { from { transform: scale(.92); opacity: 0; } }

/* ------------------------------------------------ сегменти, кнопки, поля */
.seg { display: flex; background: var(--seg); border-radius: 10px; padding: 3px; margin: 12px 16px; }
.seg button { flex: 1; height: 36px; border-radius: 8px; color: var(--muted); font-size: 15.5px; }
.seg button.on { background: var(--card); color: var(--accent); box-shadow: 0 1px 3px rgba(0,0,0,.08); font-weight: 500; }
.periods { display: flex; gap: 6px; margin: 12px 16px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.periods button { flex: 1; height: 34px; border-radius: 9px; color: var(--muted); font-size: 15.5px; }
.periods button.on { background: var(--card); color: var(--text); font-weight: 600; box-shadow: var(--shadow); }
.btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 50px; border-radius: 12px; background: var(--accent); color: #fff; font-size: 16.5px; font-weight: 500; }
.btn:disabled { background: var(--faint); color: #fff; opacity: .9; }
.btn.gray { background: var(--seg); color: var(--muted); font-weight: 400; }
.btn.ghost { background: var(--card); color: var(--accent); border: 1px solid var(--tile); }
.field { position: relative; margin: 18px 16px 8px; border: 1.5px solid var(--accent); border-radius: 11px; background: var(--card); }
.field label { position: absolute; top: -10px; left: 12px; padding: 0 5px; background: var(--bg); color: var(--accent-2); font-size: 13.5px; }
.field input { width: 100%; height: 50px; border: 0; outline: 0; background: transparent; text-align: center; font-size: 22px; font-weight: 500; border-radius: 11px; }
.field textarea { width: 100%; min-height: 96px; border: 0; outline: 0; background: transparent; padding: 14px; resize: vertical; border-radius: 11px; }
.input { display: flex; align-items: center; gap: 10px; height: 42px; margin: 12px 16px; padding: 0 12px; background: var(--seg); border-radius: 11px; color: var(--muted); }
.input input { flex: 1; border: 0; outline: 0; background: transparent; font-size: 16.5px; min-width: 0; }
.summary { margin: 6px 20px; font-size: 15px; display: grid; grid-template-columns: auto 1fr; gap: 3px 10px; }
.summary .k { color: var(--muted); }
.warn { display: flex; align-items: center; gap: 8px; margin: 4px 20px; color: var(--muted); font-size: 15px; }
.warn.err { color: var(--red); }
.label-up { margin: 18px 20px 8px; color: var(--muted); font-size: 13px; letter-spacing: .4px; text-transform: uppercase; text-align: center; }
.label-up.left { text-align: left; }

/* ------------------------------------------------ картка моделі (таблиця партій) */
.grp-h { text-align: center; padding: 14px 10px 10px; font-weight: 500; font-size: 16.5px; background: var(--bg); }
.offers { background: var(--card); }
.orow { display: grid; grid-template-columns: 70px 34px 1fr 26px 1fr 42px; align-items: center; height: 46px; padding: 0 16px; font-size: 16px; position: relative; }
.orow:active { background: var(--seg); }
.orow + .orow::before { content: ""; position: absolute; top: 0; left: 26%; right: 26%; height: 1px; background: var(--line); }
.orow .d { color: var(--accent); font-size: 15px; }
.orow .ram { color: var(--text); font-size: 15px; text-align: right; padding-right: 6px; }
.orow .cc { display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--text); }
.orow .dash { color: var(--faint); text-align: center; }
.orow .p { font-weight: 600; }
.orow .p small { color: var(--text); font-weight: 400; margin-right: 3px; }
.orow .q { color: var(--red); text-align: right; font-size: 15.5px; }
.orow.noram { grid-template-columns: 70px 1fr 26px 1fr 42px; }

/* ------------------------------------------------ замовлення */
.ocard { margin: 14px 16px; padding: 16px 16px 10px; text-align: center; }
.ocard .date { display: flex; align-items: center; justify-content: center; gap: 7px; color: var(--muted); font-size: 15.5px; }
.ocard .ttl { color: var(--accent-2); font-weight: 600; font-size: 17px; margin: 12px 0 14px; }
.ocard hr { border: 0; border-top: 1px solid var(--line); margin: 0 14px 12px; }
.lots { display: grid; grid-template-columns: 1fr 30px 1fr; row-gap: 6px; font-size: 17px; }
.lots .h { color: var(--muted); font-size: 14.5px; }
.lots .sep { color: var(--faint); }
.lots .dim { color: var(--muted); }
.lots b { font-weight: 600; }
.chev-btn { width: 30px; height: 30px; border-radius: 50%; background: var(--seg); color: var(--muted); display: inline-flex; align-items: center; justify-content: center; margin-top: 8px; }
.tabs-h { display: flex; justify-content: center; gap: 28px; font-size: 17px; }
.tabs-h button { color: var(--muted); padding: 4px 0; border-bottom: 1.5px solid transparent; }
.tabs-h button.on { color: var(--text); border-color: var(--text); }

.empty { margin: 30% 16px 0; padding: 40px 18px 26px; text-align: center; position: relative; }
.empty .bubble { position: absolute; top: -28px; left: 50%; margin-left: -28px; width: 56px; height: 56px; border-radius: 50%; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 6px var(--bg); }
.empty .bubble.gray { background: #b9b9c3; }
.empty h3 { margin: 6px 0 8px; font-size: 18px; font-weight: 500; }
.empty p { margin: 0; color: var(--muted); font-size: 15.5px; }
.empty a, .empty .link { color: var(--accent); display: inline-block; margin-top: 14px; font-size: 16px; }
.empty ul { text-align: left; margin: 0; padding: 0 0 0 18px; color: var(--muted); font-size: 15.5px; }
.empty li + li { margin-top: 12px; }

.ord { display: flex; align-items: center; gap: 14px; margin: 0 16px 10px; padding: 16px; }
.ord .oi { width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; flex: none; }
.ord .mid { flex: 1; min-width: 0; font-size: 16px; text-align: left; line-height: 1.45; }
.ord .mid > span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ord .mid b { font-weight: 600; }
.ord .rt { text-align: right; font-size: 15px; color: var(--muted); flex: none; display: flex; flex-direction: column; align-items: flex-end; white-space: nowrap; }
.ord .rt .ok { color: var(--green); display: flex; align-items: center; gap: 4px; margin-top: 4px; font-size: 15.5px; }
.ord .mid .wait { color: var(--orange); font-size: 14px; }
.st-assembly { background: var(--brown); } .st-ready { background: var(--red); } .st-issued { background: var(--green-head); } .st-cancelled { background: var(--faint); }
.sumbox { display: grid; grid-template-columns: 1fr 1px 1fr; margin: 0 16px 14px; padding: 10px 0; background: var(--seg); border-radius: 12px; text-align: center; }
.sumbox .v { font-weight: 600; font-size: 17px; margin-top: 2px; } .sumbox .k { color: var(--muted); font-size: 14px; } .sumbox i { background: var(--faint); }

.od-head { height: 104px; position: relative; }
.od-head .bar { display: grid; grid-template-columns: 50px 1fr 50px; align-items: center; height: 56px; padding: 0 12px; color: #fff; font-size: 17px; font-weight: 500; text-align: center; }
.od-head .big { position: absolute; left: 50%; top: 58px; margin-left: -44px; width: 88px; height: 88px; border-radius: 50%; border: 5px solid var(--card); display: flex; align-items: center; justify-content: center; color: #fff; }
.od-pay { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-top: 50px; font-size: 16.5px; }
.od-pay .ck { width: 38px; height: 38px; border-radius: 50%; background: var(--seg); display: flex; align-items: center; justify-content: center; }
.od-sums { display: grid; grid-template-columns: 1fr 1px 1fr; margin: 16px 16px 14px; padding-top: 14px; border-top: 1px solid var(--line); text-align: center; }
.od-sums .k { color: var(--muted); font-size: 15px; } .od-sums .v { font-size: 24px; font-weight: 700; } .od-sums i { background: var(--line); }
.tl { margin: 0 16px 14px; padding: 8px 16px 4px; }
.tl .ev { display: grid; grid-template-columns: 1fr 52px 1fr; align-items: center; min-height: 64px; position: relative; }
.tl .ev .dt { font-size: 16px; } .tl .ev .dt small { display: block; color: var(--muted); font-size: 13.5px; }
.tl .ev.past .dt, .tl .ev.past .nm { color: var(--muted); }
.tl .ev .dotc { width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; z-index: 1; justify-self: center; }
.tl .ev .nm { font-size: 16.5px; }
.tl .ev:not(:last-child) .dotc::after { content: ""; position: absolute; top: calc(50% + 22px); left: 50%; width: 1.5px; height: 20px; margin-left: -1px; background: var(--faint); }
.tl .ev .dotc { position: relative; }
.tl .tgl { display: flex; justify-content: center; padding: 6px 0 4px; color: var(--muted); border-top: 1px solid var(--line); margin-top: 6px; }
.items { background: var(--card); }
.it { padding: 12px 16px 10px; display: grid; grid-template-columns: 18px 1fr auto; gap: 2px 8px; font-size: 16px; position: relative; }
.it + .it::before { content: ""; position: absolute; top: 0; left: 42px; right: 16px; height: 1px; background: var(--line); }
.it .n { color: var(--accent); font-size: 13px; padding-top: 2px; }
.it .p { color: var(--accent); font-weight: 600; text-align: right; }
.it .w { grid-column: 2; display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 15px; }
.it .w .ic { color: var(--faint); }
.it .q { color: var(--muted); text-align: right; font-size: 15px; }

.landscape { position: fixed; z-index: 90; inset: 0; background: var(--backdrop); display: flex; align-items: center; justify-content: center; }
.landscape .pane { background: var(--bg); border-radius: 26px; overflow: auto; padding: 14px 18px; }
@media (orientation: portrait) { .landscape .pane { width: calc(100vh - 80px); height: calc(100vw - 30px); transform: rotate(90deg); } }
@media (orientation: landscape) { .landscape .pane { width: calc(100vw - 40px); height: calc(100vh - 40px); } }
.ftable { width: 100%; border-collapse: separate; border-spacing: 0 4px; font-size: 14px; }
.ftable th { color: var(--muted); font-weight: 400; text-align: left; padding: 6px 10px; }
.ftable td { background: var(--card); padding: 9px 10px; }
.ftable tr:nth-child(even) td { background: var(--row-alt); }
.ftable td:first-child { border-radius: 9px 0 0 9px; } .ftable td:last-child { border-radius: 0 9px 9px 0; }
.ftable .num { text-align: center; } .ftable .b { font-weight: 600; text-align: center; }

/* ------------------------------------------------ профіль */
.avatar { width: 112px; height: 112px; border-radius: 50%; margin: 6px auto 8px; background: var(--seg); color: var(--faint); display: flex; align-items: flex-end; justify-content: center; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.pname { text-align: center; font-size: 26px; font-weight: 700; } .pacc { text-align: center; color: var(--muted); margin: 2px 0 16px; }
.mcard { display: flex; align-items: center; gap: 14px; padding: 16px 18px; margin-bottom: 12px; text-align: left; width: 100%; }
.mcard .k { color: var(--muted); font-size: 13px; letter-spacing: .4px; text-transform: uppercase; }
.mcard .v { color: var(--accent); font-size: 22px; font-weight: 500; }
.mcard .ic { width: 32px; height: 32px; color: var(--faint); stroke-width: 1.4; }
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.duo .mcard { flex-direction: column; align-items: flex-start; gap: 6px; margin: 0; }
.menulist { margin: 12px 0; overflow: hidden; }
.menulist button { display: flex; align-items: center; gap: 14px; width: 100%; padding: 10px 14px; font-size: 17px; text-align: left; position: relative; }
.menulist button + button::before { content: ""; position: absolute; top: 0; left: 64px; right: 16px; height: 1px; background: var(--line); }
.menulist .mic { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; flex: none; font-weight: 700; font-size: 17px; }
.menulist .mic .ic { width: 19px; height: 19px; stroke-width: 2; }
.menulist .ver { color: var(--muted); font-size: 15px; margin-left: -6px; }

.ledger .le { display: flex; justify-content: space-between; align-items: flex-start; padding: 13px 18px; font-size: 16px; }
.ledger .le:nth-child(even) { background: var(--row-alt); }
.ledger .le small { display: block; color: var(--muted); font-size: 14.5px; margin-top: 3px; }
.ledger .le .a { font-weight: 500; }
.ledger .le .inv { color: var(--accent); }
.bal-line { display: flex; justify-content: space-between; padding: 12px 18px; color: var(--muted); }
.bal-line b { color: var(--accent); font-size: 17px; }

.toggle { position: relative; width: 52px; height: 32px; border-radius: 16px; background: var(--faint); transition: background .2s; flex: none; }
.toggle::after { content: ""; position: absolute; top: 2px; left: 2px; width: 28px; height: 28px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0,0,0,.2); transition: transform .2s; }
.toggle.on { background: #5fc35a; } .toggle.on::after { transform: translateX(20px); }
.setrow { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; font-size: 17px; min-height: 52px; position: relative; }
.setrow + .setrow::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; height: 1px; background: var(--line); }
.groupcard { margin: 0 16px; overflow: hidden; }
.grp-label { margin: 18px 32px 8px; color: var(--muted); font-size: 14px; }

.slider { padding: 16px 18px 20px; }
.slider .stops { display: flex; justify-content: space-between; color: var(--accent-2); font-size: 15px; margin-bottom: 14px; }
.slider .track { position: relative; height: 24px; }
.slider .track::before { content: ""; position: absolute; left: 8px; right: 8px; top: 11px; height: 3px; border-radius: 2px; background: var(--line); }
.slider .pt { position: absolute; top: 9px; width: 7px; height: 7px; margin-left: -3.5px; border-radius: 50%; background: var(--faint); }
.slider .knob { position: absolute; top: -2px; width: 30px; height: 30px; margin-left: -15px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.25); transition: left .15s; }

.radio-row { display: flex; align-items: center; gap: 14px; padding: 14px 16px; font-size: 17px; width: 100%; text-align: left; position: relative; }
.radio-row + .radio-row::before { content: ""; position: absolute; top: 0; left: 52px; right: 0; height: 1px; background: var(--line); }
.radio-row .ic { color: var(--muted); }
.radio-row .ck { margin-left: auto; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; }
.radio-row .ck .ic { color: #fff; width: 15px; height: 15px; stroke-width: 3; }
.radio-row .sub { color: var(--muted); font-size: 13.5px; display: block; }

.themes { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 18px; }
.theme-o { display: flex; flex-direction: column; align-items: center; gap: 10px; font-size: 17px; }
.theme-o .pv { width: 100%; height: 110px; border-radius: 10px; display: flex; align-items: center; justify-content: center; }
.theme-o .pv.l { background: #eeeef3; } .theme-o .pv.d { background: #1c1c1e; }
.theme-o .phone { width: 46px; height: 82px; border-radius: 9px; border: 2px solid #8e8e93; padding: 16px 6px 6px; display: flex; flex-direction: column; gap: 4px; }
.theme-o .phone i { height: 7px; border-radius: 2px; background: #8e8e93; }
.radio { width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--faint); display: flex; align-items: center; justify-content: center; }
.radio.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.radio .ic { width: 15px; height: 15px; stroke-width: 3; }

.chat { padding: 14px 12px; display: flex; flex-direction: column; gap: 8px; }
.msg { max-width: 82%; padding: 9px 12px; border-radius: 16px; font-size: 15.5px; white-space: pre-wrap; word-wrap: break-word; }
.msg.me { align-self: flex-end; background: var(--accent); color: #fff; border-bottom-right-radius: 5px; }
.msg.them { align-self: flex-start; background: var(--card); border-bottom-left-radius: 5px; }
.msg small { display: block; opacity: .6; font-size: 11.5px; margin-top: 3px; text-align: right; }
.msg a { color: inherit; text-decoration: underline; }
.composer { display: flex; align-items: center; gap: 10px; padding: 8px 12px calc(8px + var(--safe-b)); background: var(--card); border-top: 1px solid var(--line); }
.composer input[type=text] { flex: 1; height: 38px; border-radius: 19px; border: 1px solid var(--tile); padding: 0 14px; outline: 0; background: var(--bg); }
.composer .send { width: 34px; height: 34px; border-radius: 50%; background: var(--faint); color: #fff; display: flex; align-items: center; justify-content: center; }
.composer .send.on { background: var(--accent); }

.stat-row { display: grid; grid-template-columns: 52px 1fr auto; align-items: center; gap: 2px 10px; padding: 11px 16px; position: relative; width: 100%; text-align: left; }
.stat-row + .stat-row::before { content: ""; position: absolute; top: 0; left: 68px; right: 0; height: 1px; background: var(--line); }
.stat-row .lg { display: flex; align-items: center; justify-content: center; height: 26px; color: var(--muted); }
.stat-row .lg svg:not(.ic) { max-width: 44px; max-height: 20px; fill: currentColor; }
.stat-row .nm { font-size: 17px; }
.stat-row .sm { text-align: right; font-weight: 500; font-size: 15.5px; line-height: 1.2; }
.stat-row .sm small { display: block; color: var(--muted); font-weight: 400; font-size: 13.5px; }
.stat-row .bar { grid-column: 2; height: 4px; border-radius: 2px; background: var(--line); }
.stat-row .bar i { display: block; height: 100%; border-radius: 2px; background: var(--line); }
.stat-row.on .bar i { background: #4ea1d3; } .stat-row.on .sm small { color: var(--accent); }
.stat-row.off .nm, .stat-row.off .sm { color: var(--muted); }
.stat-total { display: flex; justify-content: space-between; margin: 10px 26px; color: var(--muted); font-size: 14px; }

.wtext { margin: 14px 16px; padding: 18px 20px; font-size: 16px; color: var(--muted); }
.wtext h4 { color: var(--text); font-size: 16.5px; font-weight: 600; margin: 18px 0 10px; }
.wtext h4:first-child { margin-top: 0; }
.wtext ul { margin: 0; padding-left: 20px; } .wtext li { margin: 8px 0; }
.wtext .note { background: var(--accent-soft); color: var(--accent); border-radius: 10px; padding: 12px; text-align: center; margin: 14px 0; }
.wtext hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }

.creds .cr { display: flex; align-items: center; gap: 14px; padding: 12px 16px; position: relative; }
.creds .cr + .cr::before { content: ""; position: absolute; top: 0; left: 72px; right: 16px; height: 1px; background: var(--line); }
.creds .cr .ico { width: 42px; height: 42px; border-radius: 11px; background: var(--seg); display: flex; align-items: center; justify-content: center; color: var(--muted); flex: none; }
.creds .cr .k { color: var(--muted); font-size: 14px; } .creds .cr .v { font-size: 16.5px; word-break: break-all; }
.creds .cr .v.blue { color: var(--accent); }
.creds .cr button { margin-left: auto; color: var(--muted); }
.mk-row { display: flex; align-items: center; gap: 14px; padding: 12px 16px; font-size: 17px; position: relative; }
.mk-row + .mk-row::before { content: ""; position: absolute; top: 0; left: 62px; right: 0; height: 1px; background: var(--line); }
.mk-row .lg { width: 32px; display: flex; justify-content: center; color: var(--muted); }
.mk-row .lg svg:not(.ic) { max-width: 30px; max-height: 18px; fill: currentColor; }
.mk-row .stp { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.mk-row .stp button { width: 28px; height: 28px; border-radius: 50%; background: var(--seg); color: var(--accent); font-size: 18px; line-height: 1; }

.wheel { height: 210px; overflow-y: scroll; scroll-snap-type: y mandatory; position: relative; margin: 6px 20px; -webkit-mask-image: linear-gradient(transparent, #000 30%, #000 70%, transparent); mask-image: linear-gradient(transparent, #000 30%, #000 70%, transparent); }
.wheel div { height: 42px; display: flex; align-items: center; justify-content: center; scroll-snap-align: center; font-size: 19px; color: var(--muted); }
.wheel div.on { color: var(--text); font-size: 24px; }
.wheel-wrap { position: relative; background: var(--card); border-radius: 16px; margin: 0 16px; padding: 8px 0 0; overflow: hidden; }
.wheel-wrap::before { content: ""; position: absolute; left: 24px; right: 24px; top: calc(8px + 6px + 84px); height: 42px; border-radius: 10px; background: var(--seg); pointer-events: none; }
.wheel-wrap .btn { border-radius: 0; background: transparent; color: var(--accent); border-top: 1px solid var(--line); margin-top: 6px; }

.about-banner { margin: 18px 16px; height: 150px; border-radius: 16px; background: linear-gradient(135deg, #2b3baa, #4b5ff0); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.about-banner b { font-size: 38px; letter-spacing: 4px; font-weight: 800; } .about-banner span { opacity: .85; }
.about { padding: 4px 22px 24px; color: var(--muted); font-size: 16px; }
.about h3 { color: var(--text); margin: 12px 0 8px; font-size: 20px; }
.about li { margin: 10px 0; }

.sres { display: flex; gap: 12px; padding: 12px 16px; text-align: left; width: 100%; position: relative; }
.sres + .sres::before { content: ""; position: absolute; top: 0; left: 46px; right: 0; height: 1px; background: var(--line); }
.sres .ic { color: var(--muted); margin-top: 2px; flex: none; }
.sres .t { font-size: 16px; } .sres .c { font-size: 15px; color: var(--text); margin-top: 2px; }
.sres .c b { font-weight: 700; } .sres .c span { color: var(--muted); }

.notif { display: flex; gap: 14px; padding: 12px 16px; width: 100%; text-align: left; position: relative; background: var(--card); }
.notif.unread { background: var(--accent-soft); }
.notif + .notif::before { content: ""; position: absolute; top: 0; left: 62px; right: 16px; height: 1px; background: var(--line); }
.notif .e { font-size: 22px; width: 30px; text-align: center; } .notif .t { font-size: 16.5px; font-weight: 500; } .notif .s { color: var(--muted); font-size: 15px; }

.info-pop { padding: 0 22px 18px; }
.info-pop .ib { width: 58px; height: 58px; margin: -29px auto 8px; border-radius: 50%; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; border: 5px solid var(--card); }
.info-pop .tt { text-align: center; font-size: 17px; margin-bottom: 10px; }
.info-pop .rs { text-align: center; font-weight: 500; margin: 6px 0; position: relative; }
.info-pop .rs::before, .info-pop .rs::after { content: ""; position: absolute; top: 50%; width: 22%; height: 1px; background: var(--line); }
.info-pop .rs::before { left: 0; } .info-pop .rs::after { right: 0; }
.info-pop .kv { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 16px; }
.info-pop .kv .k { color: var(--muted); }
.info-pop .kv.tot { border: 0; border-top: 1.5px dashed var(--line); } .info-pop .kv.tot .v { color: var(--accent); font-weight: 700; font-size: 19px; }

.toast { position: fixed; left: 50%; bottom: calc(80px + var(--safe-b)); z-index: 100; transform: translateX(-50%); background: rgba(30,30,34,.94); color: #fff; padding: 10px 16px; border-radius: 12px; font-size: 15px; max-width: 86%; text-align: center; animation: pop .2s; }
.skel { height: 46px; margin: 8px 16px; border-radius: 12px; background: linear-gradient(90deg, var(--seg), var(--card), var(--seg)); background-size: 200% 100%; animation: sk 1.2s infinite; }
@keyframes sk { to { background-position: -200% 0; } }
.spacer { height: 16px; }
.devbar { text-align: center; font-size: 12px; color: var(--muted); padding: 6px; }

/* шапка вкладок «Мої замовлення» / «P2P Chat» */
.pagehead { display: grid; grid-template-columns: 90px 1fr 90px; align-items: center; height: 54px; margin: -12px -16px 0; padding: 0 16px; background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.pagehead .t { text-align: center; font-size: 17.5px; font-weight: 500; }
.pagehead .l { justify-self: start; }
.pagehead .r { display: flex; gap: 18px; justify-content: flex-end; }
