[hidden] { display: none !important; }
:root { --g: #1a7f4b; --y: #d98e04; --r: #c62828; --bg: #f4f6f5; --fg: #1d2421; --mut: #6b7570; }
* { box-sizing: border-box; }
body { margin: 0; font: 16px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--fg); padding-bottom: 76px; }
header { position: sticky; top: 0; z-index: 5; display: flex; gap: 10px; align-items: center; padding: 10px 14px; background: var(--g); color: #fff; }
header .brand { font-weight: 700; font-size: 18px; display: flex; align-items: center; gap: 8px; }
header .brand img { height: 26px; background: #fff; border-radius: 14px; padding: 2px 4px; }
.login .logo { width: 100%; max-width: 280px; display: block; margin: 4px auto 16px; }
.login h1 { text-align: center; margin: 0; }
.login > .muted { text-align: center; }
header .where { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
header select, header #storeName { width: 100%; margin: 0; font-size: 18px; font-weight: 700; }
header select { border-radius: 8px; border: 0; padding: 5px 6px; color: var(--fg); }
header #storeName { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
header #who { font-size: 13px; opacity: .95; line-height: 1.25; }
header #who b { display: block; font-size: 14px; }
header #who span { display: block; font-size: 12px; opacity: .9; }
header #logoutBtn { flex: none; align-self: center; background: #fff; color: var(--g); border: 0; border-radius: 10px; padding: 8px 12px; font-size: 15px; font-weight: 700; text-decoration: none; cursor: pointer; }
button.link { background: none; border: 0; color: inherit; text-decoration: underline; font-size: 13px; }
main { padding: 12px; max-width: 720px; margin: 0 auto; }
nav#tabs { position: fixed; bottom: 0; left: 0; right: 0; display: flex; gap: 6px; padding: 8px; background: #fff; box-shadow: 0 -2px 8px #0002; }
nav#tabs button { flex: 1; padding: 12px 4px; border: 0; border-radius: 10px; background: #e8ecea; font-size: 15px; }
nav#tabs button.primary { background: var(--g); color: #fff; font-weight: 600; }
.card { background: #fff; border-radius: 12px; padding: 14px; margin-bottom: 12px; box-shadow: 0 1px 3px #0001; }
.login { max-width: 360px; margin: 40px auto; }
label { display: block; margin: 10px 0; font-size: 14px; color: var(--mut); }
input, select, textarea { width: 100%; padding: 11px; font-size: 16px; border: 1px solid #ccd3cf; border-radius: 8px; margin-top: 4px; background: #fff; color: var(--fg); }
button { font: inherit; cursor: pointer; }
button.primary, button.btn { padding: 11px 16px; border: 0; border-radius: 10px; background: var(--g); color: #fff; font-weight: 600; }
button.btn.sec { background: #e8ecea; color: var(--fg); }
button.btn.warn { background: var(--y); }
button.btn.danger { background: var(--r); }
button.big { width: 100%; padding: 14px; font-size: 17px; margin-top: 8px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; }
.row > * { flex: 1; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.tile { border: 0; border-radius: 12px; padding: 14px; text-align: left; color: #fff; }
.tile b { display: block; font-size: 30px; }
.t-md { background: var(--y); } .t-rm { background: #e65100; } .t-ex { background: var(--r); } .t-soon { background: #546e7a; }
.tile.active { outline: 3px solid var(--fg); }
.item { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid #eef1ef; }
.item:last-child { border-bottom: 0; }
.item img, .ph { width: 52px; height: 52px; border-radius: 8px; object-fit: cover; background: #e8ecea; flex: none; }
.item .t { flex: 1; min-width: 0; }
.item .n { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.muted { color: var(--mut); font-size: 13px; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 12px; font-weight: 600; color: #fff; }
.b-ok { background: var(--g); } .b-markdown { background: var(--y); } .b-remove { background: #e65100; } .b-expired { background: var(--r); }
.days { font-weight: 700; font-size: 18px; text-align: right; min-width: 52px; }
.err { color: var(--r); min-height: 1em; }
.warnbox { background: #fff4e0; border-left: 4px solid var(--y); padding: 8px 10px; border-radius: 6px; margin: 8px 0; font-size: 14px; }
.okbox { background: #e6f4ec; border-left: 4px solid var(--g); padding: 8px 10px; border-radius: 6px; margin: 8px 0; font-size: 14px; }
#cam, .cam { position: relative; background: #000; border-radius: 12px; overflow: hidden; aspect-ratio: 3/4; max-height: 60vh; width: 100%; }
#cam video, .cam video { width: 100%; height: 100%; object-fit: cover; }
#cam .frame, .cam .frame { position: absolute; inset: 25% 12%; border: 3px solid #fff8; border-radius: 12px; }
.prod-head { display: flex; gap: 12px; align-items: center; }
.prod-head img, .prod-head .ph { width: 84px; height: 84px; }
h2 { font-size: 18px; margin: 4px 0 10px; }
.toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); background: #222; color: #fff; padding: 10px 16px; border-radius: 10px; z-index: 20; }
.seg { display: flex; gap: 6px; margin: 6px 0; }
.seg button { flex: 1; padding: 8px; border-radius: 8px; border: 1px solid #ccd3cf; background: #fff; }
.seg button.on { background: var(--g); color: #fff; border-color: var(--g); }
header .brand small, .login h1 small { display: block; font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: .08em; opacity: .85; line-height: 1; }
.login h1 small { font-size: 13px; color: var(--mut); margin-bottom: 4px; }
.camctl { margin: 8px 0 0; align-items: center; }
.camctl label { margin: 0; }
.camctl input[type=range] { padding: 0; border: 0; }
.dp { margin: 6px 0 10px; }
.dpv { font-size: 34px; font-weight: 700; letter-spacing: .04em; text-align: center; padding: 10px; border: 2px solid var(--g); border-radius: 12px; background: #fff; font-variant-numeric: tabular-nums; }
.dpv .lbl { display: block; font-size: 12px; font-weight: 500; letter-spacing: 0; color: var(--mut); }
.dpi { text-align: center; font-size: 14px; color: var(--mut); min-height: 1.4em; margin: 6px 0; }
.dpi.good { color: var(--g); font-weight: 600; } .dpi.bad { color: var(--r); font-weight: 600; }
.dpk { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.dpk button { padding: 16px 0; font-size: 26px; font-weight: 600; border: 0; border-radius: 12px; background: #e8ecea; color: var(--fg); touch-action: manipulation; }
.dpk button:active { background: #cfd8d3; }
.dpk button.fn { font-size: 18px; background: #dfe5e2; }
.dpq { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 8px; }
.dpq button { padding: 10px 0; border: 1px solid var(--g); border-radius: 10px; background: #fff; color: var(--g); font-weight: 600; font-size: 14px; }
#backBar { max-width: 720px; margin: 0 auto; padding: 8px 12px 0; }
#backBtn { border: 0; background: none; color: var(--g); font-size: 17px; font-weight: 600; padding: 6px 0; }
nav#tabs button.cur:not(.primary) { outline: 2px solid var(--g); }
.item .dt { font-size: 15px; margin-top: 4px; font-variant-numeric: tabular-nums; }
.ind { flex: none; width: 66px; align-self: stretch; display: flex; flex-direction: column; justify-content: center; align-items: center;
  border-left: 2px solid #2b2f2d; padding-left: 8px; font-size: 28px; font-weight: 700; line-height: 1; }
.ind small { font-size: 11px; font-weight: 500; color: var(--mut); margin-top: 3px; }
.ind.k-ok { color: var(--g); } .ind.k-markdown { color: var(--y); } .ind.k-remove, .ind.k-expired { color: var(--r); font-size: 36px; }
.dpv { cursor: pointer; position: relative; }
.dpv .edit { display: none; font-size: 12px; font-weight: 500; letter-spacing: 0; color: var(--g); }
.dpv.closed .edit { display: block; }
header .brand { flex: none; }
@media (max-width: 380px) { header .brand > span { display: none; } }
.drows { border: 1px solid #dfe5e2; border-radius: 12px; overflow: hidden; margin: 6px 0; background: #fff; }
.drow { display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 12px; border-bottom: 1px solid #eef1ef; }
.drow:last-child { border-bottom: 0; }
.drow > span { flex: 1; font-size: 15px; }
.dval { flex: none; min-width: 150px; padding: 10px 12px; border: 2px solid #ccd3cf; border-radius: 10px; background: #fff; color: var(--fg);
  font-size: 20px; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; touch-action: manipulation; }
.dval.on { border-color: var(--g); box-shadow: 0 0 0 3px #1a7f4b33; }
.dval .muted { font-size: 15px; font-weight: 500; }
.dval small { display: block; font-size: 11px; font-weight: 500; color: var(--mut); }
.dpok { width: 100%; margin-top: 8px; }
.t-ret { background: #6a4fb3; }
.ind.k-return { color: #6a4fb3; }
.retbox { border: 2px solid #6a4fb3; border-radius: 12px; padding: 10px 12px; margin: 10px 0; background: #f5f2fc; }
button.btn.ret { background: #6a4fb3; }
.phedit { margin: 0; position: relative; display: block; flex: none; cursor: pointer; color: var(--g); }
.phedit span { display: block; text-align: center; font-size: 12px; margin-top: 3px; }
.card.search { display: flex; gap: 8px; align-items: center; }
.card.search input { margin: 0; }
.card.search button { flex: none; font-size: 22px; padding: 8px 14px; }
.scanov { position: fixed; inset: 0; z-index: 30; background: var(--bg); padding: 12px; overflow: auto; }
.drow input.retd { width: 80px; flex: none; margin: 0; text-align: right; }
header .brand { cursor: pointer; }
.mods { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mod { border: 0; border-radius: 14px; padding: 18px 12px; background: #fff; box-shadow: 0 1px 3px #0002; font-size: 17px; font-weight: 600; color: var(--fg); text-align: center; }
.mod i { display: block; font-style: normal; font-size: 34px; margin-bottom: 6px; }
.mod small { display: block; font-size: 12px; font-weight: 500; color: var(--mut); }
.mod.soon { opacity: .55; }
.mod.adm { background: #e8ecea; }
.hello h2 { margin: 0; } .hello p { margin: 4px 0 0; }
.checks { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 6px 0 10px; }
label.chk { display: flex; align-items: center; gap: 8px; margin: 6px 0; color: var(--fg); font-size: 15px; }
label.chk input { width: 20px; height: 20px; margin: 0; flex: none; }
.urow { cursor: pointer; } .urow.off .n { color: var(--mut); text-decoration: line-through; }
.rtab { overflow-x: auto; } .rtab table { border-collapse: collapse; width: 100%; font-size: 14px; }
.rtab th, .rtab td { padding: 8px 6px; border-bottom: 1px solid #eef1ef; text-align: center; } .rtab td:first-child { text-align: left; }
.rtab th { font-size: 12px; font-weight: 600; color: var(--mut); } .rtab input { width: 20px; height: 20px; margin: 0; }
#invUrl { font-size: 13px; margin: 6px 0; }
#rgWrap { margin: 8px 0; }
#rgWrap > .lbl { font-size: 14px; color: var(--mut); margin-bottom: 4px; }
.geo { border: 1px solid #e3e6e3; border-radius: 10px; padding: 6px 10px; margin: 6px 0; }
.geo b { display: block; font-size: 14px; margin: 2px 0; }
.addrow { margin: 10px 0 4px; }
.addrow .btn { width: 100%; }
.grp { font-size: 13px; font-weight: 600; color: var(--mut); margin: 12px 0 2px; text-transform: uppercase; letter-spacing: .04em; }
.about { text-align: center; margin: 18px 0 8px; font-size: 13px; }
.about a { color: var(--mut); }
