:root{--brand:#0031DD;--brand-2:#6D77E8;--brand-soft:#EEF1FF;--brand-soft-2:#E3E8FF;--ink:#111827;--ink-2:#374151;--muted:#6B7280;--bg:#F7F8FB;--card:#fff;--border:#E7E9EF;--border-2:#EDEFF4;--green:#0E9F6E;--green-soft:#E7F6EF;--amber:#B45309;--amber-soft:#FEF3E2;--red:#DC2626;--red-soft:#FDECEC;--shadow:0 1px 2px rgba(16,24,40,.04),0 6px 20px rgba(16,24,40,.06);--shadow-lg:0 10px 40px rgba(16,24,40,.14);--radius:14px;--font:-apple-system,system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;--safe-b:env(safe-area-inset-bottom,0px)}
*{box-sizing:border-box}
html,body{margin:0}
body{font-family:var(--font);background:var(--bg);color:var(--ink);-webkit-font-smoothing:antialiased;font-size:16px;line-height:1.45;-webkit-tap-highlight-color:transparent}
button,input,select,textarea{font-family:inherit;font-size:16px}
button{cursor:pointer}
.spinner{width:34px;height:34px;border:3px solid var(--brand-soft-2);border-top-color:var(--brand);border-radius:50%;animation:spin .8s linear infinite;margin:30vh auto}
@keyframes spin{to{transform:rotate(360deg)}}
.wordmark{font-weight:800;letter-spacing:-.6px;font-size:22px;color:var(--brand)}
.wordmark span{font-weight:300}
.topbar{position:sticky;top:0;z-index:40;background:rgba(255,255,255,.94);backdrop-filter:saturate(180%) blur(10px);border-bottom:1px solid var(--border)}
.topbar-inner{display:flex;align-items:center;gap:10px;padding:0 18px;height:62px;max-width:1100px;margin:0 auto}
.grow{flex:1}
.pill{display:inline-flex;align-items:center;gap:6px;font-size:13px;font-weight:600;padding:5px 11px;border-radius:999px;background:var(--border-2);color:var(--ink-2);white-space:nowrap}
.pill .dot{width:8px;height:8px;border-radius:50%;background:var(--muted)}
.pill.ok{background:var(--green-soft);color:var(--green)}.pill.ok .dot{background:var(--green)}
.pill.warn{background:var(--amber-soft);color:var(--amber)}.pill.warn .dot{background:var(--amber)}
.pill.bad{background:var(--red-soft);color:var(--red)}.pill.bad .dot{background:var(--red)}
.pill.blue{background:var(--brand-soft);color:var(--brand)}
.tabs{display:flex;gap:4px;max-width:1100px;margin:0 auto;padding:0 12px;overflow-x:auto}
.tab{border:0;background:none;padding:12px 14px;font-weight:600;color:var(--muted);border-bottom:3px solid transparent;white-space:nowrap}
.tab.on{color:var(--brand);border-bottom-color:var(--brand)}
main{max-width:1100px;margin:0 auto;padding:18px 18px calc(120px + var(--safe-b))}
.btn{border:1px solid var(--border);background:#fff;color:var(--ink-2);font-weight:600;font-size:15px;padding:10px 16px;border-radius:12px;display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:46px;white-space:nowrap;transition:.15s}
.btn:hover{border-color:var(--brand-2);color:var(--brand)}
.btn.primary{background:var(--brand);border-color:var(--brand);color:#fff}
.btn.primary:hover{background:#0029b8;color:#fff}
.btn.big{min-height:56px;font-size:17px;padding:12px 22px;border-radius:14px}
.btn.sm{min-height:38px;padding:6px 12px;font-size:14px;border-radius:10px}
.btn.danger{color:var(--red);border-color:var(--red-soft)}
.btn:disabled{opacity:.5;cursor:default}
.card{background:var(--card);border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow)}
.pad{padding:18px}
h1{font-size:24px;letter-spacing:-.4px;margin:4px 0 4px}
h2{font-size:18px;margin:0 0 10px}
.muted{color:var(--muted)}
.small{font-size:13.5px}
.row{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.search{width:100%;padding:13px 16px 13px 44px;border:1px solid var(--border);border-radius:14px;background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' stroke='%236B7280' stroke-width='2'%3E%3Ccircle cx='9' cy='9' r='6'/%3E%3Cpath d='m14 14 4 4'/%3E%3C/svg%3E") 14px center no-repeat;font-size:17px}
.search:focus,.field:focus{outline:none;border-color:var(--brand);box-shadow:0 0 0 3px var(--brand-soft)}
.chips{display:flex;gap:8px;overflow-x:auto;padding:12px 0 4px}
.chip{border:1px solid var(--border);background:#fff;border-radius:999px;padding:8px 14px;font-weight:600;font-size:14px;color:var(--ink-2);white-space:nowrap}
.chip.on{background:var(--ink);border-color:var(--ink);color:#fff}
.list{margin-top:12px}
.item{display:flex;align-items:center;gap:14px;padding:12px 14px;border-bottom:1px solid var(--border-2);background:#fff}
.item:first-child{border-radius:var(--radius) var(--radius) 0 0}.item:last-child{border-radius:0 0 var(--radius) var(--radius);border-bottom:0}
.item .info{flex:1;min-width:0;cursor:pointer}
.item .nm{font-weight:650;font-size:16px}
.item .sb{font-size:13.5px;color:var(--muted)}
.item .pr{font-weight:750;font-size:17px;min-width:70px;text-align:right}
.item.sel{background:var(--brand-soft)}
.thumb{width:86px;height:54px;border-radius:5px;background:#000;flex:none;cursor:pointer}
.step{display:flex;align-items:center;border:1px solid var(--border);border-radius:12px;overflow:hidden;background:#fff}
.step button{border:0;background:#fff;width:44px;height:44px;font-size:22px;font-weight:600;color:var(--brand)}
.step span{min-width:30px;text-align:center;font-weight:700}
.add{border:1px solid var(--brand);background:#fff;color:var(--brand);border-radius:12px;height:46px;padding:0 18px;font-weight:700}
.tray{position:fixed;left:0;right:0;bottom:0;z-index:50;background:#fff;border-top:1px solid var(--border);box-shadow:0 -6px 24px rgba(16,24,40,.08);padding:12px 18px calc(12px + var(--safe-b))}
.tray-inner{max-width:1100px;margin:0 auto;display:flex;align-items:center;gap:14px}
.sheet-bg{position:fixed;inset:0;background:rgba(17,24,39,.45);z-index:60;display:flex;align-items:flex-end;justify-content:center}
.sheet{background:#fff;width:100%;max-width:720px;max-height:92vh;overflow:auto;border-radius:20px 20px 0 0;padding:20px 20px calc(20px + var(--safe-b))}
@media(min-width:760px){.sheet-bg{align-items:center}.sheet{border-radius:20px}}
.field{width:100%;padding:13px 14px;border:1px solid var(--border);border-radius:12px;background:#fff;font-size:17px}
label.lab{display:block;font-weight:650;margin:14px 0 6px;font-size:15px}
.preview{width:100%;max-width:520px;aspect-ratio:85.6/54;border-radius:14px;background:#000;display:block;margin:6px auto 4px;box-shadow:var(--shadow-lg)}
.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:12px}
.grid canvas{width:100%;aspect-ratio:85.6/54;border-radius:8px;background:#000}
.order{padding:14px 16px;border-bottom:1px solid var(--border-2)}
.order:last-child{border-bottom:0}
.empty{text-align:center;padding:50px 20px;color:var(--muted)}
.toast{position:fixed;left:50%;transform:translateX(-50%);bottom:calc(100px + var(--safe-b));background:var(--ink);color:#fff;padding:12px 18px;border-radius:12px;z-index:80;font-weight:600;box-shadow:var(--shadow-lg);max-width:90vw}
.login{max-width:420px;margin:12vh auto;text-align:center;padding:34px 26px}
.gbtn{display:flex;align-items:center;justify-content:center;gap:12px;width:100%;min-height:56px;border:1px solid var(--border);border-radius:14px;background:#fff;font-weight:650;font-size:17px;margin-top:22px}
table.t{width:100%;border-collapse:collapse;font-size:14.5px}
table.t th{text-align:left;font-size:12.5px;text-transform:uppercase;letter-spacing:.4px;color:var(--muted);padding:8px 10px;border-bottom:1px solid var(--border)}
table.t td{padding:9px 10px;border-bottom:1px solid var(--border-2);vertical-align:middle}
.seg{display:inline-flex;border:1px solid var(--border);border-radius:10px;overflow:hidden}
.seg button{border:0;background:#fff;padding:7px 11px;font-size:13px;font-weight:650;color:var(--muted)}
.seg button.on{background:var(--ink);color:#fff}
.banner{padding:12px 14px;border-radius:12px;background:var(--amber-soft);color:var(--amber);font-weight:600;font-size:14.5px;margin-bottom:12px}
.banner.blue{background:var(--brand-soft);color:var(--brand)}
code{background:var(--border-2);padding:2px 6px;border-radius:6px;font-size:13px;word-break:break-all}
