:root {
  --bg:#f4f5f7;
  --surface:#ffffff;
  --text:#18191c;
  --muted:#858a93;
  --line:#e6e8ec;
  --accent:#4f5cff;
  --accent-soft:#eef0ff;
  --danger:#c63c3c;
  --success:#16845a;
  --header-h:72px;
  --footer-h:82px;
  --safe-top:env(safe-area-inset-top,0px);
  --safe-bottom:env(safe-area-inset-bottom,0px);
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;
  color-scheme:light;
}
*{box-sizing:border-box}
html,body{margin:0;min-height:100%;background:#e8eaf0;color:var(--text)}
body{overscroll-behavior:none}
button,input,textarea{font:inherit}
button{border:0;cursor:pointer}
#app{min-height:100vh}
.app-shell{position:relative;max-width:430px;min-height:100vh;margin:0 auto;background:var(--bg);box-shadow:0 0 40px rgba(30,35,55,.13);overflow:hidden}
.app-header{position:fixed;z-index:50;top:0;left:50%;transform:translateX(-50%);width:min(100%,430px);height:calc(var(--header-h) + var(--safe-top));padding:calc(12px + var(--safe-top)) 16px 10px;background:rgba(255,255,255,.96);border-bottom:1px solid var(--line);backdrop-filter:blur(14px);display:flex;align-items:center;gap:10px}
.header-back{width:38px;height:38px;border-radius:12px;background:#f1f2f5;color:#34373d;display:grid;place-items:center;flex:0 0 auto}
.header-back svg{width:21px;height:21px}
.header-copy{min-width:0;flex:1}
.header-title{font-size:19px;line-height:1.08;font-weight:800;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.header-subtitle{font-size:11px;color:var(--muted);margin-top:5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.main-scroll{height:100vh;overflow-y:auto;-webkit-overflow-scrolling:touch;padding:calc(var(--header-h) + var(--safe-top) + 14px) 14px calc(var(--footer-h) + var(--safe-bottom) + 24px)}
.main-scroll.with-action{padding-bottom:calc(var(--footer-h) + var(--safe-bottom) + 92px)}
.app-footer{position:fixed;z-index:50;bottom:0;left:50%;transform:translateX(-50%);width:min(100%,430px);height:calc(var(--footer-h) + var(--safe-bottom));background:rgba(255,255,255,.98);border-top:1px solid var(--line);backdrop-filter:blur(14px);padding:7px 12px calc(5px + var(--safe-bottom));display:flex;flex-direction:column;justify-content:space-between}
.footer-nav{display:grid;grid-template-columns:1fr 1fr;gap:8px;height:50px}
.footer-btn{background:transparent;color:#90959d;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;font-size:10px;font-weight:700;border-radius:12px}
.footer-btn.active{color:var(--accent);background:#f7f7ff}
.footer-btn svg{width:22px;height:22px}
.brand{text-align:center;font-size:8px;line-height:1;color:#a8acb4;letter-spacing:.15px}
.brand a{color:inherit;text-decoration:none}
.login-footer .footer-nav{display:none}
.login-footer{justify-content:flex-end;padding-bottom:calc(8px + var(--safe-bottom));height:calc(32px + var(--safe-bottom))}
.login-scroll{padding-bottom:calc(46px + var(--safe-bottom))}
.card{background:var(--surface);border:1px solid var(--line);border-radius:17px;padding:14px}
.card + .card{margin-top:10px}
.hint{font-size:12px;line-height:1.45;color:var(--muted)}
.muted{color:var(--muted)}
.section-head{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;margin:6px 2px 10px}
.section-head h2{font-size:16px;margin:0}.section-head span{font-size:11px;color:var(--muted)}
.primary,.secondary,.danger-button{width:100%;height:48px;border-radius:14px;font-weight:800}
.primary{background:var(--accent);color:#fff}.primary:disabled{opacity:.45;cursor:default}
.secondary{background:#eef0f4;color:#30343a}.danger-button{background:#fff0f0;color:var(--danger)}
.inline-actions{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-top:12px}
.alert{padding:11px 12px;border-radius:12px;font-size:12px;line-height:1.4;margin-top:10px}.alert.error{background:#fff0f0;color:#a83939}.alert.info{background:#eef1ff;color:#4651bd}
.login-card{margin-top:9vh;padding:20px 16px 18px}
.login-card h1{font-size:23px;margin:0 0 7px}.login-card p{font-size:13px;line-height:1.45;color:var(--muted);margin:0}
.pin-input{width:100%;height:56px;margin-top:20px;border:1px solid #d9dce3;border-radius:14px;background:#fafbfc;text-align:center;font-size:24px;font-weight:800;letter-spacing:9px;outline:0;padding-left:9px}
.pin-input:focus{border-color:#8790ff;box-shadow:0 0 0 3px rgba(79,92,255,.08)}
.pin-input::placeholder{color:#c6c9cf;letter-spacing:7px}
.product-list{display:flex;flex-direction:column;gap:8px}
.product{background:#fff;border:1px solid var(--line);border-radius:15px;padding:12px;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:10px}
.product-name{font-size:13px;line-height:1.3;font-weight:750}
.product-price{display:flex;align-items:baseline;gap:7px;margin-top:6px}.product-price strong{font-size:14px}.product-price span{font-size:10px;color:var(--muted)}
.qty{display:grid;grid-template-columns:34px 44px 34px;gap:5px;align-items:center}
.qty button{width:34px;height:36px;border-radius:10px;background:var(--accent-soft);color:#4652d8;font-size:20px;font-weight:800}
.qty input{width:44px;height:36px;border:1px solid #dfe2e8;border-radius:10px;text-align:center;font-size:14px;font-weight:800;outline:0;padding:0}
.qty input:focus{border-color:#8690ff}
.action-bar{position:fixed;z-index:45;left:50%;transform:translateX(-50%);bottom:calc(var(--footer-h) + var(--safe-bottom));width:min(100%,430px);padding:9px 14px;background:linear-gradient(to top,#fff 74%,rgba(255,255,255,0));}
.action-button{width:100%;min-height:52px;border-radius:15px;background:#181a1f;color:#fff;padding:9px 13px;display:flex;align-items:center;justify-content:space-between;gap:10px;text-align:left}
.action-button:disabled{opacity:.45}.action-button strong{font-size:13px}.action-button small{display:block;color:#b9bec8;margin-top:3px;font-size:10px}.action-button .go{background:#fff;color:#181a1f;padding:9px 11px;border-radius:10px;font-size:12px;font-weight:850;white-space:nowrap}
.form-label{display:block;font-size:12px;font-weight:750;margin:0 0 7px}
.field{width:100%;border:1px solid #dfe2e8;border-radius:13px;background:#fff;outline:0;padding:12px 13px;font-size:14px}
.field:focus{border-color:#8790ff;box-shadow:0 0 0 3px rgba(79,92,255,.07)}
textarea.field{min-height:110px;resize:vertical;line-height:1.45}
.field-group + .field-group{margin-top:15px}
.cutoff{display:flex;gap:9px;align-items:flex-start;padding:11px 12px;background:#f6f7f9;border-radius:12px;margin-top:9px}.cutoff svg{width:18px;height:18px;flex:0 0 auto;color:#747a84}.cutoff div{font-size:11px;line-height:1.45;color:#6e737c}
.summary-row{display:flex;justify-content:space-between;gap:14px;padding:9px 0;font-size:13px}.summary-row + .summary-row{border-top:1px solid var(--line)}.summary-row span:first-child{color:var(--muted)}.summary-row strong{text-align:right}.summary-row.total{font-size:16px;font-weight:850;padding-top:12px}
.order-lines{display:flex;flex-direction:column}.order-line{display:grid;grid-template-columns:1fr auto;gap:12px;padding:11px 0;border-bottom:1px solid var(--line)}.order-line:last-child{border-bottom:0}.order-line strong{display:block;font-size:12px;line-height:1.32}.order-line small{font-size:10px;color:var(--muted)}.order-line .line-total{text-align:right;font-size:12px;font-weight:800;white-space:nowrap}
.comment-box{font-size:13px;line-height:1.5;white-space:pre-wrap;overflow-wrap:anywhere;color:#3d4148}
.orders-list{display:flex;flex-direction:column;gap:9px}
.order-card{background:#fff;border:1px solid var(--line);border-radius:16px;padding:13px;text-align:left;width:100%;color:inherit}
.order-head{display:flex;justify-content:space-between;gap:10px;align-items:flex-start}.order-number{font-size:13px;font-weight:850}.order-created{font-size:10px;color:var(--muted);margin-top:3px}.status{font-size:10px;font-weight:800;border-radius:999px;padding:5px 8px;white-space:nowrap}.status.sent{background:#eef0ff;color:#4954cd}.status.accepted{background:#fff4df;color:#9a650f}.status.done{background:#e9f7f0;color:#16754e}
.order-meta{margin-top:13px;display:flex;justify-content:space-between;gap:12px;align-items:flex-end}.order-meta span{font-size:10px;color:var(--muted);display:block}.order-meta strong{font-size:15px}.order-meta .right{text-align:right}
.empty{padding:56px 20px;text-align:center;color:var(--muted)}.empty strong{display:block;color:#555b64;font-size:14px;margin-bottom:6px}.empty span{font-size:12px}
.success{text-align:center;padding:34px 8px 18px}.success-mark{width:72px;height:72px;border-radius:50%;margin:8px auto 18px;background:#e9f7f0;color:var(--success);display:grid;place-items:center}.success-mark svg{width:34px;height:34px}.success h2{font-size:21px;margin:0 0 7px}.success p{font-size:12px;color:var(--muted);line-height:1.5;margin:0 auto;max-width:290px}
.spacer8{height:8px}.spacer12{height:12px}.spacer16{height:16px}
@media(min-width:700px){.app-shell{min-height:calc(100vh - 32px);height:calc(100vh - 32px);margin:16px auto;border-radius:28px}.app-header{top:16px;border-radius:28px 28px 0 0}.app-footer,.action-bar{bottom:16px}.app-footer{border-radius:0 0 28px 28px}.action-bar{bottom:calc(16px + var(--footer-h))}.main-scroll{height:calc(100vh - 32px)}}
.loading-screen{min-height:55vh;display:grid;place-items:center;text-align:center;color:var(--muted);font-size:12px}
.spinner{width:30px;height:30px;border:3px solid #e1e3e9;border-top-color:var(--accent);border-radius:50%;animation:spin .8s linear infinite;margin:0 auto 12px}
@keyframes spin{to{transform:rotate(360deg)}}
button.is-busy{opacity:.65;pointer-events:none}
.page-error{margin-bottom:10px}
.logout-wrap{margin-top:18px}
.offline-banner{position:fixed;z-index:80;top:10px;left:50%;transform:translateX(-50%);width:min(calc(100% - 28px),402px);background:#fff0f0;color:#9d3535;border:1px solid #ffd7d7;border-radius:12px;padding:9px 12px;font-size:11px;text-align:center;box-shadow:0 8px 30px rgba(70,20,20,.12)}
.status.cancelled{background:#fff0f0;color:#a83939}

.blocked-card{text-align:center}.blocked-card h1{font-size:21px}.blocked-card p{max-width:320px;margin:0 auto;color:var(--muted);line-height:1.55}
