:root { --lime: #80C020; --lime-d: #6aa318; --ink: #303030; --bg: #f3f5f0; --line: #e1e5dc; --red: #d64545; --amber: #e0a000; --blue: #3b82c4; }
* { box-sizing: border-box; }
body { margin: 0; font-family: "Segoe UI", Roboto, "Noto Sans", "DejaVu Sans", Arial, sans-serif; background: var(--bg); color: var(--ink); font-size: 15px; }
a { color: var(--lime-d); text-decoration: none; } a:hover { text-decoration: underline; }
.layout { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
nav.side { background: var(--ink); color: #ddd; padding: 20px 14px; display: flex; flex-direction: column; gap: 4px; }
nav.side img { width: 170px; margin: 0 8px 18px; }
nav.side a { color: #ddd; padding: 10px 12px; border-radius: 10px; display: flex; gap: 10px; align-items: center; font-weight: 600; }
nav.side a:hover { background: #3d3d3d; text-decoration: none; }
nav.side a.on { background: var(--lime); color: #fff; }
nav.side .sep { border-top: 1px solid #444; margin: 12px 0; }
nav.side .foot { margin-top: auto; font-size: 12px; color: #999; padding: 8px; }
main { padding: 22px 30px 40px; min-width: 0; }
header.top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; gap: 14px; }
header.top h1 { margin: 0; font-size: 26px; }
.badge-demo { background: #ffcc00; color: #303030; font-weight: 800; padding: 6px 12px; border-radius: 8px; letter-spacing: .5px; font-size: 13px; }
.langs a { display: inline-block; padding: 5px 11px; border-radius: 20px; border: 1px solid #ccc; color: var(--ink); font-weight: 700; font-size: 13px; margin-left: 4px; }
.langs a.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.demo-note { background: #fff8d6; border: 1px solid #f0de8a; padding: 10px 14px; border-radius: 10px; margin-bottom: 18px; font-size: 14px; }
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 22px; }
.kpi { background: #fff; border-radius: 16px; padding: 18px 20px; border: 1px solid var(--line); border-top: 5px solid var(--lime); }
.kpi.warn { border-top-color: var(--amber); } .kpi.bad { border-top-color: var(--red); }
.kpi .lbl { color: #666; font-weight: 600; font-size: 14px; } .kpi .val { font-size: 32px; font-weight: 800; margin: 6px 0 2px; } .kpi .sub { color: #777; font-size: 13px; }
main { overflow-x: clip; }
.panel { background: #fff; border-radius: 16px; border: 1px solid var(--line); padding: 16px 18px; margin-bottom: 18px; overflow-x: auto; }
.panel h2 { margin: 0 0 12px; font-size: 18px; display: flex; justify-content: space-between; align-items: center; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12px; text-transform: uppercase; color: #777; padding: 8px 10px; border-bottom: 2px solid var(--line); letter-spacing: .3px; }
td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; white-space: nowrap; }
.thumb { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; background: #eee; vertical-align: middle; }
.pill { display: inline-block; padding: 3px 9px; border-radius: 20px; font-size: 12px; font-weight: 700; background: #eee; white-space: nowrap; }
.pill.ok, .pill.completed, .pill.resolved, .pill.online { background: #e5f4d2; color: #3f6e0c; }
.pill.warning, .pill.partial, .pill.acknowledged, .pill.low { background: #fff1cc; color: #8a6200; }
.pill.critical, .pill.failed, .pill.open, .pill.offline, .pill.sold_out { background: #fde2e2; color: #a12b2b; }
.pill.info, .pill.card { background: #e3eefa; color: #24578a; } .pill.cash { background: #eef1ea; color: #4b5a3a; }
.pill.preview { background: #efe7fb; color: #5b3a99; } .pill.seed { background: #eee; color: #666; } .pill.agent { background: #e3eefa; color: #24578a; }
.bar { height: 8px; background: #eceee8; border-radius: 6px; overflow: hidden; min-width: 90px; }
.bar div { height: 100%; background: var(--lime); } .bar.low div { background: var(--amber); } .bar.zero div { background: var(--red); }
.btn { display: inline-block; background: var(--lime); color: #fff; border: 0; border-radius: 10px; padding: 8px 14px; font-weight: 700; cursor: pointer; font-size: 14px; font-family: inherit; }
.btn:hover { background: var(--lime-d); text-decoration: none; }
.btn.sec { background: #fff; color: var(--ink); border: 1px solid #ccc; } .btn.sm { padding: 5px 10px; font-size: 13px; }
.btn.dark { background: var(--ink); }
form.inline { display: inline; }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
.form label { display: flex; flex-direction: column; gap: 5px; font-weight: 600; font-size: 14px; }
.form .full { grid-column: 1 / -1; }
input, select, textarea { font: inherit; padding: 8px 10px; border: 1px solid #ccd2c6; border-radius: 8px; background: #fff; }
textarea { min-height: 70px; }
input.small { width: 74px; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.muted { color: #777; font-size: 13px; }
.filters { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.filters a { padding: 6px 12px; border-radius: 20px; background: #fff; border: 1px solid var(--line); color: var(--ink); font-weight: 600; font-size: 13px; }
.filters a.on { background: var(--ink); color: #fff; }
.start { max-width: 760px; margin: 8vh auto; background: #fff; border-radius: 22px; padding: 40px; text-align: center; border: 1px solid var(--line); }
.start img { width: 300px; } .start .btns { display: flex; gap: 16px; justify-content: center; margin-top: 24px; } .start .btn { font-size: 18px; padding: 14px 24px; }
@media (max-width: 900px) { .layout { grid-template-columns: 1fr; } .cards { grid-template-columns: 1fr 1fr; } .two, .form { grid-template-columns: 1fr; } }
/* v2 additions */
.userbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; margin-bottom: 8px; font-size: 14px; }
.userbar .who { color: #555; } .acct-name { font-weight: 700; }
.acct-switch select { font-weight: 700; border: 2px solid var(--lime); }
.menu-btn { display: none; background: var(--ink); color: #fff; border: 0; border-radius: 8px; padding: 6px 12px; font-size: 18px; margin-right: auto; }
.flash { background: #e5f4d2; border: 1px solid #b9dc8a; padding: 10px 14px; border-radius: 10px; margin-bottom: 14px; font-weight: 600; }
.flash.err { background: #fde2e2; border-color: #f1a9a9; color: #8a1f1f; }
.btn.danger { background: var(--red); } .btn[disabled] { opacity: .45; cursor: default; }
.media-list { display: flex; gap: 14px; flex-wrap: wrap; }
.media-item { width: 190px; background: #fafbf8; border: 1px solid var(--line); border-radius: 12px; padding: 8px; display: flex; flex-direction: column; gap: 6px; position: relative; }
.media-item img, .media-item video { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; background: #eee; }
.media-n { position: absolute; top: 12px; left: 12px; background: var(--ink); color: #fff; border-radius: 50%; width: 26px; height: 26px; text-align: center; line-height: 26px; font-weight: 800; }
.ad-thumb { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; background: #222; }
.sku-box { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; display: flex; flex-direction: column; gap: 8px; }
.sku-box legend { font-weight: 700; } label.radio { flex-direction: row !important; align-items: center; gap: 8px; font-weight: 600; flex-wrap: wrap; }
input.ro { background: #f1f3ee; color: #777; } input.bad { border-color: var(--red); background: #fff5f5; }
.bigcode { font-size: 42px; font-weight: 900; letter-spacing: 6px; font-family: monospace; margin-top: 6px; }
table.matrix td.c, table.matrix th.c { text-align: center; font-size: 12px; } table.matrix td { padding: 6px; }
ul.log { margin: 6px 0 0; padding-left: 18px; font-size: 13px; } details summary { cursor: pointer; }
.login-body { background: linear-gradient(160deg, #303030, #4a4a4a); min-height: 100vh; padding-top: 1px; }
.demo-ribbon { background: #ffcc00; color: #303030; font-weight: 900; text-align: center; padding: 8px; letter-spacing: 2px; }
.start.login { max-width: 460px; margin: 6vh auto; } .start.login img { width: 220px; }
.login-form { display: flex; flex-direction: column; gap: 14px; text-align: left; } .login-form label { display: flex; flex-direction: column; gap: 6px; font-weight: 700; }
.login-form .btn { font-size: 18px; padding: 12px; }
@media (max-width: 900px) {
  .menu-btn { display: inline-block; }
  nav.side { display: flex; flex-direction: column; position: fixed; top: 0; left: 0; bottom: 0; width: min(86vw, 320px); z-index: 300; overflow-y: auto;
    transform: translateX(-105%); transition: transform .2s ease; padding-top: calc(14px + env(safe-area-inset-top)); padding-bottom: calc(14px + env(safe-area-inset-bottom)); box-shadow: 4px 0 24px rgba(0,0,0,.35); }
  nav.side.open { transform: none; }
  .nav-backdrop.open { display: block; } .side-close { display: inline-flex !important; }
  body.nav-open { overflow: hidden; }
  main { padding: 12px 12px 40px; } header.top h1 { font-size: 21px; }
  .cards { grid-template-columns: 1fr 1fr; gap: 10px; } .kpi .val { font-size: 24px; }
  .userbar .who { display: none; } table { font-size: 13px; } td, th { padding: 6px; }
  .media-item { width: 46%; }
}
.nbadge { background: var(--red); color: #fff; border-radius: 12px; padding: 1px 7px; font-size: 12px; font-weight: 800; margin-left: 4px; }
.bell { position: relative; font-size: 20px; text-decoration: none !important; } .bell .nbadge { position: absolute; top: -6px; right: -12px; }
.alert-list { display: flex; flex-direction: column; gap: 10px; }
.alert-item { display: flex; gap: 12px; background: #fff; border: 1px solid var(--line); border-left: 6px solid var(--amber); border-radius: 12px; padding: 12px 14px; color: var(--ink); }
.alert-item.critical { border-left-color: var(--red); } .alert-item.info { border-left-color: var(--blue); } .alert-item:hover { text-decoration: none; background: #fafbf8; }
.aic { font-size: 26px; }
/* v3: remote commands on the machine page (big tap targets, mobile first) */
.rc-panel h2 { justify-content: flex-start; gap: 10px; }
.rc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.rc-card { min-width: 0; border: 1px solid var(--line); border-radius: 16px; padding: 12px; background: #fafbf8; display: flex; flex-direction: column; gap: 10px; }
.rc-btn { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 84px; padding: 14px 16px; border: 0; border-radius: 14px; background: var(--lime); color: #fff;
  font: inherit; text-align: left; cursor: pointer; box-shadow: 0 3px 0 var(--lime-d); position: relative; }
.rc-btn:active { transform: translateY(2px); box-shadow: none; }
.rc-btn.warn { background: var(--ink); box-shadow: 0 3px 0 #111; }
.rc-btn[disabled] { background: #c9cfc4; box-shadow: none; cursor: not-allowed; }
.rc-ico { font-size: 34px; line-height: 1; flex: none; width: 44px; text-align: center; }
.rc-txt { display: flex; flex-direction: column; gap: 3px; }
.rc-lbl { font-size: 19px; font-weight: 800; } .rc-desc { font-size: 13px; opacity: .9; }
.rc-tag { position: absolute; top: 6px; right: 8px; font-size: 11px; }
.rc-btn:has(.rc-tag) { padding-top: 30px; }
.rc-pick { display: flex; flex-direction: column; gap: 4px; font-weight: 700; font-size: 13px; }
.rc-pick select { min-height: 48px; font-size: 16px; width: 100%; max-width: 100%; }
.rc-status { min-height: 30px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.rc-time { color: #555; font-size: 13px; font-variant-numeric: tabular-nums; }
.rc-res { width: 100%; font-size: 13px; color: #444; }
.pill.big { font-size: 14px; padding: 6px 12px; }
.spin { display: inline-block; width: 12px; height: 12px; border: 2px solid currentColor; border-top-color: transparent; border-radius: 50%; animation: rcspin .8s linear infinite; vertical-align: -1px; }
@keyframes rcspin { to { transform: rotate(360deg); } }
.rc-note { margin: 12px 0 6px; }
.rc-log { margin-top: 8px; } .rc-log summary { padding: 8px 0; }
.rc-table { overflow-x: auto; }
.rc-modal { position: fixed; inset: 0; background: rgba(20,20,20,.6); z-index: 200; display: flex; align-items: center; justify-content: center; padding: 16px; }
.rc-modal[hidden] { display: none; }
.rc-sheet { background: #fff; border-radius: 22px; padding: 22px; width: min(440px, 100%); text-align: center; display: flex; flex-direction: column; gap: 6px; box-shadow: 0 10px 40px rgba(0,0,0,.35); }
.rc-sheet h3 { margin: 0; font-size: 24px; } .rc-m-ico { font-size: 48px; } .rc-m-sub { font-weight: 700; color: #555; }
.rc-m-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 8px; }
.btn.big { font-size: 18px; padding: 16px 18px; min-height: 56px; }
.np-list { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.np-thumbs { display: flex; gap: 8px; flex-wrap: wrap; } .np-thumbs img, .np-thumbs video { width: 96px; height: 54px; object-fit: cover; border-radius: 8px; background: #222; }
@media (max-width: 900px) {
  .rc-grid { grid-template-columns: minmax(0, 1fr); }
  .rc-panel { overflow-x: visible; }
  .rc-btn { min-height: 76px; }
  .rc-modal { align-items: flex-end; padding: 0; }
  .rc-sheet { border-radius: 22px 22px 0 0; padding-bottom: calc(22px + env(safe-area-inset-bottom)); }
}
/* v3: media library */
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.lib-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.lib-prev { position: relative; padding: 0; border: 0; border-radius: 10px; overflow: hidden; background: #222; cursor: zoom-in; aspect-ratio: 16 / 9; }
.lib-prev img, .lib-prev video { width: 100%; height: 100%; object-fit: cover; display: block; }
.lib-play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 30px; text-shadow: 0 0 8px #000; pointer-events: none; }
.lib-meta { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.lib-rename input { width: 100%; } .lib-actions { display: flex; gap: 6px; justify-content: space-between; }
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.85); z-index: 200; display: flex; align-items: center; justify-content: center; padding: 20px; }
.lightbox[hidden] { display: none; }
.lb-inner { max-width: 1000px; width: 100%; display: flex; flex-direction: column; gap: 10px; }
.lb-media img, .lb-media video { width: 100%; max-height: 78vh; object-fit: contain; background: #000; border-radius: 12px; display: block; }
.lb-bar { display: flex; justify-content: space-between; align-items: center; color: #fff; gap: 10px; }
/* v3: campaigns */
.camp-list { display: flex; flex-direction: column; gap: 12px; }
.camp-card { background: #fff; border: 1px solid var(--line); border-left: 6px solid var(--lime); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.camp-card.st-scheduled { border-left-color: var(--blue); } .camp-card.st-paused { border-left-color: var(--amber); } .camp-card.st-expired { border-left-color: #aaa; opacity: .8; }
.camp-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; } .camp-name { font-size: 17px; }
.camp-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 14px; align-items: start; }
.camp-thumbs { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.camp-thumbs img, .camp-thumbs video { width: 84px; height: 48px; object-fit: cover; border-radius: 6px; background: #222; }
.camp-info { display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.camp-actions { display: flex; gap: 8px; flex-wrap: wrap; }
fieldset.seg { border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px 12px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
fieldset.seg legend { font-weight: 700; font-size: 14px; padding: 0 4px; }
.seg-opt { flex-direction: row !important; gap: 0 !important; font-weight: 600; }
.seg-opt input { position: absolute; opacity: 0; pointer-events: none; }
.seg-opt span { display: inline-block; padding: 10px 14px; border-radius: 22px; border: 2px solid #ccd2c6; background: #fff; cursor: pointer; min-height: 44px; }
.seg-opt input:checked + span { background: var(--ink); color: #fff; border-color: var(--ink); }
.seg-opt input:focus-visible + span { outline: 3px solid var(--lime); }
.seg-opt.day span { min-width: 56px; text-align: center; }
.hsel { flex-direction: row !important; align-items: center; gap: 6px !important; } .hsel select { min-height: 44px; }
.pv-frame { position: relative; aspect-ratio: 16 / 9; background: #111; border-radius: 12px; overflow: hidden; }
.pv-media img, .pv-media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pv-tag { position: absolute; top: 8px; right: 8px; background: rgba(0,0,0,.6); color: #fff; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 8px; }
.pl-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.pl-item { display: grid; grid-template-columns: 26px 80px minmax(0, 1fr) auto auto; gap: 10px; align-items: center; background: #fafbf8; border: 1px solid var(--line); border-radius: 10px; padding: 6px 8px; }
.pl-item img, .pl-item video { width: 80px; height: 45px; object-fit: cover; border-radius: 6px; background: #222; }
.pl-n { width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; font-size: 13px; }
.pl-name { display: flex; flex-direction: column; font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; }
.pl-dur { display: flex; align-items: center; gap: 4px; font-size: 13px; } .pl-dur input { width: 62px; }
.pl-btns { display: flex; gap: 4px; }
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; max-height: 520px; overflow-y: auto; }
.pick { position: relative; padding: 0; border: 2px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; cursor: copy; display: flex; flex-direction: column; text-align: left; font: inherit; }
.pick:hover { border-color: var(--lime); }
.pick img, .pick video { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; background: #222; }
.pick .lib-play { bottom: 24px; }
.pick-name { font-size: 12px; padding: 4px 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pick-add { position: absolute; top: 6px; right: 6px; width: 30px; height: 30px; border-radius: 50%; background: var(--lime); color: #fff; font-weight: 900; font-size: 20px; display: flex; align-items: center; justify-content: center; }
.sticky-save { position: static; bottom: 0; background: rgba(243,245,240,.95); padding: 12px 0; display: flex; gap: 10px; border-top: 1px solid var(--line); z-index: 5; }
@media (max-width: 900px) { .sticky-save { position: sticky; } .camp-body { grid-template-columns: 1fr; } .pl-item { grid-template-columns: 26px 64px minmax(0, 1fr); } .pl-item img, .pl-item video { width: 64px; height: 36px; } .pl-dur, .pl-btns { grid-column: 2 / -1; } }
/* v3: branding */
.brand-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; align-items: start; }
.brand-logo-row { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.logo-box { width: 200px; height: 80px; border: 1px dashed #bbb; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: #fff; padding: 8px; }
.logo-box img { max-width: 100%; max-height: 100%; object-fit: contain; }
.colrow .colpick { display: flex; gap: 8px; align-items: center; }
.colpick input[type=color] { width: 54px; height: 44px; padding: 2px; cursor: pointer; } .colpick input[name] { width: 120px; font-family: monospace; }
.swatch { display: inline-block; width: 22px; height: 22px; border-radius: 6px; border: 1px solid #ccc; vertical-align: middle; }
.kp { --p: #80C020; --a: #303030; --b: #F4F6F2; --on-p: #fff; --on-a: #fff; width: 100%; max-width: 330px; aspect-ratio: 9 / 16; margin: 0 auto; border: 8px solid #1d1d1d; border-radius: 22px;
  overflow: hidden; background: var(--b); display: flex; flex-direction: column; font-size: 11px; position: relative; box-shadow: 0 8px 24px rgba(0,0,0,.25); }
.kp-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(72px, 38%); align-items: stretch; flex: none; background: #fff; border-bottom: 3px solid var(--p); }
.kp-pip { position: relative; aspect-ratio: 16 / 9; background: var(--a); overflow: hidden; min-height: 0; max-height: 120px; }
.kp-pip img, .kp-pip video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.kp-ad { position: absolute; top: 4px; left: 4px; background: rgba(0,0,0,.55); color: #fff; font-size: 9px; padding: 1px 5px; border-radius: 5px; }
.kp-side { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 4px 6px; min-width: 0; }
.kp-bar { display: flex; align-items: center; gap: 6px; padding: 6px 8px; background: #fff; border-bottom: 2px solid #e3e6df; }
.kp-bar img { height: 24px; max-width: 90px; object-fit: contain; }
.kp-help { display: flex; flex-direction: column; align-items: center; line-height: 1.15; color: #444; text-align: center; width: 100%; }
.kp-help .kp-phone, .kp-help #kp-phone { font-size: 11px; font-weight: 900; color: #222; }
.kp-help small { color: #777; font-size: 8px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kp-lang { display: flex; flex-wrap: wrap; gap: 3px; justify-content: center; } .kp-lang span { border: 1px solid #ccc; border-radius: 10px; padding: 1px 5px; font-weight: 700; } .kp-lang .on { background: var(--p); color: var(--on-p); border-color: var(--p); }
.kp-cats { display: flex; gap: 4px; padding: 6px 8px; background: #fff; } .kp-cats span { padding: 3px 8px; border-radius: 12px; background: #eef1ea; font-weight: 700; } .kp-cats .on { background: var(--a); color: var(--on-a); }
.kp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 8px; flex: 1; overflow: hidden; align-content: start; }
.kp-card { background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,.08); } .kp-card img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.kp-row { display: flex; justify-content: space-between; align-items: center; padding: 3px 5px; }
.kp-add { width: 18px; height: 18px; border-radius: 50%; background: var(--p); color: var(--on-p); display: flex; align-items: center; justify-content: center; font-weight: 900; }
.kp-cart { display: flex; justify-content: space-between; align-items: center; background: var(--a); color: var(--on-a); padding: 8px; font-weight: 700; }
.kp-btn { background: var(--p); color: var(--on-p); padding: 4px 10px; border-radius: 8px; }
@media (max-width: 1100px) { .brand-wrap { grid-template-columns: 1fr; } }

/* v4 (round 3): collapsible tree navigation (desktop sidebar + mobile off-canvas drawer) */
nav.side { overflow-y: auto; max-height: 100vh; position: sticky; top: 0; }
@media (max-width: 900px) { nav.side { position: fixed; max-height: none; } }
.side-head { display: flex; align-items: center; justify-content: space-between; }
.side-head img { width: 170px; margin: 0 8px 14px; }
.side-close { display: none; background: transparent; color: #ddd; border: 1px solid #555; border-radius: 10px; width: 40px; height: 40px; align-items: center; justify-content: center; font-size: 18px; }
.nav-backdrop { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 290; }
nav.side .ni { width: 22px; text-align: center; flex: none; }
nav.side details.nav-grp { border-radius: 10px; }
nav.side details.nav-grp > summary { list-style: none; color: #eee; padding: 10px 12px; border-radius: 10px; display: flex; gap: 10px; align-items: center; font-weight: 700; cursor: pointer; min-height: 44px; user-select: none; }
nav.side details.nav-grp > summary::-webkit-details-marker { display: none; }
nav.side details.nav-grp > summary:hover { background: #3d3d3d; }
nav.side .chev { margin-left: auto; width: 8px; height: 8px; border-right: 2px solid #aaa; border-bottom: 2px solid #aaa; transform: rotate(-45deg); transition: transform .15s; }
nav.side details[open] > summary .chev { transform: rotate(45deg); }
nav.side details[open] > summary { color: #fff; }
nav.side details.nav-grp > a { margin-left: 22px; padding: 8px 12px 8px 14px; border-left: 2px solid #4a4a4a; border-radius: 0 10px 10px 0; font-weight: 600; font-size: 14px; min-height: 40px; }
nav.side details.nav-grp > a.on { border-left-color: var(--lime); }
nav.side a:has(.nsub) { flex-wrap: wrap; row-gap: 0; }
nav.side .nsub { flex-basis: 100%; display: block; font-size: 11px; color: #aaa; font-weight: 500; margin: 1px 0 0; white-space: normal; }
nav.side a.on .nsub { color: #f4f4f4; }
.ui-lang { display: inline-flex; align-items: center; gap: 6px; border: 1px solid #ccc; border-radius: 20px; padding: 2px 6px 2px 4px; background: #fff; }
.ui-lang select { border: 0; background: transparent; font-weight: 700; font-size: 13px; padding: 4px 2px; min-height: 30px; }
.flag-sm { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 1px rgba(0,0,0,.15); }
.flag-md { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 1px rgba(0,0,0,.15); vertical-align: middle; }
/* v4: campaign machine picker */
.mpick { display: flex; flex-direction: column; gap: 10px; }
.mpick-all { display: flex !important; flex-direction: row !important; align-items: center; gap: 10px !important; padding: 10px 12px; border: 2px solid var(--lime); border-radius: 12px; background: #f6fbef; font-weight: 700; cursor: pointer; }
.mpick-all input, .mpick-item input { width: 22px; height: 22px; accent-color: var(--lime); flex: none; }
.mpick-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.mpick-item { display: flex !important; flex-direction: row !important; align-items: center; gap: 10px !important; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; min-height: 52px; }
.mpick-item:has(input:checked) { border-color: var(--ink); background: #f1f3ee; }
.mpick-item small { display: block; color: #777; font-weight: 500; }
.mpick.all-on .mpick-list { opacity: .45; pointer-events: none; }
.mpick-tools { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
/* v4: languages, translations */
.lang-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.lang-opt { display: flex !important; flex-direction: row !important; align-items: center; gap: 10px !important; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.lang-opt input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--lime); }
.lang-opt.on { border-color: var(--ink); background: #f1f3ee; }
.lang-opt .prim { margin-left: auto; font-size: 12px; display: flex; align-items: center; gap: 4px; font-weight: 600; }
.tr-block { border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: #fff; display: grid; gap: 10px; }
.tr-block.primary { border: 2px solid var(--lime); background: #fbfdf8; }
.tr-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-weight: 800; }
.tr-head .btn { margin-left: auto; }
.mt-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; color: #7a4b00; background: #fff1d6; border: 1px solid #f0c674; border-radius: 10px; padding: 1px 7px; }
.mt-badge[hidden] { display: none; }
.tr-refresh.linkish { margin-left: 8px; font-size: 12px; font-weight: 600; background: none; border: none; color: var(--accent, #2a6f97); cursor: pointer; padding: 0; text-decoration: underline; }
.tr-refresh[hidden] { display: none; }
.tr-field .lbl { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.tr-grid { display: grid; gap: 14px; }
.tr-field { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: 14px; }
.tr-field .lbl { display: flex; align-items: center; gap: 6px; }
/* v4: payment methods */
.pay-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 14px; }
.pay-card { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; background: #fff; display: flex; flex-direction: column; gap: 10px; }
.pay-card.on { border-left: 6px solid var(--lime); }
.pay-card.off { opacity: .75; border-left: 6px solid #bbb; }
.pay-head { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 16px; }
.pay-head .sw { margin-left: auto; display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; }
.pay-head .sw input { width: 22px; height: 22px; accent-color: var(--lime); }
.pay-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px 10px; }
.pay-fields > * { min-width: 0; }
.pay-fields input, .pay-fields select { width: 100%; min-width: 0; box-sizing: border-box; }
.pay-fields > div.full { grid-column: 1 / -1; }
.pay-card { min-width: 0; }
.pay-fields label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; }
.pay-fields label.full { grid-column: 1 / -1; }
.pay-st { font-size: 12px; font-weight: 800; border-radius: 10px; padding: 3px 9px; display: inline-block; }
.pay-st.jar { background: #e3f4d0; color: #2f5a00; border: 1px solid #a9d77a; }
.pay-st.partial { background: #fff1d6; color: #7a4b00; border: 1px solid #f0c674; }
.pay-st.unconfirmed { background: #fde2e2; color: #8a1010; border: 1px solid #f1a5a5; }
.pay-methods { font-size: 12px; color: #555; font-family: ui-monospace, monospace; background: #f6f7f4; border-radius: 8px; padding: 6px 8px; }
.pay-sum { display: flex; gap: 6px; flex-wrap: wrap; }
@media (max-width: 600px) { .pay-fields { grid-template-columns: 1fr; } }
/* v4: machines assign */
.assign-form { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.assign-form select { min-width: 150px; }
.pill.unassigned { background: #eee; color: #555; border: 1px dashed #999; }

/* ---- UX fix pack (v9): responsive cards, tabs, sticky actions, banners ---- */
.panel { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.panel.no-xscroll { overflow-x: visible; }
a.row-link { color: inherit; font-weight: 800; }
a.row-link:hover { color: var(--lime-d); text-decoration: underline; }

/* Sticky action column on wide tables (desktop) */
@media (min-width: 701px) {
  table.sticky-actions { border-collapse: separate; border-spacing: 0; }
  table.sticky-actions th.col-actions, table.sticky-actions td.col-actions,
  table.sticky-actions th.row-actions, table.sticky-actions td.row-actions {
    position: sticky; right: 0; background: #fff; box-shadow: -6px 0 10px -8px rgba(0,0,0,.28); z-index: 2;
  }
  table.sticky-actions thead th.col-actions, table.sticky-actions thead th.row-actions { z-index: 3; background: #fff; }
}

/* Grouped customers list (master): client header + nested stores */
.cl-list-panel .cl-group { margin-bottom: 18px; }
.cl-list-panel .cl-group:last-child { margin-bottom: 0; }
.cl-group-title { font-size: 15px; font-weight: 800; margin: 0 0 10px; color: var(--ink); }
.cl-badge { display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .2px; padding: 3px 9px; border-radius: 8px; line-height: 1.2; }
.cl-badge-client { background: #1a3d5c; color: #fff; }
.cl-badge-store { background: #eef6d8; color: #243a14; border: 1px solid #b5c98a; }
.cl-group-table tbody tr.cl-card-nested { position: relative; }
@media (max-width: 700px) {
  .cl-group-table tr.cl-card-nested { margin-left: 12px; width: calc(100% - 12px); border-left: 3px solid var(--brand, #C4D600); border-radius: 0 14px 14px 0; }
}
@media (min-width: 701px) {
  .cl-group-table tr.cl-card-nested td.card-title { padding-left: 18px; border-left: 3px solid var(--brand, #C4D600); }
}

/* Phone card layout for list tables */
@media (max-width: 700px) {
  .panel:has(table.cards-phone) { overflow-x: visible; padding: 10px 10px; }
  table.cards-phone { width: 100%; }
  table.cards-phone thead { display: none; }
  table.cards-phone th { display: none !important; }
  table.cards-phone, table.cards-phone tbody { display: block; width: 100%; }
  table.cards-phone tr {
    display: block; width: 100%; margin: 0 0 12px; padding: 12px 12px 10px;
    border: 1px solid var(--line); border-radius: 14px; background: #fff;
    box-shadow: 0 1px 2px rgba(0,0,0,.04);
  }
  table.cards-phone tr:last-child { margin-bottom: 0; }
  table.cards-phone td {
    display: grid; grid-template-columns: minmax(88px, 38%) 1fr; gap: 6px 10px;
    width: 100%; padding: 5px 0; border-bottom: 1px dashed #eef1ea; white-space: normal;
  }
  table.cards-phone td:last-child { border-bottom: 0; }
  table.cards-phone td::before {
    content: attr(data-l); font-size: 11px; font-weight: 800; letter-spacing: .3px;
    text-transform: uppercase; color: #777; padding-top: 3px;
  }
  table.cards-phone td.bill-masters::before { text-transform: none; letter-spacing: 0; }
  table.cards-phone td.card-title {
    display: block; border-bottom: 1px solid var(--line); padding-bottom: 8px; margin-bottom: 4px;
  }
  table.cards-phone td.card-title::before { display: none; }
  table.cards-phone td.card-title .card-title-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 16px; }
  table.cards-phone td.col-actions, table.cards-phone td.row-actions {
    display: flex; flex-wrap: wrap; gap: 8px; grid-template-columns: none; margin-top: 8px; padding-top: 8px;
    border-top: 1px solid var(--line); border-bottom: 0;
  }
  table.cards-phone td.col-actions::before, table.cards-phone td.row-actions::before { display: none; }
  table.cards-phone td.col-actions .btn, table.cards-phone td.row-actions .btn,
  table.cards-phone td.col-actions form, table.cards-phone td.row-actions form { flex: 1 1 auto; min-width: 44%; }
  table.cards-phone td.col-actions .btn, table.cards-phone td.row-actions .btn { width: 100%; min-height: 44px; text-align: center; }
  table.cards-phone .bar { min-width: 0; width: 100%; }
  .assign-form { width: 100%; }
  .assign-form select { min-width: 0; flex: 1; width: 100%; }
}

/* Machine detail tabs */
.mtabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 14px; position: sticky; top: 0; z-index: 40;
  background: rgba(243,245,240,.96); padding: 8px 0; border-bottom: 1px solid var(--line); backdrop-filter: blur(6px); }
.mtab { appearance: none; border: 1px solid #ccd2c6; background: #fff; color: var(--ink); font: inherit; font-weight: 700;
  padding: 10px 14px; border-radius: 22px; cursor: pointer; min-height: 44px; }
.mtab.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.mtab-panel[hidden] { display: none !important; }
.machine-head .row-actions { margin-top: 10px; }

/* Viewing-as banner (master scoped to a customer) */
.viewing-as { background: #fff3bf; border: 1px solid #e6c84a; color: #5a4700; padding: 10px 14px; border-radius: 10px;
  margin: 0 0 14px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; font-weight: 700; }
.viewing-as a { margin-left: auto; }

/* Shared confirm dialog (reuse rc-modal look) */
.srx-confirm-msg { white-space: pre-wrap; text-align: left; font-size: 15px; line-height: 1.45; margin: 8px 0 4px; color: #333; }
.field-err { color: var(--red); font-size: 13px; font-weight: 600; margin-top: 4px; }
.req::after { content: " *"; color: var(--red); font-weight: 800; }
details.advanced { border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; background: #fafbf8; }
details.advanced > summary { cursor: pointer; font-weight: 700; padding: 6px 0; }
.pay-summary { display: flex; flex-wrap: wrap; gap: 8px; font-size: 15px; }
.pay-summary .pill { font-size: 13px; }
.next-steps { background: #eef7e3; border: 1px solid #b9dc8a; border-radius: 12px; padding: 14px; margin-bottom: 14px; }
.next-steps h3 { margin: 0 0 8px; font-size: 16px; }
.next-steps .row-actions { margin-top: 8px; }
.sales-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 14px; }
@media (max-width: 700px) { .sales-kpis { grid-template-columns: 1fr; } .mtabs { top: 0; } }

@media (max-width: 700px) {
  table.cards-phone td { overflow-wrap: anywhere; word-break: break-word; min-width: 0; }
  table.cards-phone td > * { min-width: 0; max-width: 100%; }
  table.matrix { display: block; overflow: visible; }
  table.matrix thead { display: none; }
  table.matrix, table.matrix tbody, table.matrix tr, table.matrix td, table.matrix th { display: block; width: 100%; }
  table.matrix tr { border: 1px solid var(--line); border-radius: 10px; padding: 8px; margin-bottom: 8px; }
  table.matrix td.c { text-align: left !important; }
  table.matrix td.c::before { content: attr(data-role); font-weight: 700; margin-right: 8px; color: #777; font-size: 12px; }
  .hw-col, td.hw-col { display: none !important; }
}

@media (max-width: 700px) {
  table.cards-phone { max-width: 100%; }
  table.cards-phone tr, table.cards-phone td { max-width: 100%; }
  .panel { max-width: 100%; }
}

@media (max-width: 700px) {
  .panel.no-xscroll, .panel:has(table.cards-phone) { overflow-x: hidden !important; }
  table.cards-phone { table-layout: fixed; }
}
@media (min-width: 701px) {
  .panel:has(table.sticky-actions) { overflow-x: auto; }
  table.sticky-actions { width: max(100%, max-content); }
}

@media (max-width: 700px) {
  .pay-summary { flex-direction: column; align-items: stretch; }
  .pay-summary .pill { white-space: normal; }
}
/* desktop machines: drop low-value cols visually via class */
@media (min-width: 701px) and (max-width: 1500px) {
  table.machines-list .col-type, table.machines-list .col-role, table.machines-list .col-pay { display: none; }
}

/* v15 planogram + machine photos */
.m-thumb { width: 48px; height: 48px; object-fit: contain; object-position: center; border-radius: 6px; margin-right: 8px; vertical-align: middle; background: #f4f6f2; box-shadow: 0 0 0 1px rgba(0,0,0,.08); }
.machine-photo-panel .mph-row { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.mph-img { width: 220px; max-width: 100%; height: 160px; object-fit: contain; object-position: center; border-radius: 12px; background: #eef1ea; box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.mph-meta { flex: 1; min-width: 180px; }
.planogram { display: flex; flex-direction: column; gap: 10px; }
.pg-shelf { background: #eef1ea; border-radius: 12px; padding: 8px; }
.pg-shelf-label { font-weight: 800; font-size: 13px; margin-bottom: 6px; color: #303030; }
.pg-motors { display: flex; flex-wrap: wrap; gap: 6px; }
.pg-slot {
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  gap: 2px; padding: 6px 4px; min-height: 110px; background: #fff; border: 2px solid #d5dbd0;
  border-radius: 10px; cursor: pointer; text-align: center; font: inherit; color: inherit;
}
.pg-slot img { width: 48px; height: 48px; object-fit: cover; border-radius: 8px; }
.pg-slot .pg-empty { width: 48px; height: 48px; border-radius: 8px; background: #f4f6f2; display: flex; align-items: center; justify-content: center; font-size: 22px; color: #aaa; }
.pg-slot .pg-code { font-size: 11px; font-weight: 800; }
.pg-slot .pg-name { font-size: 11px; line-height: 1.2; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pg-slot .pg-type { font-size: 10px; color: #777; }
.pg-slot .pg-stock { font-size: 11px; font-weight: 700; }
.pg-slot.linked { border-color: #80C020; background: #f4faea; }
.pg-slot.empty { border-style: dashed; }
.pg-slot.low { border-color: #e0a000; }
.pg-slot:hover { border-color: #80C020; }
.pg-flash { outline: 3px solid #80C020; outline-offset: 2px; }
.link-form { margin-top: 14px; border-top: 1px dashed #ccd3c6; padding-top: 12px; }
@media (max-width: 420px) {
  .mph-img { width: 100%; height: 140px; }
  .pg-slot { min-width: 72px; min-height: 100px; }
  .pg-slot img, .pg-slot .pg-empty { width: 40px; height: 40px; }
}

/* el-17 planogram select + lanes overflow */
.pg-slot.pg-selected { border-color: #1565c0; background: #e3f2fd; box-shadow: 0 0 0 2px rgba(21,101,192,.35); }
.pg-slot .pg-unlink { margin-top: 4px; }
.pg-slot .pg-unlink .btn { font-size: 11px; padding: 4px 8px; min-height: 0; }
.link-sel-label { margin: 6px 0 10px; font-size: 14px; }
.panel.lanes-panel { overflow-x: hidden; max-width: 100%; }
.panel.lanes-panel table.cards-phone { width: 100%; table-layout: fixed; }
.panel.lanes-panel table.cards-phone th,
.panel.lanes-panel table.cards-phone td { overflow: hidden; vertical-align: top; }
.panel.lanes-panel table.cards-phone select,
.panel.lanes-panel table.cards-phone input.small,
.panel.lanes-panel table.cards-phone input[type=number] {
  max-width: 100%; width: 100%; box-sizing: border-box; min-width: 0;
}
@media (min-width: 1100px) {
  .panel.lanes-panel table.cards-phone { font-size: 13px; }
  .panel.lanes-panel table.cards-phone .col-actions { width: 140px; }
}
/* notification prefs */
.notif-grid { display: grid; gap: 8px; margin: 10px 0; }
.notif-row { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; padding: 8px 10px; background: #f7f8f5; border-radius: 10px; }
.notif-row label { margin: 0; font-weight: 600; }
.notif-row .ch { display: flex; gap: 6px; align-items: center; font-size: 13px; white-space: nowrap; }
@media (max-width: 700px) {
  .notif-row { grid-template-columns: 1fr; }
}

/* ===== el-18 UX P3 ===== */
.first-steps .fs-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.first-steps .fs-list li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: #f7f8f5; border-radius: 12px; min-height: 44px; }
.first-steps .fs-list li.done { opacity: .7; }
.first-steps .fs-check { font-weight: 800; width: 22px; text-align: center; }
.first-steps .fs-label { flex: 1; font-weight: 600; }
.empty-state { text-align: center; padding: 28px 16px !important; }
.empty-state p { margin: 0 0 12px; color: #666; font-weight: 600; }
.empty-state .btn { min-height: 44px; }

/* Compact phone header: one row */
.userbar { display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; justify-content: flex-end; margin-bottom: 8px; font-size: 14px; }
.userbar .ub-mid { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; margin-right: auto; }
.userbar .acct-name, .userbar .acct-switch select { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.userbar .ub-avatar { position: relative; }
.userbar .ub-sum { list-style: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%; background: #f0f2ec; border: 1px solid var(--line); }
.userbar .ub-sum::-webkit-details-marker { display: none; }
.userbar .ub-av { font-size: 18px; }
.userbar .ub-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 80; background: #fff; border: 1px solid var(--line);
  border-radius: 14px; padding: 12px; min-width: 220px; display: flex; flex-direction: column; gap: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.12); }
.userbar .ub-who { display: flex; flex-direction: column; gap: 2px; }
.userbar .desk-who, .userbar .desk-lang, .userbar .desk-logout { display: none; }
.userbar .desk-demo { display: none; }
.bell { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; }

@media (min-width: 901px) {
  .userbar { flex-wrap: wrap; }
  .userbar .ub-avatar { display: none; }
  .userbar .desk-who, .userbar .desk-lang, .userbar .desk-logout, .userbar .desk-demo { display: inline-flex; align-items: center; }
  .userbar .who { display: inline; }
  .menu-btn { display: none; }
}

/* Touch targets at phone width */
@media (max-width: 700px) {
  .btn, .btn.sm, a.btn, button.btn { min-height: 44px; min-width: 44px; padding: 10px 14px; box-sizing: border-box; }
  .btn.sm { padding: 10px 12px; font-size: 14px; }
  .menu-btn { min-width: 44px; min-height: 44px; padding: 0; display: inline-flex; align-items: center; justify-content: center; }
  .side-close { min-width: 44px; min-height: 44px; }
  table a.row-link { display: inline-flex; align-items: center; min-height: 44px; padding: 4px 0; }
  .filters a { min-height: 44px; display: inline-flex; align-items: center; padding: 10px 14px; }
  td.col-actions .btn, td.row-actions .btn, .lib-actions .btn, .camp-actions .btn { min-height: 44px; }
  .cat-lang { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; min-height: 44px; }
  .cat-lang input { flex: 1; min-height: 44px; }
}

/* Custom file picker */
.file-pick { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.file-pick input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; clip: rect(0,0,0,0); }
.file-pick-btn { min-height: 44px; }
.file-pick-name { font-weight: 600; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Consistent primary save at end of forms */
.form .full .btn:not(.sec):not(.danger), .row-actions > .btn:not(.sec):not(.danger), .sticky-save .btn:not(.sec) {
  font-weight: 800;
}
.stock-filters { margin-bottom: 14px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.rc-why { margin: 0; font-size: 13px; color: #8a5a00; font-weight: 600; }
.cat-lang .mt-badge { font-size: 12px; }


/* el-18.1: planogram fits up to 18 motors/shelf (incl. phone 390) */
.pg-motors { display: flex; flex-wrap: wrap; gap: 6px; }
.pg-slot .pg-code-short { font-size: 10px; font-weight: 700; color: #666; }
.planogram { --pg-slot-min: 64px; }
@media (max-width: 700px) {
  .planogram { --pg-slot-min: 48px; }
  .pg-motors { gap: 4px; }
  .pg-slot {
    min-width: var(--pg-slot-min) !important;
    flex: 1 1 calc((100% - 4px * 8) / 9) !important; /* wrap ~9 per row on 390; 18 => 2 rows */
    max-width: calc(50% - 4px);
    padding: 4px;
  }
  .pg-slot[style] { min-width: var(--pg-slot-min) !important; }
  .pg-slot .pg-code { font-size: 10px; line-height: 1.15; white-space: normal; }
  .pg-slot .pg-name, .pg-slot .pg-type { font-size: 9px; }
}
@media (max-width: 420px) {
  .pg-slot {
    flex: 1 1 calc((100% - 4px * 5) / 6) !important;
    max-width: calc(33.33% - 4px);
  }
}

/* el-18.2 real model PNGs: same box, no crop */
.model-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; margin-top: 12px; }
.model-gallery .mg-card { background: #f4f6f2; border-radius: 12px; padding: 10px; text-align: center; box-shadow: 0 0 0 1px rgba(0,0,0,.06); }
.model-gallery .mg-card img { width: 100%; height: 120px; object-fit: contain; object-position: center; display: block; }
.model-gallery .mg-card .mg-name { font-size: 13px; font-weight: 700; margin-top: 6px; }

/* el-18.3 planogram cards + satellites */
.cab-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; align-items: center; }
.cab-tab { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 999px; background: #eef1ea; color: #303030; font-weight: 700; font-size: 13px; text-decoration: none; border: 1px solid transparent; min-height: 44px; }
.cab-tab.on { background: #80C020; color: #fff; }
.cab-tab.cab-add { background: #fff; border: 1px dashed #80C020; color: #306010; cursor: pointer; }
.sat-form { margin-bottom: 12px; }
.sat-preview { width: 120px; height: 120px; background: #f4f6f2; border-radius: 12px; display: flex; align-items: center; justify-content: center; }
.sat-preview img { max-width: 100%; max-height: 100%; object-fit: contain; }
.pg-shelf-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.pg-shelf-type-lbl { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; margin: 0; }
.pg-shelf-type select { min-height: 40px; }
.pg-motors-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.pg-card { background: #fff; border: 2px solid #d5d9d0; border-radius: 12px; padding: 8px; display: flex; flex-direction: column; gap: 6px; min-height: 220px; }
.pg-card.linked { border-color: #80C020; background: #f7fbef; }
.pg-card.empty { border-style: dashed; }
.pg-card.low { border-color: #e0a000; }
.pg-card-top { display: flex; justify-content: space-between; gap: 4px; font-size: 11px; font-weight: 800; }
.pg-card-media { width: 100%; height: 72px; display: flex; align-items: center; justify-content: center; background: #f4f6f2; border-radius: 8px; overflow: hidden; }
.pg-card-media img { width: 100%; height: 100%; object-fit: contain; }
.pg-card .pg-empty { font-size: 28px; color: #bbb; }
.pg-card-form { display: flex; flex-direction: column; gap: 6px; }
.pg-card-form .pg-f { display: flex; flex-direction: column; gap: 2px; font-size: 11px; font-weight: 700; margin: 0; }
.pg-card-form select, .pg-card-form input { width: 100%; min-height: 36px; font-size: 12px; }
.pg-card-nums { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.pg-card-nums .pg-f-price { grid-column: 1 / -1; } /* el-18.4: price alone on full row so € amount is readable */
.pg-card-form input.pg-price { min-width: 0; width: 100%; font-variant-numeric: tabular-nums; font-size: 13px; font-weight: 700; }
.pg-card-link { margin-top: auto; }
.pg-card-link .tiny { font-size: 10px; }
@media (max-width: 700px) {
  .pg-motors-cards { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
  .pg-card { min-height: 200px; }
  .pg-card-nums { grid-template-columns: 1fr 1fr; }
  .pg-card-nums .pg-f-price { grid-column: 1 / -1; }
  .cab-tab { font-size: 12px; padding: 8px 10px; }
}


/* el-18.9.1: hamburger must stay clickable above content */
.menu-btn { position: relative; z-index: 50; pointer-events: auto; cursor: pointer; -webkit-tap-highlight-color: transparent; }
@media (max-width: 900px) {
  .menu-btn { display: inline-flex !important; align-items: center; justify-content: center; }
  .nav-backdrop { pointer-events: none; }
  .nav-backdrop.open { display: block; pointer-events: auto; }
  nav.side { pointer-events: auto; }
}


/* el-18.10: shelf count under model image */
.shelf-count-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin-top: 10px; }
.shelf-count-form input[type=number] { width: 5rem; min-height: 44px; }
.machine-photo-panel .mph-meta h2 { margin-top: 0; }


/* el-18.11 */
.lane-code-sec { display: block; font-size: 12px; font-weight: 500; margin-top: 2px; }
.temp-setpoint-form { max-width: 420px; }
.add-lane-advanced { margin-top: 12px; }
.add-lane-advanced summary { cursor: pointer; font-weight: 600; padding: 8px 0; }


/* el-18.12 dashboard */
.dash-kpis { margin-bottom: 12px; }
.dash-ops { margin-bottom: 16px; }
.dash-ops .kpi .val { font-size: 28px; }
.dash-charts { display: grid; grid-template-columns: 1.4fr 1fr; gap: 14px; margin-bottom: 16px; }
.dash-chart-panel h2 { margin-top: 0; }
.dash-chart-wrap { position: relative; height: 280px; }
.dash-pie-wrap { height: 280px; max-width: 360px; margin: 0 auto; }
.dash-bottom { margin-top: 4px; }
@media (max-width: 900px) {
  .dash-charts { grid-template-columns: 1fr; }
  .dash-chart-wrap, .dash-pie-wrap { height: 240px; }
  .dash-ops { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  .dash-kpis .kpi .val { font-size: 22px; }
}


/* el-18.13 satellite tabs clarity */
.cab-tabs-hint { margin: 0 0 8px; font-size: 13px; }
.lanes-panel h2 .pill { font-size: 12px; font-weight: 700; vertical-align: middle; }


/* el-18.14 forecast cards */
.dash-forecast { margin-bottom: 16px; }
.kpi-forecast .fc-sofar { margin-top: 4px; color: #555; font-weight: 600; }
.kpi-forecast.sparse .val { line-height: 1.35; }


/* el-18.14 custom period */
.dash-period { margin-bottom: 16px; }
.dash-period-presets { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.dash-period-presets .btn.on { background: var(--lime); color: #1a1a1a; border-color: var(--lime); font-weight: 800; }
.dash-period-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; align-items: end; }
.dash-period-form .dash-period-presets { grid-column: 1 / -1; }
.dash-period-form .full { grid-column: 1 / -1; }
.dash-period-kpis { margin-top: 14px; }
@media (max-width: 420px) {
  .dash-period-presets .btn { flex: 1 1 45%; text-align: center; }
}

/* ===== el-18.15 sticky top bar (all admin pages) ===== */
.userbar { position: -webkit-sticky; position: sticky; top: 0; z-index: 150; background: var(--bg);
  margin: -22px -30px 10px; padding: 10px 30px; padding-top: calc(10px + env(safe-area-inset-top));
  border-bottom: 1px solid var(--line); box-shadow: 0 2px 10px rgba(0,0,0,.05); }
html { scroll-padding-top: calc(var(--ub-h, 64px) + 12px); }
:target { scroll-margin-top: calc(var(--ub-h, 64px) + 12px); }
.mtabs { top: var(--ub-h, 64px); }
@media (max-width: 900px) {
  .userbar { margin: -12px -12px 8px; padding: 6px 12px; padding-top: calc(6px + env(safe-area-inset-top)); }
}
/* drawer (300) and backdrop (290) and modals (200) stay above the bar (150) */

/* ===== el-18.15 machine page: shelf column + one-shelf editor ===== */
.cab-panel h2 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cab-code { margin: 0 0 6px; }
.rename-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; margin: 6px 0 2px; }
.rename-form label { display: flex; flex-direction: column; gap: 4px; font-weight: 700; min-width: 220px; flex: 1; }
.rename-form input { min-height: 40px; }
.shelf-layout { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 16px; align-items: start; }
.shelf-col { display: flex; flex-direction: column; gap: 6px; position: sticky; top: calc(var(--ub-h, 64px) + 70px); }
.shelf-item { appearance: none; text-align: left; font: inherit; cursor: pointer; background: #f6f8f3; border: 2px solid var(--line);
  border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; min-height: 52px; color: var(--ink); }
.shelf-item:hover { border-color: #b9dc8a; }
.shelf-item.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.shelf-item .shelf-n { font-weight: 800; font-size: 16px; }
.shelf-item .shelf-sub { font-size: 12px; opacity: .8; }
.shelf-item .shelf-badge { align-self: flex-start; margin-top: 2px; font-size: 11px; }
.shelf-editor { min-width: 0; }
.shelf-editor[hidden] { display: none !important; }
.shelf-editor .pg-shelf-label { margin: 0; font-size: 18px; }
.shelf-adv { margin-top: 12px; border-top: 1px dashed var(--line); padding-top: 8px; }
.shelf-adv summary { min-height: 40px; display: flex; align-items: center; }
@media (max-width: 900px) {
  .shelf-layout { grid-template-columns: 1fr; gap: 10px; }
  .shelf-col { flex-direction: row; overflow-x: auto; position: static; padding-bottom: 6px; -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity; }
  .shelf-item { flex: 0 0 auto; min-width: 118px; scroll-snap-align: start; padding: 8px 10px; }
  .shelf-item .shelf-n { font-size: 15px; }
  .shelf-item .shelf-sub { font-size: 11px; white-space: nowrap; }
  .rename-form label { min-width: 0; }
}

/* ===== el-18.15 forecast page ===== */
.fc-filters { display: flex; flex-direction: column; gap: 8px; }
.fc-filter-form { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.fc-toggle { display: flex; gap: 8px; }
.fc-toggle .btn.on { background: var(--lime); color: #1a1a1a; border-color: var(--lime); font-weight: 800; }
.fc-machine { display: flex; flex-direction: column; gap: 4px; font-weight: 700; min-width: 240px; flex: 1; max-width: 520px; }
.fc-horizon, .fc-method { margin: 0; font-size: 13px; }
.fc-method { margin: -6px 0 16px; }
.fc-h { font-size: 18px; margin: 4px 0 10px; }
.fc-total { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 14px; }
.fc-table th[data-key] { cursor: pointer; user-select: none; white-space: nowrap; }
.fc-table th[data-key]::after { content: attr(data-arrow); margin-left: 4px; font-size: 11px; color: var(--lime-d); }
.fc-table th.sorted { color: var(--lime-d); }
.fc-thumb { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; background: #eef1ea; display: inline-flex; align-items: center; justify-content: center; }
.fc-sugg .pill { font-size: 15px; font-weight: 800; min-width: 36px; text-align: center; }
.kpi-forecast .fc-link { margin-top: 6px; font-weight: 700; }
@media (max-width: 900px) {
  .fc-total { grid-template-columns: 1fr; }
  .fc-machine { min-width: 0; max-width: none; width: 100%; }
  .fc-table td.fc-photo { float: left; margin-right: 10px; border: 0; }
  .fc-table th.fc-photo { display: none; }
}
.cab-panel label.req::after { content: none; }
@media (max-width: 700px) {
  /* el-18.15: machine tabs = one scrollable row under the sticky bar (saves vertical space on phones) */
  .mtabs { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; padding: 6px 0; scrollbar-width: none; }
  .mtabs::-webkit-scrollbar { display: none; }
  .mtab { flex: 0 0 auto; padding: 8px 12px; }
}
.fc-sort-pick { display: none; flex-direction: column; gap: 4px; font-weight: 700; margin: 0 0 10px; max-width: 320px; }
@media (max-width: 900px) { .fc-sort-pick { display: flex; } .desk-only { display: none; } }

/* el-18.15 fix: product photo on stock cards had no size rules (rendered at natural size on phones) */
.stock-lane-head { display: flex; align-items: center; gap: 10px; min-width: 0; }
.stock-prod-photo { width: 56px; height: 56px; flex: 0 0 56px; border-radius: 10px; object-fit: cover; background: #eef1ea; }
.stock-prod-ph { display: inline-flex; align-items: center; justify-content: center; font-size: 22px; color: #999; }
.stock-prod-ph.sm { width: 44px; height: 44px; border-radius: 8px; background: #eef1ea; display: inline-flex; align-items: center; justify-content: center; vertical-align: middle; }
.stock-prod-ph.empty { font-size: 16px; }

/* ---- el-18.16: «Νέο μηχάνημα» wizard + pairing card ---- */
.wz-steps { list-style: none; display: flex; gap: 6px; padding: 0; margin: 0 0 14px; counter-reset: none; }
.wz-steps li { flex: 1; display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; color: #777; font-weight: 600; font-size: 14px; min-width: 0; }
.wz-steps .wz-n { flex: none; width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: #e9ece5; color: #555; font-weight: 800; }
.wz-steps .wz-l { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wz-steps li.on { border-color: var(--lime); color: var(--ink); box-shadow: 0 0 0 2px rgba(128,192,32,.25); }
.wz-steps li.on .wz-n { background: var(--lime); color: #fff; }
.wz-steps li.done .wz-n { background: var(--lime-d); color: #fff; }
.wz-panel { overflow: visible; }
.wz-panel h2 { justify-content: flex-start; }
.wz-choice { display: flex; gap: 10px; flex-wrap: wrap; margin: 6px 0 14px; }
.wz-opt { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border: 1px solid #ccc; border-radius: 12px; cursor: pointer; font-weight: 700; min-height: 44px; }
.wz-opt.on { border-color: var(--lime); background: #f4faea; }
.wz-sec[hidden] { display: none !important; }
.wz-wide { display: flex; flex-direction: column; gap: 5px; font-weight: 600; max-width: 520px; }
.wz-wide select { min-height: 40px; }
.wz-models { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 6px 0 16px; }
.wz-model { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px; border: 2px solid var(--line); border-radius: 14px; cursor: pointer; text-align: center; background: #fff; }
.wz-model input { position: absolute; opacity: 0; pointer-events: none; }
.wz-model img { height: 110px; width: auto; max-width: 100%; object-fit: contain; }
.wz-model .muted { font-size: 12px; }
.wz-model.on { border-color: var(--lime); background: #f4faea; }
.wz-model:focus-within { outline: 2px solid var(--blue); outline-offset: 2px; }
.wz-h3 { margin: 18px 0 4px; font-size: 16px; }
.wz-sats { display: flex; flex-direction: column; gap: 10px; margin: 8px 0; }
.wz-sat { display: grid; grid-template-columns: 110px 1fr 1fr 1fr auto; gap: 10px; align-items: end; padding: 10px; border: 1px dashed #c9d2bf; border-radius: 12px; background: #fafcf7; }
.wz-sat label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: 13px; }
.wz-sat-n { align-self: center; }
.wz-add-sat { margin-top: 4px; }
.wz-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.wz-nav .btn { min-width: 130px; display: inline-flex; align-items: center; justify-content: center; }
.wz-cabs { display: flex; flex-direction: column; gap: 10px; }
.wz-cab { display: flex; gap: 14px; align-items: center; border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; }
.wz-cab img { height: 80px; width: 60px; object-fit: contain; flex: none; }
.wz-cab-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.wz-cab-title { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.wz-shelves { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; }
.wz-shelves input { width: 80px; min-height: 40px; font-size: 16px; text-align: center; }
.wz-cab-sum { margin: 0; }
.wz-summary { margin-top: 14px; background: #f7f9f4; border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; }
.wz-summary ul { margin: 6px 0; padding-left: 18px; }
/* pairing card */
.pair-panel { overflow: visible; }
.pair-card { border: 2px solid var(--ink); border-radius: 16px; padding: 16px; display: grid; grid-template-columns: 1fr auto; gap: 8px 18px; background: #fff; }
.pair-card-top { grid-column: 1 / -1; display: flex; align-items: center; gap: 14px; background: var(--ink); color: #fff; border-radius: 10px; padding: 10px 14px; }
.pair-card-top .muted { color: #ccc; }
.pair-logo { height: 30px; }
.pair-steps-howto { grid-column: 1 / -1; margin: 6px 0; padding-left: 20px; font-size: 14px; color: #444; }
.pair-fields { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.pair-field { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "lbl lbl" "val btn"; gap: 4px 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fafcf7; }
.pf-lbl { grid-area: lbl; font-weight: 700; font-size: 13px; color: #555; text-transform: none; }
.pf-val { grid-area: val; font-family: "DejaVu Sans Mono", Consolas, monospace; font-size: 22px; font-weight: 700; color: var(--ink); background: none; overflow-wrap: anywhere; word-break: break-all; }
.pf-url { font-size: 18px; }
.pf-big { font-size: 26px; letter-spacing: 1px; }
.pf-code { font-size: 46px; letter-spacing: 6px; display: inline-flex; gap: 18px; color: #1f5f00; word-break: normal; }
.pf-code.expired { color: #aaa; text-decoration: line-through; }
.pf-copy { grid-area: btn; }
.pf-exp .pf-val { font-family: inherit; font-size: 16px; font-weight: 400; }
#pf-countdown { font-variant-numeric: tabular-nums; font-weight: 800; color: var(--lime-d); }
#pf-countdown.expired { color: var(--red); }
.pair-qr { display: flex; flex-direction: column; align-items: center; gap: 6px; max-width: 200px; text-align: center; align-self: start; }
.pair-qr img { border: 1px solid var(--line); border-radius: 8px; }
.pair-actions { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 10px; }
.pair-actions form.inline { display: inline; }
.pair-link-row { margin-top: 8px; }
@media (max-width: 900px) {
  .wz-models { grid-template-columns: 1fr 1fr; }
  .wz-sat { grid-template-columns: 1fr; }
  .wz-steps li { flex-direction: column; gap: 3px; padding: 6px 4px; font-size: 11px; text-align: center; }
  .wz-steps .wz-l { white-space: normal; }
  .pair-card { grid-template-columns: 1fr; padding: 12px; }
  .pair-qr { max-width: none; }
  .pf-code { font-size: 40px; letter-spacing: 4px; gap: 12px; }
  .pf-val { font-size: 20px; } .pf-url { font-size: 16px; }
  .pair-field { grid-template-areas: "lbl btn" "val val"; }
  .pf-big { font-size: 24px; word-break: normal; }
  .pair-field .pf-code { font-size: 44px; letter-spacing: 4px; gap: 14px; }
  .wz-nav .btn { min-width: 0; flex: 1; }
}
@media print {   /* only pages that carry the pairing card */
  body:has(#pair-card) :is(nav.side, .nav-backdrop, .userbar, header.top, .viewing-as, .flash, .wz-steps, .no-print, .demo-note) { display: none !important; }
  body:has(#pair-card) { background: #fff; }
  body:has(#pair-card) .layout { display: block; }
  body:has(#pair-card) main { padding: 0; }
  body:has(#pair-card) .pair-panel { border: 0; padding: 0; margin: 0; }
  .pair-card { break-inside: avoid; max-width: 720px; margin: 0 auto; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .pf-copy { display: none !important; }
}
.wz-cta { display: flex; justify-content: flex-end; margin: 0 0 12px; }
@media (max-width: 900px) { .wz-cta .btn { width: 100%; justify-content: center; } }
.wz-upper { text-transform: uppercase; }
#wz-sats { scroll-margin-top: calc(var(--ub-h, 60px) + 12px); }
.wz-panel .form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.wz-panel .form > label, .wz-sat > label { min-width: 0; }
.wz-panel input, .wz-panel select { max-width: 100%; min-width: 0; }
@media (max-width: 900px) { .wz-panel .form { grid-template-columns: minmax(0, 1fr); } }

/* ---------------- el-18.18: numeric machine code, compact rows, search, pager ---------------- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.mcode-stack { display: inline-flex; flex-direction: column; line-height: 1.2; min-width: 0; vertical-align: middle; }
.mcode-stack .mcode, b.mcode { font-variant-numeric: tabular-nums; letter-spacing: .4px; font-weight: 800; }
.mcode-stack .mname { font-size: .86em; color: #555; font-weight: 600; overflow-wrap: anywhere; }
.machine-head .mh-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-bottom: 4px; }
.machine-head .mh-id .mcode { font-size: 1.35em; } .machine-head .mh-id .mname { font-size: 1em; color: var(--ink); }
.wz-auto-code { background: #f3f5f0 !important; color: #555; font-weight: 800; letter-spacing: .5px; font-variant-numeric: tabular-nums; cursor: default; }
.lsearch { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.lsearch-lbl { flex: 1 1 180px; position: relative; display: flex; align-items: center; margin: 0; }
.lsearch-ico { position: absolute; left: 11px; font-size: 15px; opacity: .6; pointer-events: none; }
.lsearch input[type=search] { width: 100%; padding: 10px 12px 10px 34px; border: 1px solid #cfd5c8; border-radius: 10px; font-size: 16px; background: #fff; }
.lsearch input[type=search]:focus { outline: 2px solid var(--lime); outline-offset: 1px; }
#mlist[aria-busy=true], [data-list-body][aria-busy=true] { opacity: .55; transition: opacity .15s; }
.mlist-panel { overflow-x: visible; }
.mrows { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.mrow { display: grid; grid-template-columns: minmax(170px, 1.4fr) minmax(150px, 1fr) minmax(110px, .6fr) minmax(160px, 1fr); gap: 4px 16px; align-items: center;
  padding: 9px 10px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.mrows.with-cust .mrow { grid-template-columns: minmax(170px, 1.3fr) minmax(120px, 1fr) minmax(150px, 1fr) minmax(110px, .6fr) minmax(160px, 1fr); }
a.mrow:hover { background: #f7faf2; text-decoration: none; }
a.mrow:focus-visible { outline: 3px solid var(--lime); outline-offset: -3px; background: #f7faf2; }
.mrow-head { font-size: 12px; text-transform: uppercase; color: #777; letter-spacing: .3px; font-weight: 700; border-bottom: 2px solid var(--line); padding-top: 4px; }
.mr-id { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mr-sats { font-size: 12px; color: #3b6d9a; font-weight: 700; }
.mr-hit { font-size: 12px; color: #7a5a00; background: #fff8d6; border-radius: 6px; padding: 1px 6px; align-self: flex-start; }
.mr-cust { font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.mr-status { display: flex; gap: 8px; align-items: center; min-width: 0; }
.mr-st-txt { display: flex; flex-direction: column; line-height: 1.2; font-size: 13px; }
.sdot { width: 11px; height: 11px; border-radius: 50%; flex: 0 0 11px; background: #a0a69a; box-shadow: 0 0 0 3px #eceee8; }
.sdot.s-online { background: #5aa516; box-shadow: 0 0 0 3px #e5f4d2; } .sdot.s-fault { background: var(--red); box-shadow: 0 0 0 3px #fde2e2; }
.sdot.s-offline { background: #8b8f86; } .sdot.s-never { background: #c9ccc4; }
.st-online { color: #3f6e0c; } .st-fault { color: #a12b2b; } .st-offline, .st-never { color: #555; }
.mr-stock { display: flex; align-items: center; gap: 8px; font-variant-numeric: tabular-nums; }
.mbar { display: inline-block; width: 70px; height: 8px; background: #eceee8; border-radius: 6px; overflow: hidden; }
.mbar i { display: block; height: 100%; background: var(--lime); } .mbar.low i { background: var(--amber); }
.mr-type { font-size: 13px; min-width: 0; overflow-wrap: anywhere; }
.lpager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; padding: 12px 2px 2px; font-size: 14px; }
.lpager-links { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.lp-num, .lp-cur, .lp-gap { min-width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; font-weight: 700; }
.lp-num { border: 1px solid var(--line); color: var(--ink); } .lp-num:hover { background: #f3f5f0; text-decoration: none; }
.lp-cur { background: var(--ink); color: #fff; }
.ml-empty { text-align: center; padding: 26px 10px; }
.mg-details summary { cursor: pointer; font-weight: 700; margin: 6px 0; }
.lrows-table td.lr-main a.lr-link { color: var(--ink); font-weight: 700; }
@media (max-width: 700px) {
  .mrow-head { display: none; }
  .mrow, .mrows.with-cust .mrow { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "id stock" "cust cust" "status status"; gap: 3px 10px; padding: 9px 4px; }
  .mrow .mr-id { grid-area: id; } .mrow .mr-stock { grid-area: stock; align-self: start; }
  .mrow .mr-cust { grid-area: cust; font-size: 13px; color: #555; font-weight: 600; }
  .mrow .mr-status { grid-area: status; } .mrow .mr-st-txt { flex-direction: row; flex-wrap: wrap; gap: 0 6px; }
  .mrow .mr-type { display: none; }
  .mbar { width: 44px; }
  .lp-txt { display: none; }
  .lpager { justify-content: center; } .lpager-info, .lpager-size { width: 100%; text-align: center; }
}
.lc-src { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin-bottom: 8px; padding: 10px 12px; background: #f7faf2; border-radius: 12px; }
.lc-shelf { border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px 10px; margin: 0 0 12px; }
.lc-shelf legend { display: flex; gap: 14px; align-items: center; padding: 0 6px; }
.lc-all { font-weight: 600; font-size: 13px; display: inline-flex; gap: 6px; align-items: center; margin: 0; }
.lc-lanes { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px; }
.lc-lane { display: grid; grid-template-columns: 22px 1fr; gap: 0 6px; align-items: center; padding: 7px 8px; border: 1px solid var(--line); border-radius: 10px; margin: 0; cursor: pointer; font-weight: 600; }
.lc-lane input { width: 18px; height: 18px; grid-row: span 2; }
.lc-lane .lc-l-cur { font-size: 12px; font-weight: 500; }
.lc-lane.has { background: #fffdf3; } .lc-lane.off { opacity: .55; cursor: not-allowed; background: #f6f6f4; }
.lc-lane:has(input:checked) { border-color: var(--lime); background: #f1f8e6; }
.lc-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.lc-actions.sticky-save { position: sticky; bottom: 0; background: #fff; padding: 10px 0; }
.lc-list { margin: 6px 0 12px; padding-left: 20px; } .lc-list li { margin: 3px 0; }
.warn-box { background: #fff8d6 !important; border-color: #f0de8a !important; color: #6b5200 !important; }
.pc-arrow { font-size: 17px; margin: 6px 0 10px; } .pc-sum { padding-left: 4px; list-style: none; } .pc-sum li { margin: 4px 0; }
.pc-cab { border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; margin: 8px 0; } .pc-cab summary { cursor: pointer; }
.pc-filter { margin: 6px 0 10px; max-width: 420px; }
.pc-targets .mrow { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
@media (max-width: 700px) { .pc-targets .mrow { grid-template-areas: none; grid-template-columns: 1fr; } .pc-targets .mrow .mr-type { display: block; } .lc-lanes { grid-template-columns: 1fr 1fr; } }
/* el-18.18: linked motors = one merged card (shared product, price, stock) */
.pg-card.pg-merged { border-style: solid; border-color: #80C020; background: #f7fbef; }
.pg-card.pg-merged.span-2 { grid-column: span 2; }
.pg-card.pg-merged.span-full { grid-column: 1 / -1; }
.pg-merge-slots { display: grid; grid-template-columns: repeat(var(--n, 2), minmax(0, 1fr)); gap: 6px; }
.pg-merge-slot { position: relative; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pg-merge-slot.secondary { border-left: 2px dashed #b9d98a; padding-left: 6px; }
.pg-merge-slot .pg-card-media, .pg-merge-slot .pg-sec-media { width: 100%; height: 72px; display: flex; align-items: center; justify-content: center; background: #f4f6f2; border-radius: 8px; overflow: hidden; }
.pg-merge-slot .pg-sec-media img { width: 100%; height: 100%; object-fit: contain; opacity: .85; }
.pg-mbadge { display: inline-block; font-size: 11px; font-weight: 800; background: #303030; color: #fff; border-radius: 6px; padding: 1px 6px; letter-spacing: .3px; align-self: flex-start; }
.pg-merge-slot .pg-mbadge { position: absolute; top: 4px; left: 4px; z-index: 1; }
.pg-merge-slot.secondary .pg-mbadge { left: 10px; }
.pg-sec-name { font-size: 12px; font-weight: 700; overflow-wrap: anywhere; }
.pg-linked-with { font-size: 11px; color: #3f6e0c; font-weight: 600; }
.pg-merge-note { margin: 0; }
.stock-mbadges { display: inline-flex; gap: 3px; align-items: center; }
.lc-l-name .pg-mbadge { font-size: 10px; margin-left: 2px; }
@media (max-width: 420px) { .pg-card.pg-merged.span-2 { grid-column: 1 / -1; } }
