/* Lume: шторки (мобильная: снизу, ПК: модальное окно), чек-билет, спиннер, тост. */
.overlay { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-end; justify-content: center; background: rgba(20, 15, 60, 0); backdrop-filter: blur(0); transition: background .25s, backdrop-filter .25s; }
.overlay[hidden] { display: none; }
.overlay.open { background: rgba(20, 15, 60, .42); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.sheet { position: relative; width: 100%; max-width: 560px; max-height: 92dvh; overflow-y: auto; padding: 14px 20px calc(24px + env(safe-area-inset-bottom)); border-radius: 30px 30px 0 0; background: #fbfaff; box-shadow: 0 -20px 60px -20px rgba(30, 10, 120, .4);
  transform: translateY(100%); transition: transform .34s cubic-bezier(.2, .9, .25, 1); outline: none; overscroll-behavior: contain; }
.overlay.open .sheet { transform: none; }
.sheet-grab { display: block; width: 42px; height: 5px; margin: 0 auto 14px; border-radius: 3px; background: rgba(20, 19, 43, .16); }
.sheet-x { position: absolute; top: 12px; right: 14px; width: 40px; height: 40px; }
.sheet-x[hidden] { display: none; }
.sheet-head { display: flex; align-items: center; gap: 14px; margin: 4px 44px 18px 0; }
.sheet-head h2, .done h2 { font-family: var(--font-d); font-weight: 600; font-size: 19px; letter-spacing: -.02em; line-height: 1.2; }
.sheet-head p { color: var(--ink-2); font-size: 14px; }
.sheet-actions { display: flex; gap: 10px; margin-top: 18px; }
.sheet-actions .btn { flex: 1; }
.state-ico { display: grid; place-items: center; flex: none; width: 48px; height: 48px; border-radius: 16px; background: rgba(91, 61, 245, .1); color: var(--accent-ink); }
.state-ico.ok { background: rgba(20, 199, 176, .18); color: var(--pos); animation: pop .5s cubic-bezier(.2, 1.4, .4, 1) both; }
.state-ico.warn { background: rgba(255, 140, 60, .16); color: var(--warn); }
.done { display: flex; align-items: center; gap: 14px; margin: 4px 44px 16px 0; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
.quick-list { display: grid; gap: 10px; }
.quick-list a { display: flex; align-items: center; gap: 14px; min-height: 68px; padding: 12px 16px; border-radius: 20px; background: #fff; border: 1px solid var(--line); transition: transform .15s, border-color .2s; }
.quick-list a:hover { border-color: rgba(91, 61, 245, .4); } .quick-list a:active { transform: scale(.98); }
.quick-list .ico { width: 26px; height: 26px; color: var(--accent); }
.quick-list span { display: grid; } .quick-list small { color: var(--ink-2); font-weight: 600; font-size: 13px; }

/* Обработка */
.process { display: grid; justify-items: center; gap: 14px; padding: 18px 0 6px; text-align: center; }
.process h2 { font-family: var(--font-d); font-weight: 600; font-size: 18px; letter-spacing: -.02em; }
.spinner { width: 54px; height: 54px; border-radius: 50%; border: 5px solid rgba(91, 61, 245, .15); border-top-color: var(--accent); border-right-color: var(--accent-2); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.skel { display: grid; gap: 10px; width: 100%; margin-top: 4px; }
.skel i { display: block; height: 16px; border-radius: 8px; background: linear-gradient(90deg, rgba(20, 19, 43, .06) 25%, rgba(20, 19, 43, .13) 50%, rgba(20, 19, 43, .06) 75%); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
.skel i:nth-child(2) { width: 80%; } .skel i:nth-child(3) { width: 55%; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* Чек-билет с перфорацией */
.ticket { --paper: #fff; position: relative; border-radius: 24px; background: var(--paper); box-shadow: 0 18px 40px -22px rgba(30, 10, 120, .5), 0 0 0 1px rgba(20, 19, 43, .06); overflow: hidden; animation: print .55s cubic-bezier(.2, .9, .25, 1) both; }
@keyframes print { from { transform: translateY(-14px) scale(.97); opacity: 0; } to { transform: none; opacity: 1; } }
.ticket-top { display: flex; align-items: center; gap: 12px; padding: 18px; color: #fff; background: linear-gradient(135deg, var(--c1), var(--c2)); flex-wrap: wrap; }
.ticket-top > div:nth-child(2) { flex: 1; min-width: 120px; display: grid; }
.ticket-top small { opacity: .85; font-weight: 700; font-size: 12px; } .ticket-top b { font-size: 15px; line-height: 1.25; }
.ticket-top .mark { background: rgba(255, 255, 255, .22); box-shadow: none; }
.ticket-sum { width: 100%; font-family: var(--font-d); font-weight: 600; font-size: 28px; letter-spacing: -.03em; }
.perf { position: relative; height: 0; border-top: 2px dashed rgba(20, 19, 43, .16); margin: 0 14px; }
.perf::before, .perf::after { content: ''; position: absolute; top: -13px; width: 24px; height: 24px; border-radius: 50%; background: #fbfaff; }
.perf::before { left: -26px; box-shadow: inset -3px 0 4px -3px rgba(20, 19, 43, .12); } .perf::after { right: -26px; box-shadow: inset 3px 0 4px -3px rgba(20, 19, 43, .12); }
.ticket-rows { display: grid; gap: 10px; padding: 18px; }
.ticket-rows > div { display: flex; justify-content: space-between; gap: 16px; font-size: 14px; }
.ticket-rows dt { color: var(--ink-2); font-weight: 600; } .ticket-rows dd { font-weight: 700; text-align: right; word-break: break-word; }
.ticket .codebox { margin: 0 18px 18px; background: rgba(91, 61, 245, .06); border-color: rgba(91, 61, 245, .3); flex-wrap: wrap; }
.ticket-foot { display: grid; gap: 8px; justify-items: center; padding: 16px 18px 18px; color: var(--ink); }
.barcode { width: 100%; max-width: 220px; height: 34px; } .ticket-foot small { color: var(--ink-3); font-size: 11.5px; font-weight: 600; text-align: center; }

.toast { position: fixed; z-index: 90; left: 50%; bottom: calc(var(--nav-h) + 30px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); max-width: calc(100vw - 32px); padding: 12px 20px; border-radius: 16px; background: #14132b; color: #fff; font-weight: 700; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (min-width: 700px) {
  .overlay { align-items: center; padding: 24px; }
  .sheet { border-radius: 30px; max-height: 90dvh; padding-bottom: 24px; transform: translateY(24px) scale(.97); opacity: 0; transition: transform .3s cubic-bezier(.2, .9, .25, 1), opacity .25s; }
  .overlay.open .sheet { transform: none; opacity: 1; }
  .sheet-grab { display: none; }
  .sheet { padding-top: 24px; }
  .sheet-x { top: 18px; }
}
@media (min-width: 1024px) { .toast { bottom: 32px; } }
