/* ===== SCANNER — new look (scanner-ui.js) ===== */
.scx{display:flex;flex-direction:column;gap:14px;max-width:1100px}
/* start card */
.scx-hero{display:flex;align-items:center;justify-content:space-between;gap:18px;flex-wrap:wrap;padding:18px 20px;border-radius:20px;color:#fff;background:radial-gradient(420px 220px at 0 0,rgba(255,255,255,.14),transparent 70%),linear-gradient(135deg,#1E293B,#0F172A);box-shadow:0 18px 40px -22px rgba(15,23,42,.8)}
.scx-hi{display:flex;align-items:center;gap:14px;min-width:0;flex:1 1 260px}
.scx-hi h1{margin:0;font-size:22px;font-weight:800;color:#fff}.scx-hi p{margin:4px 0 0;font-size:13px;line-height:1.7;color:rgba(255,255,255,.72)}
.scx-badge{flex:none;width:46px;height:46px;border-radius:14px;display:grid;place-items:center;background:linear-gradient(145deg,#38BDF8,#2563EB);box-shadow:inset 0 1px 0 rgba(255,255,255,.4),0 8px 18px -8px #2563EB}
.scx-badge svg{width:22px;height:22px;color:#fff;stroke:#fff}
.scx-go{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.scx-main{display:flex;align-items:center;gap:10px;height:52px;padding:0 26px;border:0;border-radius:999px;cursor:pointer;font:inherit;font-weight:800;font-size:16px;color:#0F172A;background:linear-gradient(180deg,#fff,#E2E8F0);box-shadow:0 10px 24px -10px rgba(255,255,255,.55),inset 0 -2px 0 rgba(0,0,0,.08);transition:transform .15s}
.scx-main:hover{transform:translateY(-1px)}.scx-main:active{transform:scale(.97)}
.scx-main svg{width:22px;height:22px;color:#2563EB;stroke:#2563EB}
.scx-alt{display:flex;gap:6px}
.scx-alt button{display:flex;align-items:center;gap:6px;height:40px;padding:0 14px;border-radius:999px;border:1px solid rgba(255,255,255,.22);background:rgba(255,255,255,.08);color:#fff;font:inherit;font-size:13px;font-weight:600;cursor:pointer}
.scx-alt button:hover{background:rgba(255,255,255,.16)}.scx-alt svg{width:16px;height:16px;color:#fff;stroke:#fff}
.scx-old{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 14px;border:1px dashed var(--bo);border-radius:14px;background:var(--cd);font-size:14px}
/* tips when empty */
.scx-tips{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.scx-tips>div{display:flex;flex-direction:column;gap:4px;padding:14px;border-radius:14px;background:var(--cd);border:1px solid var(--bo)}
.scx-tips svg{width:20px;height:20px;color:#2563EB;stroke:#2563EB;margin-bottom:4px}.scx-tips b{font-size:14px}.scx-tips span{font-size:12px;color:var(--mu);line-height:1.6}
/* the document */
.scx-doc{padding:14px;border-radius:18px;background:var(--cd);border:1px solid var(--bo);box-shadow:0 10px 30px -20px rgba(0,0,0,.35)}
.scx-dh{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:12px}
.scx-name{flex:1 1 220px;display:flex;align-items:center;gap:8px;min-width:0;padding:0 12px;height:40px;border:1.5px solid var(--bo);border-radius:12px;background:var(--bg)}
.scx-name:focus-within{border-color:#2563EB;box-shadow:0 0 0 4px rgba(37,99,235,.15)}
.scx-name svg{width:16px;height:16px;color:var(--mu);flex:none}
.scx-name input{border:0!important;background:transparent!important;box-shadow:none!important;min-height:0!important;height:36px;padding:0!important;font-weight:700;font-size:14px;flex:1;min-width:0}
.scx-cnt{font-size:12px;font-weight:700;padding:4px 10px;border-radius:999px;background:rgba(37,99,235,.1);color:#1D4ED8}
.scx-tools{display:flex;gap:4px}
.scx-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(130px,1fr));gap:12px}
.scx-pg{position:relative;border-radius:12px;background:var(--bg);padding:6px;border:1px solid var(--bo);transition:box-shadow .2s,transform .2s}
.scx-pg:hover{box-shadow:0 12px 26px -14px rgba(0,0,0,.45);transform:translateY(-2px)}
.scx-img{display:block;width:100%;aspect-ratio:210/297;padding:0;border:0;border-radius:8px;overflow:hidden;background:#fff;cursor:pointer;box-shadow:0 1px 3px rgba(0,0,0,.15)}
.scx-img img{width:100%;height:100%;object-fit:contain;display:block}
.scx-no{position:absolute;top:10px;inset-inline-start:10px;min-width:22px;height:22px;padding:0 6px;border-radius:999px;background:rgba(15,23,42,.78);color:#fff;font-size:11px;font-weight:800;display:grid;place-items:center}
.scx-pt{display:flex;justify-content:center;gap:3px;margin-top:6px}
.scx-pt button.ib{min-width:24px;height:24px;min-height:24px;padding:0;border-radius:7px}.scx-pt svg{width:12px!important;height:12px!important}
.scx-pt .scmv svg{transform:rotate(180deg)}.scx-pt .scmv2 svg{transform:none}
html[dir=ltr] .scx-pt .scmv svg{transform:none}html[dir=ltr] .scx-pt .scmv2 svg{transform:rotate(180deg)}
.scx-del{color:#C0362C!important}
.scx-add{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;aspect-ratio:210/297;border:2px dashed color-mix(in srgb,#2563EB 40%,var(--bo));border-radius:12px;background:color-mix(in srgb,#2563EB 5%,transparent);color:#2563EB;font:inherit;font-weight:700;font-size:13px;cursor:pointer}
.scx-add:hover{background:color-mix(in srgb,#2563EB 10%,transparent)}.scx-add svg{width:24px;height:24px}
/* export bar */
.scx-ex{display:flex;flex-wrap:wrap;align-items:flex-end;gap:12px;padding:12px 14px;border-radius:18px;background:color-mix(in srgb,var(--cd) 92%,transparent);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border:1px solid var(--bo);box-shadow:0 14px 34px -18px rgba(0,0,0,.45)}
.scx-opts{display:flex;gap:10px;flex-wrap:wrap}
.scx-opts label,.scx-att label{display:flex;flex-direction:column;gap:3px;font-size:11px;color:var(--mu);font-weight:700}
.scx-opts select,.scx-att select{min-height:38px!important;min-width:130px;font-size:13px}
.scx-btns{display:flex;gap:6px;align-items:center;margin-inline-start:auto;flex-wrap:wrap}
.scx-btns .bt,.scx-btns .b2:not(.ib){display:inline-flex;align-items:center;gap:6px;min-height:40px;padding:0 16px}
.scx-pdf{background:linear-gradient(180deg,#3B82F6,#1D4ED8)!important;color:#fff!important;box-shadow:0 8px 18px -8px #1D4ED8!important}
.scx-btns svg{width:15px;height:15px}
.scx-btns button.ib{min-width:40px;height:40px;min-height:40px}
.scx-att{display:flex;gap:10px;flex-wrap:wrap;align-items:flex-end;width:100%;padding-top:10px;border-top:1px dashed var(--bo)}
.scx-auto{display:flex;align-items:center;gap:10px;width:100%;padding-top:10px;border-top:1px dashed var(--bo);font-size:13px;color:var(--mu)}
.scx-auto span{flex:1}.scx-auto select{width:auto!important;min-height:32px!important;font-size:12px}
.scx-st:empty{display:none}
@media (max-width:640px){.scx-hero{padding:16px}.scx-go{width:100%}.scx-main{flex:1;justify-content:center}.scx-alt{width:100%}.scx-alt button{flex:1;justify-content:center}.scx-tips{grid-template-columns:1fr}.scx-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.scx-btns{margin-inline-start:0;width:100%}.scx-pdf{flex:1;justify-content:center}}
/* the export bar stays in view on big screens; the start card gets small once pages are there */
@media (min-width:1000px) and (min-height:720px){.scx-ex{position:sticky;bottom:10px;z-index:5}}
.scx-hero.sm{padding:12px 16px}.scx-hero.sm p{display:none}.scx-hero.sm .scx-badge{width:38px;height:38px;border-radius:12px}.scx-hero.sm h1{font-size:19px}.scx-hero.sm .scx-main{height:44px;padding:0 20px;font-size:15px}.scx-hero.sm .scx-alt button{height:36px}
/* ===== /SCANNER ===== */
