:root { --green:#176b5b; --dark:#153b35; --soft:#eff7f4; --red:#9a2c2c; --line:#d8e2df; --ink:#172321; }
* { box-sizing:border-box; }
body { margin:0; background:#f7f9f8; color:var(--ink); font:16px/1.45 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; }
button,input,textarea,select { font:inherit; }
button { cursor:pointer; }
.topbar { min-height:62px; background:var(--green); display:flex; justify-content:space-between; align-items:center; padding:0 18px; color:#fff; box-shadow:0 1px 3px #0003; }
.brand { color:inherit; text-decoration:none; font-weight:800; letter-spacing:.06em; }
.page { max-width:760px; padding:22px 16px 48px; margin:auto; }
h1 { font-size:1.55rem; margin:0 0 6px; } h2 { font-size:1.16rem; margin:24px 0 10px; } p { margin:6px 0 14px; }
.muted { color:#5d6966; } .small { font-size:.88rem; } .text-button { background:none; border:0; color:inherit; padding:10px 5px; font-weight:650; }
.card { background:#fff; border:1px solid var(--line); border-radius:12px; padding:16px; margin:14px 0; box-shadow:0 1px 2px #18211e0a; }
.actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin:20px 0; }
.actions.three { grid-template-columns:repeat(3,minmax(0,1fr)); }
.button { border:0; border-radius:9px; padding:13px 12px; background:var(--green); color:#fff; font-weight:700; text-align:center; }
.button.secondary { background:var(--soft); color:var(--dark); border:1px solid #cce0da; }.button.danger { background:var(--red); }.button.full { width:100%; }.button:disabled { opacity:.45; cursor:not-allowed; }
.search-row { display:flex; gap:8px; align-items:stretch; }.search { width:100%; padding:14px; border:2px solid #9cc9be; border-radius:9px; outline:none; }.search:focus,input:focus,textarea:focus { border-color:var(--green); outline:2px solid #cbe7df; }
.icon-button { display:grid; place-items:center; border:1px solid #b8c9c4; border-radius:9px; min-width:46px; min-height:46px; padding:8px; background:#fff; color:var(--dark); font-weight:800; line-height:1; }.icon-button:hover { background:var(--soft); }.icon-button:focus-visible { outline:2px solid #cbe7df; outline-offset:2px; }.camera-button { border:2px solid #9cc9be; }.camera-button svg { width:24px; height:24px; fill:currentColor; }
.list { list-style:none; padding:0; margin:12px 0; }.list li { border-bottom:1px solid var(--line); }.list a { display:block; color:inherit; text-decoration:none; padding:13px 5px; }.list a:hover { background:var(--soft); }
.row { display:flex; align-items:center; justify-content:space-between; gap:10px; }.quantity { color:var(--green); font-size:1.15rem; font-weight:800; white-space:nowrap; }.badge { display:inline-block; background:var(--soft); color:var(--dark); padding:3px 8px; border-radius:20px; font-size:.8rem; font-weight:700; }
.detail { display:grid; grid-template-columns:1fr auto; gap:8px 16px; }.detail dt { color:#5d6966; }.detail dd { margin:0; font-weight:600; text-align:right; word-break:break-word; }
.form-grid { display:grid; gap:14px; }.field { display:grid; gap:5px; font-weight:650; }.field input,.field textarea,.field select { width:100%; padding:10px; border:1px solid #b8c9c4; border-radius:7px; background:#fff; }.field textarea { min-height:86px; resize:vertical; }.two { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.notice { padding:12px; background:#fff9e9; border-left:4px solid #d18b00; border-radius:4px; }.error { color:#9a2c2c; font-weight:650; }.hidden { display:none !important; }.admin-nav { display:flex; gap:8px; overflow:auto; padding-bottom:4px; }.admin-nav .button { white-space:nowrap; padding:9px 12px; }.admin-nav .active { background:var(--dark); }
.toast { position:fixed; z-index:10; left:50%; bottom:20px; transform:translate(-50%,130px); background:#172321; color:#fff; border-radius:8px; padding:10px 16px; opacity:0; transition:.2s; max-width:90vw; }.toast.visible { transform:translate(-50%,0); opacity:1; }
dialog { border:0; border-radius:12px; padding:0; max-width:min(480px,calc(100% - 28px)); box-shadow:0 12px 38px #0005; }.dialog-body,.scanner { padding:20px; }.dialog-body h2,.scanner h2 { margin-top:0; } dialog::backdrop { background:#10231e99; }.scanner .row { align-items:flex-start; }.scanner-preview { position:relative; overflow:hidden; background:#10231e; border-radius:10px; aspect-ratio:4/3; }.scanner-preview video,.scanner-fallback video { width:100%; height:100%; display:block; object-fit:cover; }.scanner-fallback { position:absolute; inset:0; display:block; }.scanner-fallback > div { width:100% !important; height:100% !important; }.scanner-guide { position:absolute; z-index:2; pointer-events:none; left:10%; right:10%; top:42%; height:16%; border:2px solid #fff; border-radius:6px; box-shadow:0 0 0 999px #0003; }
@media (max-width:440px) { .actions.three { grid-template-columns:1fr; }.two { grid-template-columns:1fr; } }
