/* ===== Сцена: рамка телефона на компьютере, во весь экран на телефоне ===== */
html.desk, html.desk body { height: 100%; overflow: hidden; }
html.desk body { background: radial-gradient(1200px 700px at 70% 20%, #f6f8fb, #dde3ea 70%); }
html.desk .stage { height: 100%; display: flex; align-items: center; justify-content: center; gap: clamp(32px, 6vw, 88px); padding: 20px 32px; }
.side { width: 330px; flex: none; }
html.full .side { display: none; }
.side-mark { width: 46px; height: 46px; border-radius: 14px; background: var(--ink); display: grid; place-items: center; margin-bottom: 18px; }
.side-mark svg { width: 24px; height: 24px; fill: var(--dt); }
.side h1 { margin: 0 0 10px; font-size: 30px; letter-spacing: -.02em; line-height: 1.1; }
.side .lead { margin: 0 0 22px; color: var(--ink2); font-size: 15.5px; line-height: 1.5; }
.side-btns { display: flex; gap: 8px; margin-bottom: 26px; }
.sbtn { height: 42px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--line2); background: #fff; display: inline-flex; align-items: center; font-weight: 600; font-size: 14px; color: var(--ink); }
.sbtn.pri { background: var(--acc); border-color: var(--acc); color: #fff; }
.sbtn:hover { filter: brightness(.97); }
.side-steps { padding: 16px 18px; border-radius: 16px; background: rgba(255, 255, 255, .7); box-shadow: 0 0 0 1px var(--line); }
.side-steps b { display: block; margin-bottom: 8px; font-size: 14px; }
.side-steps ol { margin: 0; padding-left: 18px; color: var(--ink2); font-size: 13.5px; line-height: 1.45; }
.side-steps li + li { margin-top: 6px; }
.side-note { margin: 16px 0 0; color: var(--muted); font-size: 12.5px; }
@media (max-width: 920px) { html.desk .side { display: none; } }

.phone-wrap { --k: 1; width: calc(432px * var(--k)); height: calc(930px * var(--k)); flex: none; }
.phone { position: relative; width: 432px; height: 930px; padding: 10px; border-radius: 58px; transform: scale(var(--k)); transform-origin: 0 0;
  background: linear-gradient(150deg, #3a3f46 0%, #17191d 22%, #101214 70%, #2b2f35 100%);
  box-shadow: inset 0 0 0 1.5px #5a616b, inset 0 0 0 3px #0c0d0f, 0 50px 90px -38px rgba(18, 30, 48, .6), 0 22px 36px -22px rgba(0, 0, 0, .45); }
.hw { position: absolute; right: -3px; width: 4px; border-radius: 0 3px 3px 0; background: linear-gradient(90deg, #2a2e33, #4b5058); }
.hw-power { top: 210px; height: 74px; }
.hw-vol { top: 320px; height: 124px; }
.screen { position: relative; width: 100%; height: 100%; border-radius: 48px; overflow: hidden; background: var(--bg); isolation: isolate; }
.sbar { position: absolute; top: 0; left: 0; right: 0; height: 38px; z-index: 40; display: flex; align-items: center; justify-content: space-between; padding: 4px 28px 0 32px; font-size: 14px; font-weight: 600; color: var(--ink); background: #fff; transition: background .25s; }
.sb-ic { display: flex; align-items: center; gap: 5px; }
.sb-ic svg { width: 15px; height: 13px; }
.sb-bat { position: relative; width: 22px; height: 11px; border-radius: 3px; box-shadow: inset 0 0 0 1.5px currentColor; margin-left: 2px; }
.sb-bat::after { content: ''; position: absolute; right: -3px; top: 3.5px; width: 2px; height: 4px; border-radius: 0 1px 1px 0; background: currentColor; }
.sb-bat i { position: absolute; left: 2.5px; top: 2.5px; bottom: 2.5px; width: 13px; border-radius: 1.5px; background: currentColor; }
.sb-pct { font-size: 12px; }
.punch { position: absolute; z-index: 70; top: 12px; left: 50%; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: radial-gradient(circle at 40% 38%, #2b3440 0 2px, #07080a 3px); box-shadow: 0 0 0 1.5px #1a1d21; }
.gest { position: absolute; z-index: 70; bottom: 8px; left: 50%; width: 112px; height: 4px; margin-left: -56px; border-radius: 4px; background: rgba(20, 26, 33, .82); pointer-events: none; }
#app { position: absolute; top: 38px; left: 0; right: 0; bottom: 0; overflow: hidden; --gest: 20px; }
#layer { position: absolute; inset: 0; z-index: 50; pointer-events: none; --gest: 20px; }

html.full, html.full body { height: 100%; overflow: hidden; background: #fff; }
html.full .stage, html.full .phone-wrap { position: fixed; inset: 0; width: auto; height: auto; }
html.full .phone { position: absolute; inset: 0; width: auto; height: auto; padding: 0; border-radius: 0; background: none; box-shadow: none; transform: none; }
html.full .screen { border-radius: 0; }
html.full .hw, html.full .punch, html.full .gest, html.full .sbar { display: none; }
html.full #app { top: env(safe-area-inset-top); --gest: env(safe-area-inset-bottom); }
html.full #layer { --gest: env(safe-area-inset-bottom); }

/* ===== Экраны ===== */
.view { position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--bg); transition: transform .3s cubic-bezier(.22, .8, .24, 1), filter .3s; will-change: transform; }
.view.enter { transform: translateX(100%); }
.view.under { transform: translateX(-22%); filter: brightness(.94); }
.view.instant { transition: none; }
.top { flex: none; display: flex; align-items: center; gap: 4px; min-height: 58px; padding: 6px 8px 6px 16px; background: #fff; box-shadow: 0 1px 0 var(--line); position: relative; z-index: 2; }
.top.back { padding-left: 4px; }
.top h2 { flex: 1; min-width: 0; margin: 0; font-size: 19px; font-weight: 650; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top h2 small { display: block; font-size: 12.5px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.ib { width: 44px; height: 44px; flex: none; border: 0; border-radius: 50%; background: transparent; display: grid; place-items: center; color: var(--ink); }
.ib:active { background: var(--hover); }
.body { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 14px 14px 28px; overscroll-behavior: contain; }
.body.pad0 { padding: 0 0 28px; }
.foot { flex: none; padding: 10px 14px calc(10px + var(--gest)); background: #fff; box-shadow: 0 -1px 0 var(--line); position: relative; z-index: 2; }

/* нижние вкладки */
.tabs { flex: none; display: grid; grid-template-columns: repeat(4, 1fr); padding: 4px 6px calc(2px + var(--gest)); background: #fff; box-shadow: 0 -1px 0 var(--line); position: relative; z-index: 2; }
.tabs button { height: 58px; border: 0; background: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11.5px; font-weight: 600; color: var(--muted); position: relative; }
.tabs button .i { width: 24px; height: 24px; padding: 0; }
.tabs button.on { color: var(--acc); }
.tabs button.on::before { content: ''; position: absolute; top: 5px; width: 54px; height: 30px; border-radius: 15px; background: var(--acc-soft); z-index: -1; }
.tabs .badge { position: absolute; top: 4px; left: calc(50% + 6px); min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--out); color: #fff; font-size: 10.5px; display: grid; place-items: center; }

/* ===== Карточки ===== */
.card { background: var(--card); border-radius: 18px; box-shadow: 0 0 0 1px var(--line); }
.card + .card, .card + .sect, .grid + .card, .qa + .card, .card + .qa { margin-top: 12px; }
.sect { display: flex; align-items: baseline; justify-content: space-between; margin: 20px 4px 8px; }
.sect b { font-size: 15px; font-weight: 650; }
.sect button, .linkb { border: 0; background: none; padding: 4px 0; color: var(--acc); font-weight: 600; font-size: 14px; }

.hello { flex: 1; min-width: 0; }
.hello small { display: block; font-size: 12.5px; color: var(--muted); }
.hello b { font-size: 18px; font-weight: 650; }
.sync { height: 34px; display: inline-flex; align-items: center; gap: 7px; padding: 0 12px 0 10px; border: 0; border-radius: 99px; background: var(--in-soft); color: #136c3a; font-size: 13px; font-weight: 600; margin-right: 6px; }
.sync .i { width: 18px; height: 18px; }
.sync.off { background: #fff1d9; color: #8d5600; }
.sync.go .i { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.fuel { padding: 16px 16px 14px; }
.fuel-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.fuel-h span { font-size: 14px; font-weight: 600; color: var(--ink2); display: flex; align-items: center; gap: 8px; }
.fuel-v { margin: 6px 0 10px; font-size: 32px; font-weight: 700; letter-spacing: -.02em; line-height: 1.05; }
.fuel-v small { font-size: 18px; font-weight: 600; color: var(--muted); margin-left: 3px; }
.tank { position: relative; height: 10px; border-radius: 6px; background: #edf0f4; overflow: hidden; }
.tank i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 6px; background: var(--c); transform-origin: left; transition: width .9s cubic-bezier(.2, .8, .2, 1); }
.tank i::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .35), transparent); background-size: 60px 100%; animation: shimmer 3.2s linear infinite; }
@keyframes shimmer { from { background-position: -60px 0; } to { background-position: 400px 0; } }
.tank b { position: absolute; top: -2px; bottom: -2px; width: 2px; background: rgba(20, 26, 33, .28); }
.fuel-m { display: flex; justify-content: space-between; gap: 8px; margin-top: 10px; font-size: 13px; color: var(--muted); }
.fuel-m b { color: var(--ink); font-weight: 600; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid2 .fuel-v { font-size: 26px; }

.qa { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.qa button { height: 92px; border: 0; border-radius: 18px; background: #fff; box-shadow: 0 0 0 1px var(--line); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; font-size: 14.5px; font-weight: 650; color: var(--ink); transition: transform .12s; }
.qa button:active { transform: scale(.97); }
.qa button .ic { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; }
.qa .q-in .ic { background: var(--in-soft); color: var(--in); }
.qa .q-sale { background: var(--acc); color: #fff; box-shadow: 0 8px 18px -10px rgba(31, 111, 229, .8); }
.qa .q-sale .ic { background: rgba(255, 255, 255, .18); color: #fff; }
.qa .q-out .ic { background: var(--out-soft); color: var(--out); }
.rowbtn { width: 100%; display: flex; align-items: center; gap: 12px; padding: 13px 14px; border: 0; background: #fff; border-radius: 16px; box-shadow: 0 0 0 1px var(--line); text-align: left; font-weight: 600; margin-top: 10px; }
.rowbtn .ic { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: var(--inv-soft); color: var(--inv); }
.rowbtn > span:not(.ic) { flex: 1; }
.rowbtn small { display: block; font-weight: 500; color: var(--muted); font-size: 12.5px; }
.rowbtn > .i:last-child { color: var(--faint); }

.todaybox { padding: 14px 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px 10px; }
.todaybox div small { display: block; font-size: 12.5px; color: var(--muted); }
.todaybox div b { font-size: 18px; font-weight: 650; }
.todaybox .wide { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; padding-top: 10px; border-top: 1px dashed var(--line2); }
.todaybox .wide button { border: 0; background: var(--warn-soft); color: #8d5600; border-radius: 10px; height: 32px; padding: 0 10px; font-weight: 600; font-size: 13px; }

/* список документов */
.docs { background: #fff; border-radius: 18px; box-shadow: 0 0 0 1px var(--line); overflow: hidden; }
.item { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 0; background: #fff; text-align: left; }
.item + .item { box-shadow: inset 0 1px 0 var(--line); }
.item:active { background: #f6f8fa; }
.ico { width: 40px; height: 40px; flex: none; border-radius: 13px; display: grid; place-items: center; }
.ico .i { width: 20px; height: 20px; }
.ico.in, .ico.surplus { background: var(--in-soft); color: var(--in); }
.ico.sale { background: var(--sale-soft); color: var(--sale); }
.ico.out { background: var(--out-soft); color: var(--out); }
.ico.pay { background: var(--pay-soft); color: var(--pay); }
.ico.inv { background: var(--inv-soft); color: var(--inv); }
.item .tx { flex: 1; min-width: 0; }
.item .t { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .s { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.item .rt { text-align: right; flex: none; max-width: 42%; }
.item .rt b { display: block; font-size: 15px; font-weight: 650; white-space: nowrap; }
.item .rt small { display: block; font-size: 12.5px; color: var(--muted); white-space: nowrap; margin-top: 2px; }
.item.cx .t, .item.cx .rt b { text-decoration: line-through; color: var(--faint); }
.day-h { display: flex; justify-content: space-between; align-items: baseline; padding: 16px 6px 7px; font-size: 13px; color: var(--muted); }
.day-h b { color: var(--ink); font-size: 14px; font-weight: 650; }
.empty { padding: 40px 20px; text-align: center; color: var(--muted); }
.empty .i { width: 34px; height: 34px; color: var(--faint); margin-bottom: 6px; }

/* фильтры */
.filters { flex: none; background: #fff; box-shadow: 0 1px 0 var(--line); position: relative; z-index: 1; padding: 4px 0 12px; }
.chips { display: flex; gap: 7px; overflow-x: auto; padding: 2px 14px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; height: 36px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--line2); background: #fff; font-size: 14px; font-weight: 600; color: var(--ink2); display: inline-flex; align-items: center; gap: 6px; }
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip .i { width: 17px; height: 17px; }
.chip.add { border-style: dashed; color: var(--acc); }
.frow { display: flex; gap: 8px; padding: 8px 14px 0; }

/* ===== Формы ===== */
.f { margin-top: 16px; }
.f:first-child { margin-top: 2px; }
.lab { display: flex; justify-content: space-between; align-items: baseline; margin: 0 4px 7px; font-size: 13.5px; font-weight: 600; color: var(--ink2); }
.lab em { font-style: normal; font-weight: 500; color: var(--muted); font-size: 12.5px; }
.inp { width: 100%; height: 56px; padding: 0 16px; border: 1.5px solid var(--line2); border-radius: 15px; background: #fff; font-size: 18px; font-weight: 600; outline: none; transition: border-color .15s, box-shadow .15s; }
.inp:focus { border-color: var(--acc); box-shadow: 0 0 0 4px rgba(31, 111, 229, .12); }
.inp.sm { height: 50px; font-size: 16px; font-weight: 500; }
.inp.err, .pick.err { border-color: var(--out); box-shadow: 0 0 0 4px rgba(223, 82, 54, .1); }
textarea.inp { height: 84px; padding: 12px 16px; resize: none; font-size: 15.5px; font-weight: 500; line-height: 1.4; }
.unit { position: relative; }
.unit > span { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 600; pointer-events: none; }
.unit .inp { padding-right: 52px; }
.big .inp { height: 66px; font-size: 28px; font-weight: 700; letter-spacing: -.01em; }
.pick { width: 100%; min-height: 56px; display: flex; align-items: center; gap: 12px; padding: 8px 12px 8px 16px; border: 1.5px solid var(--line2); border-radius: 15px; background: #fff; text-align: left; }
.pick .tx { flex: 1; min-width: 0; }
.pick b { display: block; font-size: 16px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pick small { display: block; font-size: 12.5px; color: var(--muted); }
.pick small.bad { color: var(--out); }
.pick > .i { color: var(--faint); }
.hint { margin: 7px 4px 0; font-size: 12.5px; color: var(--muted); }
.hint.bad { color: var(--out); }
.qchips { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.qchips button { height: 34px; padding: 0 12px; border: 1px solid var(--line2); border-radius: 10px; background: #fff; font-size: 13.5px; font-weight: 600; color: var(--ink2); }
.qchips button:active { background: var(--acc-soft); }

.ftiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; }
.ftile { position: relative; min-width: 0; padding: 11px 12px; border: 1.5px solid var(--line2); border-radius: 16px; background: #fff; text-align: left; transition: border-color .15s, box-shadow .15s; }
.ftile b { display: flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 700; }
.ftile small { display: block; margin-top: 2px; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ftile small + small { margin-top: 0; }
.ftile.on { border-color: var(--c); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 22%, transparent); }
.ftile.on::after { content: ''; position: absolute; top: 12px; right: 12px; width: 18px; height: 18px; border-radius: 50%; background: var(--c) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-8.5' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 13px no-repeat; }

.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; border-radius: 15px; background: #e6eaf0; }
.seg button { height: 46px; border: 0; border-radius: 11px; background: transparent; font-size: 14px; font-weight: 600; color: var(--ink2); display: flex; align-items: center; justify-content: center; gap: 6px; padding: 0 4px; white-space: nowrap; transition: background .15s, box-shadow .15s; }
.seg button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(20, 30, 45, .14); }
.seg.sm button { height: 34px; font-size: 13px; }
.seg.pays button { flex-direction: column; gap: 2px; height: 58px; font-size: 12.5px; }
.seg.pays button .i { width: 20px; height: 20px; }
.seg.pays button.on .i { color: var(--acc); }

.calc { margin-top: 14px; padding: 14px 16px; border-radius: 16px; background: #fff; box-shadow: 0 0 0 1px var(--line); }
.calc .r { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 14px; color: var(--ink2); }
.calc .r + .r { margin-top: 6px; }
.calc .r b { color: var(--ink); font-weight: 650; white-space: nowrap; }
.calc .r.total { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line2); font-size: 15px; }
.calc .r.total b { font-size: 24px; letter-spacing: -.01em; }
.note { margin-top: 12px; display: flex; gap: 10px; padding: 12px 14px; border-radius: 14px; font-size: 13.5px; line-height: 1.4; background: var(--inv-soft); color: var(--ink2); }
.note .i { width: 20px; height: 20px; margin-top: 1px; }
.note.bad { background: var(--out-soft); color: #9b341c; }
.note.ok { background: var(--in-soft); color: #145f35; }
.note.warn { background: var(--warn-soft); color: #7d4d00; }
.note.info { background: var(--acc-soft); color: #194f9e; }
.price-was { display: flex; align-items: center; gap: 8px; margin: 7px 4px 0; font-size: 12.5px; color: var(--muted); }
.price-was button { border: 0; background: none; padding: 0; color: var(--acc); font-weight: 600; font-size: 12.5px; }
.price-was .tag { height: 20px; }

.photo { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1.5px dashed var(--line2); border-radius: 16px; background: #fff; text-align: left; font-weight: 600; color: var(--acc); }
.photo .ic { width: 42px; height: 42px; border-radius: 13px; background: var(--acc-soft); display: grid; place-items: center; }
.photo small { display: block; color: var(--muted); font-weight: 500; font-size: 12.5px; }
.thumb { position: relative; display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 16px; background: #fff; box-shadow: 0 0 0 1px var(--line); }
.thumb img { width: 76px; height: 56px; object-fit: cover; border-radius: 10px; }
.thumb .tx { flex: 1; font-size: 14px; font-weight: 600; }
.thumb .tx small { display: block; font-weight: 500; color: var(--muted); }

.btn { width: 100%; height: 56px; border: 0; border-radius: 16px; background: var(--acc); color: #fff; font-size: 16.5px; font-weight: 650; display: flex; align-items: center; justify-content: center; gap: 8px; transition: transform .1s, filter .15s; }
.btn:active { transform: scale(.985); filter: brightness(.95); }
.btn.in { background: var(--in); } .btn.out { background: var(--out); } .btn.pay { background: var(--pay); }
.btn.ghost { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line2); }
.btn.danger { background: #fff; color: var(--out); box-shadow: inset 0 0 0 1.5px #f3c5bb; }
.btn.sm { height: 48px; font-size: 15px; border-radius: 14px; }
.btn[disabled] { opacity: .45; }
.btns { display: flex; gap: 8px; }
.btns .btn { flex: 1; }
.btn .i { width: 20px; height: 20px; }

/* карточка документа */
.dhero { padding: 18px 16px 16px; text-align: center; }
.dhero .ico { width: 50px; height: 50px; border-radius: 16px; margin: 0 auto 10px; }
.dhero .ico .i { width: 24px; height: 24px; }
.dhero h3 { margin: 0; font-size: 30px; font-weight: 700; letter-spacing: -.02em; }
.dhero p { margin: 3px 0 10px; color: var(--muted); font-size: 14px; }
.dhero .tags { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; }
.dl { padding: 4px 16px; }
.dl .r { display: flex; justify-content: space-between; gap: 14px; padding: 11px 0; font-size: 14.5px; }
.dl .r + .r { box-shadow: inset 0 1px 0 var(--line); }
.dl .r span { color: var(--muted); flex: none; }
.dl .r b { font-weight: 600; text-align: right; }
.dl .r b.bad { color: var(--out); } .dl .r b.ok { color: var(--in); }
.cxbox { margin-top: 12px; padding: 12px 14px; border-radius: 14px; background: var(--out-soft); color: #9b341c; font-size: 13.5px; }
.cxbox b { display: block; font-size: 14.5px; margin-bottom: 2px; }
.meta { margin: 14px 6px 0; font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.meta .i { width: 15px; height: 15px; vertical-align: -3px; margin-right: 4px; }
.upd { display: block; width: 100%; padding: 0; border: 0; border-radius: 14px; overflow: hidden; background: #333; }
.upd img { display: block; width: 100%; }

/* клиенты */
.searchbar { position: relative; padding: 10px 14px; background: #fff; box-shadow: 0 1px 0 var(--line); position: relative; z-index: 1; }
.searchbar .i { position: absolute; left: 28px; top: 50%; transform: translateY(-50%); color: var(--faint); width: 20px; height: 20px; }
.searchbar input { width: 100%; height: 46px; border: 0; border-radius: 14px; background: #eef1f5; padding: 0 14px 0 44px; font-size: 15.5px; outline: none; }
.av { width: 40px; height: 40px; flex: none; border-radius: 50%; display: grid; place-items: center; background: #e8edf3; color: var(--ink2); font-weight: 650; font-size: 14px; }
.debt { color: var(--out) !important; }
.bal { padding: 18px 16px; text-align: center; }
.bal small { color: var(--muted); font-size: 13px; }
.bal h3 { margin: 2px 0 14px; font-size: 32px; font-weight: 700; letter-spacing: -.02em; }
.sumrow { display: flex; justify-content: space-between; padding: 14px 16px; }
.sumrow small { color: var(--muted); display: block; font-size: 12.5px; }
.sumrow b { font-size: 20px; font-weight: 700; }

/* «Ещё» */
.prof { display: flex; align-items: center; gap: 14px; padding: 16px; }
.prof .av { width: 52px; height: 52px; font-size: 18px; background: var(--acc-soft); color: var(--acc); }
.prof b { font-size: 17px; display: block; }
.prof small { color: var(--muted); }
.menu { background: #fff; border-radius: 18px; box-shadow: 0 0 0 1px var(--line); overflow: hidden; margin-top: 12px; }
.mi { width: 100%; display: flex; align-items: center; gap: 13px; min-height: 58px; padding: 10px 14px; border: 0; background: #fff; text-align: left; font-weight: 600; font-size: 15px; color: var(--ink); }
.mi + .mi { box-shadow: inset 0 1px 0 var(--line); }
.mi > .i:first-child { color: var(--ink2); }
.mi span { flex: 1; }
.mi small { display: block; font-weight: 500; color: var(--muted); font-size: 12.5px; }
.mi > .i:last-child { color: var(--faint); }
.mi.red, .mi.red > .i:first-child { color: var(--out); }
.shift { padding: 14px 16px; }
.shift h4 { margin: 0 0 8px; font-size: 14px; color: var(--muted); font-weight: 600; }
.shift .r { display: flex; justify-content: space-between; padding: 5px 0; font-size: 14.5px; }
.shift .r b { font-weight: 600; }
.shift .r.tot { margin-top: 6px; padding-top: 10px; border-top: 1px dashed var(--line2); font-size: 15.5px; }
.shift .r.tot b { font-size: 18px; }

/* вход */
.login { position: absolute; inset: 0; display: flex; flex-direction: column; background: #fff; padding: 28px 20px calc(16px + var(--gest)); overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 12px; margin: 10px 4px 30px; }
.brand .lg { width: 46px; height: 46px; border-radius: 14px; background: var(--ink); display: grid; place-items: center; }
.brand .lg svg { width: 24px; height: 24px; fill: var(--dt); }
.brand b { display: block; font-size: 20px; }
.brand small { color: var(--muted); }
.login h3 { margin: 0 4px 12px; font-size: 22px; letter-spacing: -.01em; }
.who { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px; border: 0; border-radius: 16px; background: #f3f5f8; text-align: left; margin-bottom: 8px; }
.who b { display: block; font-size: 16px; }
.who small { color: var(--muted); }
.who > .i { margin-left: auto; color: var(--faint); }
.pin-dots { display: flex; justify-content: center; gap: 16px; margin: 16px 0 8px; }
.pin-dots i { width: 14px; height: 14px; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--line2); transition: background .15s, box-shadow .15s; }
.pin-dots i.on { background: var(--acc); box-shadow: none; }
.keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: auto; }
.keys button { height: 62px; border: 0; border-radius: 18px; background: #f3f5f8; font-size: 24px; font-weight: 600; }
.keys button:active { background: #e4e9ef; }
.keys button.fn { background: transparent; font-size: 15px; color: var(--muted); }
.login .hint { text-align: center; }

/* ===== Шторки ===== */
.scrim { position: absolute; inset: 0; background: rgba(12, 18, 26, .42); opacity: 0; transition: opacity .25s; pointer-events: auto; }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; max-height: 88%; display: flex; flex-direction: column; background: #fff; border-radius: 26px 26px 0 0; transform: translateY(100%); transition: transform .3s cubic-bezier(.22, .8, .24, 1); pointer-events: auto; box-shadow: 0 -10px 30px rgba(0, 0, 0, .12); }
.sheet.open { transform: none; }
.scrim.open { opacity: 1; }
.sheet::before { content: ''; display: block; width: 38px; height: 4px; border-radius: 4px; background: #d4dae2; margin: 9px auto 0; flex: none; }
.sh-h { flex: none; display: flex; align-items: center; gap: 6px; padding: 8px 10px 4px 20px; }
.sh-h b { flex: 1; font-size: 18px; font-weight: 650; }
.sh-b { flex: 1; overflow-y: auto; padding: 6px 16px 12px; overscroll-behavior: contain; }
.sh-f { flex: none; padding: 8px 16px calc(12px + var(--gest)); }
.sh-b + .sh-f { box-shadow: 0 -1px 0 var(--line); padding-top: 10px; }
.opt { width: 100%; display: flex; align-items: center; gap: 12px; min-height: 54px; padding: 8px 6px; border: 0; background: none; text-align: left; border-radius: 12px; font-size: 15.5px; font-weight: 500; }
.opt:active { background: var(--hover); }
.opt .tx { flex: 1; min-width: 0; }
.opt .tx b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.opt .tx small { display: block; color: var(--muted); font-size: 12.5px; }
.opt .ck { width: 22px; height: 22px; color: var(--acc); visibility: hidden; }
.opt.on .ck { visibility: visible; }
.opt.on .tx b { color: var(--acc); }
.opt + .opt { box-shadow: inset 0 1px 0 var(--line); border-radius: 0; }
.grp { margin: 14px 6px 4px; font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--faint); }
.sh-search { position: relative; margin: 2px 0 6px; }
.sh-search .i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--faint); width: 20px; height: 20px; }
.sh-search input { width: 100%; height: 48px; border: 0; border-radius: 14px; background: #eef1f5; padding: 0 14px 0 44px; font-size: 15.5px; outline: none; }
.mn { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mn button { height: 86px; border: 0; border-radius: 18px; background: #f3f5f8; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; font-weight: 650; font-size: 14.5px; }

/* тост */
.toast { position: absolute; left: 14px; right: 14px; bottom: calc(84px + var(--gest)); z-index: 80; display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 16px; background: #1b2129; color: #fff; font-size: 14.5px; font-weight: 500; box-shadow: 0 14px 30px -10px rgba(0, 0, 0, .45); transform: translateY(20px); opacity: 0; transition: transform .25s, opacity .25s; pointer-events: auto; }
.toast.show { transform: none; opacity: 1; }
.toast .i { width: 20px; height: 20px; color: #6ee7a2; }
.toast.bad .i { color: #ff9b85; }
.toast span { flex: 1; }
.toast button { border: 0; background: none; color: #8fb8ff; font-weight: 650; font-size: 14px; padding: 4px; }

/* успех */
.okmark { position: absolute; inset: 0; z-index: 90; display: grid; place-items: center; pointer-events: none; }
.okmark div { width: 96px; height: 96px; border-radius: 50%; background: var(--in); display: grid; place-items: center; animation: pop .5s cubic-bezier(.2, 1.4, .4, 1) both, fade .3s .65s forwards; box-shadow: 0 14px 40px -10px rgba(31, 157, 85, .7); }
.okmark svg { width: 50px; height: 50px; fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 30; stroke-dashoffset: 30; animation: draw .35s .18s ease-out forwards; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fade { to { opacity: 0; transform: scale(.9); } }

.fab { position: absolute; right: 16px; bottom: calc(86px + var(--gest)); width: 58px; height: 58px; border: 0; border-radius: 18px; background: var(--acc); color: #fff; display: grid; place-items: center; box-shadow: 0 10px 22px -8px rgba(31, 111, 229, .8); z-index: 3; }
.fab .i { width: 26px; height: 26px; }
.photo-full { position: absolute; inset: 0; background: #000; display: flex; align-items: center; justify-content: center; pointer-events: auto; opacity: 0; transition: opacity .2s; }
.photo-full.open { opacity: 1; }
.photo-full img { max-width: 100%; max-height: 100%; }
.photo-full .ib { position: absolute; top: 46px; right: 12px; color: #fff; background: rgba(255, 255, 255, .14); }

@media (prefers-reduced-motion: reduce) { .view, .sheet, .scrim, .tank i { transition: none !important; } .tank i::after { animation: none; } }
/* в телефоне прокрутка как в Android: тонкая */
#app ::-webkit-scrollbar, #layer ::-webkit-scrollbar { width: 4px; height: 4px; }
#app ::-webkit-scrollbar-thumb, #layer ::-webkit-scrollbar-thumb { border: 0; background: rgba(110, 120, 135, .3); }

/* маркировка тары — как надпись на баке */
.code { display: inline-grid; place-items: center; flex: none; min-width: 48px; height: 28px; padding: 0 7px; border: 2px solid var(--ink); border-radius: 7px; background: #fff; color: var(--ink); font: 700 13px/1 ui-monospace, 'Roboto Mono', Consolas, monospace; letter-spacing: .03em; vertical-align: middle; }
.sh-h b .code { height: 26px; margin-right: 4px; }
.dl .r b .code { height: 22px; min-width: 40px; font-size: 12px; border-width: 1.5px; }
.tks { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 11px; padding-top: 11px; border-top: 1px dashed var(--line2); }
.tk { height: 24px; padding: 0 7px; border-radius: 7px; background: #f1f4f7; font-size: 12px; color: var(--ink2); display: inline-flex; gap: 5px; align-items: center; }
.tk b { font: 700 11.5px ui-monospace, 'Roboto Mono', Consolas, monospace; color: var(--ink); }
.tk.mute { color: var(--faint); }
.card.fuel { cursor: pointer; }
.tank.sm { height: 6px; margin-top: 7px; }
.arow { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.arow + .arow { box-shadow: inset 0 1px 0 var(--line); }
.arow .tx { flex: 1; min-width: 0; }
.arow .tx b { display: block; font-size: 14.5px; font-weight: 600; }
.arow .tx small { display: block; font-size: 12.5px; color: var(--muted); }
.arow .unit { width: 128px; flex: none; }
.arow .unit .inp { padding-right: 34px; height: 46px; }
.arow .unit > span { right: 12px; }
.ico.cashout, .ico.cashin, .ico.cco { background: var(--warn-soft); color: var(--warn); }
.pick .code { margin-left: -4px; }
.opt[disabled] { cursor: default; }
/* выбранная плитка топлива — рамкой и лёгкой заливкой, без значка поверх текста */
.ftile.on { background: color-mix(in srgb, var(--c) 7%, #fff); }
.ftile.on::after { display: none; }
.ftile b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.body.fabpad { padding-bottom: 100px; }

/* вход */
.unit .eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border: 0; border-radius: 50%; background: none; color: var(--muted); display: grid; place-items: center; }
.login form .unit .inp { padding-right: 52px; }
.login .hint.bad:empty { display: none; }
