@font-face { font-family: 'Assistant'; src: url('fonts/assistant-hebrew-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; unicode-range: U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F; }
@font-face { font-family: 'Assistant'; src: url('fonts/assistant-hebrew-600-normal.woff2') format('woff2'); font-weight: 600 800; font-display: swap; unicode-range: U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F; }

:root {
  --blue: #1f3c88; --blue-2: #152c66; --blue-3: #2c4fa8; --blue-soft: #e8edf8; --blue-line: #cdd7ee;
  --orange: #f49000; --orange-2: #c97400; --orange-soft: #fff1dc;
  --bg: #eef1f7; --card: #fff; --ink: #1c2430; --ink-2: #334155; --muted: #64748b; --line: #e2e7f0; --line-2: #eef1f6;
  --ok: #15803d; --ok-bg: #e7f6ec; --warn: #b45309; --warn-bg: #fdf0d9; --bad: #b91c1c; --bad-bg: #fbe7e7; --info: #1d4ed8; --info-bg: #e5edfd;
  --violet: #6d28d9; --violet-bg: #efe9fd;
  --radius: 12px; --shadow: 0 1px 2px rgba(21,44,102,.06), 0 6px 20px rgba(21,44,102,.07);
  --font: 'Assistant', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --side: 244px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font); font-size: 15px; line-height: 1.45; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--blue-3); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; font-weight: 700; }
h1 { font-size: 23px; } h2 { font-size: 17px; } h3 { font-size: 15px; }
.num { font-variant-numeric: tabular-nums; }
.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.xs { font-size: 12px; }
.b { font-weight: 700; }
.hide { display: none !important; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; }
.sp { margin-inline-start: auto; }
.mt { margin-top: 14px; } .mt2 { margin-top: 22px; } .mb { margin-bottom: 12px; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: var(--side) 1fr; min-height: 100vh; }
.side { background: linear-gradient(180deg, var(--blue-2), var(--blue) 70%); color: #dfe6f7; position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; }
.brand { padding: 16px 16px 12px; display: flex; gap: 10px; align-items: center; border-bottom: 1px solid rgba(255,255,255,.12); }
.brand img { height: 46px; background: #fff; border-radius: 9px; padding: 4px 6px; }
.brand b { display: block; color: #fff; font-size: 15px; }
.brand small { color: #b9c6e6; font-size: 12px; }
.nav { padding: 8px 10px; flex: 1; }
.nav-group { font-size: 11px; letter-spacing: .4px; color: #93a5d3; margin: 12px 8px 4px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px; color: #e6ecfa; font-weight: 600; font-size: 14px; }
.nav a:hover { background: rgba(255,255,255,.08); text-decoration: none; }
.nav a.active { background: #fff; color: var(--blue); }
.nav a.active .ico { color: var(--orange); }
.nav .badge { margin-inline-start: auto; background: var(--orange); color: #fff; border-radius: 99px; font-size: 11px; padding: 1px 7px; font-weight: 700; }
.nav .opt { margin-inline-start: auto; font-size: 10px; border: 1px solid rgba(255,255,255,.35); border-radius: 99px; padding: 0 6px; color: #c8d3ef; }
.nav a.active .opt { color: var(--muted); border-color: var(--line); }
.side-foot { padding: 12px 16px 16px; font-size: 12px; color: #a9b8de; border-top: 1px solid rgba(255,255,255,.12); }
.side-foot button { margin-top: 8px; background: transparent; border: 1px solid rgba(255,255,255,.3); color: #fff; border-radius: 8px; padding: 4px 10px; cursor: pointer; font-size: 12px; }
.ico { width: 18px; height: 18px; flex: none; }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 30; background: rgba(255,255,255,.94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); padding: 10px 22px; display: flex; align-items: center; gap: 14px; }
.crumb { font-weight: 700; color: var(--ink-2); }
.crumb a { color: var(--muted); font-weight: 600; }
.role-sel { margin-inline-start: auto; display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.role-sel select { border: 1px solid var(--blue-line); background: var(--blue-soft); color: var(--blue); font-weight: 700; border-radius: 9px; padding: 6px 10px; }
.who { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.menu-btn { display: none; background: none; border: 0; padding: 4px; cursor: pointer; color: var(--blue); }
.content { padding: 20px 22px 60px; max-width: 1400px; width: 100%; }
.page-head { display: flex; align-items: flex-end; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.page-head p { margin: 4px 0 0; color: var(--muted); }
.demo-ribbon { background: var(--orange-soft); color: #7a4a00; border-bottom: 1px solid #f5d59c; font-size: 12.5px; padding: 5px 22px; }

/* ---------- cards / grids ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; min-width: 0; }
.card > h2, .card-h { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.card-h h2 { margin: 0; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(148px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); display: block; color: inherit; }
a.kpi:hover { text-decoration: none; border-color: var(--blue-line); }
.kpi .k-l { font-size: 13px; color: var(--muted); font-weight: 600; }
.kpi .k-v { font-size: 27px; font-weight: 800; color: var(--blue); margin-top: 2px; }
.kpi .k-s { font-size: 12px; color: var(--muted); }
.kpi.alert .k-v { color: var(--bad); }
.kpi.warn .k-v { color: var(--warn); }
.kpi.orange { border-top: 3px solid var(--orange); }

/* ---------- tables ---------- */
.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: start; font-size: 12px; color: var(--muted); font-weight: 700; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; background: #f8fafd; }
.tbl td { padding: 9px 10px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.tbl tr.click { cursor: pointer; }
.tbl tr.click:hover td { background: #f6f8fd; }
.tbl tfoot td { font-weight: 800; border-top: 2px solid var(--line); background: #f8fafd; }
.tbl .r { text-align: end; }

/* ---------- chips ---------- */
.chip { display: inline-flex; align-items: center; gap: 5px; border-radius: 99px; padding: 2px 9px; font-size: 12px; font-weight: 700; white-space: nowrap; background: var(--line-2); color: var(--ink-2); }
.chip.ok { background: var(--ok-bg); color: var(--ok); } .chip.warn { background: var(--warn-bg); color: var(--warn); } .chip.bad { background: var(--bad-bg); color: var(--bad); }
.chip.info { background: var(--info-bg); color: var(--info); } .chip.violet { background: var(--violet-bg); color: var(--violet); } .chip.orange { background: var(--orange-soft); color: var(--orange-2); }
.chip.opt { background: #fff; border: 1px dashed var(--orange); color: var(--orange-2); }
.st-planning { background: #eef2f7; color: #475569; } .st-to_exec { background: var(--warn-bg); color: var(--warn); } .st-assigned { background: var(--info-bg); color: var(--info); }
.st-en_route { background: var(--violet-bg); color: var(--violet); } .st-on_site { background: var(--orange-soft); color: var(--orange-2); } .st-done { background: var(--ok-bg); color: var(--ok); }
.st-closed { background: #dff3f1; color: #0f766e; } .st-billed { background: #ecebf6; color: #4b4a7a; }
.type-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; }
.src { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; color: #0f766e; background: #e2f5f2; border-radius: 6px; padding: 1px 6px; }
.src.ituran { color: #9a3412; background: #fdeee4; }
.src.agent { color: var(--violet); background: var(--violet-bg); }
.avatar { width: 28px; height: 28px; border-radius: 50%; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 11.5px; font-weight: 800; flex: none; }

/* ---------- buttons / forms ---------- */
.btn { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--blue-line); background: #fff; color: var(--blue); font-weight: 700; border-radius: 9px; padding: 7px 13px; cursor: pointer; font-size: 14px; white-space: nowrap; }
.btn:hover { background: var(--blue-soft); text-decoration: none; }
.btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn.primary:hover { background: var(--blue-2); }
.btn.orange { background: var(--orange); border-color: var(--orange); color: #fff; }
.btn.orange:hover { background: var(--orange-2); }
.btn.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.danger { color: var(--bad); border-color: #f1c4c4; }
.btn.sm { padding: 4px 9px; font-size: 13px; }
.btn:disabled, .btn.disabled { opacity: .45; cursor: not-allowed; }
.lock { display: inline-flex; gap: 6px; align-items: center; color: var(--muted); font-size: 13px; background: #f4f6fa; border: 1px dashed var(--line); padding: 6px 10px; border-radius: 9px; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field label { font-size: 12.5px; color: var(--muted); font-weight: 700; }
.inp, select.inp, textarea.inp { border: 1px solid var(--line); border-radius: 9px; padding: 7px 10px; background: #fff; min-width: 0; width: 100%; }
textarea.inp { min-height: 70px; resize: vertical; }
.inp:focus { border-color: var(--blue-3); outline: none; box-shadow: 0 0 0 3px var(--blue-soft); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; background: #fff; border: 1px solid var(--line); border-radius: 11px; padding: 4px; }
.tabs button { border: 0; background: none; padding: 6px 12px; border-radius: 8px; cursor: pointer; font-weight: 700; color: var(--muted); font-size: 13.5px; display: inline-flex; gap: 6px; align-items: center; }
.tabs button.on { background: var(--blue); color: #fff; }
.tabs .cnt { font-size: 11px; background: rgba(0,0,0,.08); border-radius: 99px; padding: 0 6px; }
.tabs button.on .cnt { background: rgba(255,255,255,.25); }

/* ---------- key/value ---------- */
.kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px 16px; }
.kv div span { display: block; font-size: 12px; color: var(--muted); font-weight: 600; }
.kv div b { font-size: 14.5px; }
.kv input.inp { margin-top: 2px; padding: 4px 8px; }

/* ---------- readiness ---------- */
.ready-bar { height: 7px; background: var(--line-2); border-radius: 99px; overflow: hidden; min-width: 70px; }
.ready-bar i { display: block; height: 100%; background: var(--ok); border-radius: 99px; }
.ready-bar.mid i { background: var(--orange); } .ready-bar.low i { background: var(--bad); }
.checklist { display: flex; flex-direction: column; gap: 6px; }
.check { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; background: #fff; text-align: start; width: 100%; }
.check .box { width: 20px; height: 20px; border-radius: 6px; border: 2px solid var(--blue-line); display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: 13px; flex: none; }
.check.on { background: var(--ok-bg); border-color: #bfe3cb; }
.check.on .box { background: var(--ok); border-color: var(--ok); }
.check:disabled { cursor: default; }
.ring { --p: 0; width: 64px; height: 64px; border-radius: 50%; background: conic-gradient(var(--c, var(--ok)) calc(var(--p) * 1%), var(--line-2) 0); display: grid; place-items: center; flex: none; }
.ring b { width: 50px; height: 50px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-size: 15px; }

/* ---------- log / timeline ---------- */
.log { display: flex; flex-direction: column; gap: 0; }
.log-e { display: grid; grid-template-columns: 92px 1fr; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 13.5px; }
.log-e:last-child { border-bottom: 0; }
.log-e time { color: var(--muted); font-size: 12px; }
.log-e .by { font-weight: 700; }

/* ---------- dispatch ---------- */
.week { display: grid; grid-template-columns: 210px repeat(6, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; font-size: 12.5px; }
.week > div { border-bottom: 1px solid var(--line-2); border-inline-start: 1px solid var(--line-2); padding: 5px 6px; min-height: 38px; min-width: 0; }
.week .wh { background: #f8fafd; font-weight: 800; color: var(--ink-2); text-align: center; cursor: pointer; }
.week .wh.on { background: var(--blue); color: #fff; }
.week .wh small { display: block; font-weight: 600; opacity: .8; }
.week .we { font-weight: 700; display: flex; flex-direction: column; justify-content: center; }
.week .we small { color: var(--muted); font-weight: 600; }
.week .maint { background: repeating-linear-gradient(45deg, #fbe7e7, #fbe7e7 6px, #fff 6px, #fff 12px); color: var(--bad); font-weight: 700; display: flex; align-items: center; justify-content: center; }
.wjob { display: block; border-radius: 6px; padding: 2px 6px; color: #fff; font-weight: 700; margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; font-size: 12px; }
.wjob.conf { outline: 2px solid var(--bad); outline-offset: 1px; }
.disp { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 16px; margin-top: 16px; }
.djob { border: 1px solid var(--line); border-radius: 11px; padding: 12px; margin-bottom: 10px; background: #fff; border-inline-start: 4px solid var(--c, var(--blue)); }
.djob.has-conf { box-shadow: 0 0 0 2px #f6caca; }
.slots { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 8px; margin-top: 10px; }
.slot label { font-size: 11.5px; color: var(--muted); font-weight: 700; display: block; margin-bottom: 2px; }
.slot select { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 5px 7px; background: #fff; font-size: 13px; }
.slot select.empty { border-color: var(--orange); background: var(--orange-soft); }
.slot select.bad { border-color: var(--bad); background: var(--bad-bg); }
.slot .val { border: 1px solid var(--line-2); background: #f8fafd; border-radius: 8px; padding: 5px 8px; font-size: 13px; font-weight: 600; }
.conf-msg { color: var(--bad); font-size: 12.5px; font-weight: 700; margin-top: 6px; display: flex; gap: 6px; align-items: center; }
.roster-g { margin-bottom: 12px; }
.roster-g h3 { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.person { display: flex; align-items: center; gap: 8px; padding: 6px 4px; border-bottom: 1px solid var(--line-2); font-size: 13.5px; }
.person:last-child { border-bottom: 0; }
.person .meta { font-size: 12px; color: var(--muted); }
.person.off { opacity: .75; }

/* ---------- map ---------- */
.map { height: 320px; border-radius: 10px; border: 1px solid var(--line); overflow: hidden; z-index: 0; background: #e8edf5; }
.map.tall { height: 420px; } .map.short { height: 220px; }
.pin { width: 30px; height: 30px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); display: grid; place-items: center; border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.3); }
.pin span { transform: rotate(45deg); color: #fff; font-size: 10px; font-weight: 800; }

/* ---------- billing ---------- */
.stepper { display: flex; gap: 0; overflow-x: auto; padding-bottom: 4px; }
.step { flex: 1; min-width: 104px; text-align: center; font-size: 12px; font-weight: 700; color: var(--muted); position: relative; padding-top: 30px; }
.step::before { content: ''; position: absolute; top: 11px; inset-inline: 0; height: 3px; background: var(--line); }
.step:first-child::before { inset-inline-start: 50%; } .step:last-child::before { inset-inline-end: 50%; }
.step i { position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 25px; height: 25px; border-radius: 50%; background: #fff; border: 3px solid var(--line); font-style: normal; font-size: 12px; display: grid; place-items: center; z-index: 1; }
.step.done { color: var(--ok); } .step.done i { background: var(--ok); border-color: var(--ok); color: #fff; } .step.done::before { background: var(--ok); }
.step.cur { color: var(--blue); } .step.cur i { border-color: var(--blue); background: var(--blue); color: #fff; box-shadow: 0 0 0 4px var(--blue-soft); }
.state-strip { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
.state-strip button { border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 8px; cursor: pointer; text-align: start; }
.state-strip button b { display: block; font-size: 20px; color: var(--blue); }
.state-strip button span { font-size: 11.5px; color: var(--muted); font-weight: 700; }
.state-strip button.on { border-color: var(--blue); box-shadow: 0 0 0 2px var(--blue-soft); }

/* ---------- report (print) ---------- */
.report { background: #fff; max-width: 860px; margin: 0 auto; padding: 36px 40px; border: 1px solid var(--line); border-radius: 6px; box-shadow: var(--shadow); }
.report-h { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 3px solid var(--blue); padding-bottom: 14px; margin-bottom: 18px; }
.report-h img { height: 70px; }
.report h1 { color: var(--blue); font-size: 22px; }
.report .tbl th { background: var(--blue); color: #fff; }
.report-foot { margin-top: 26px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 10px; }
@media print {
  .side, .topbar, .demo-ribbon, .no-print, #toast { display: none !important; }
  .shell { display: block; } .content { padding: 0; } body { background: #fff; }
  .report { border: 0; box-shadow: none; padding: 0; max-width: none; }
}

/* ---------- agents ---------- */
.agent { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; background: #fff; display: flex; flex-direction: column; gap: 8px; }
.agent-h { display: flex; gap: 10px; align-items: center; }
.agent-ic { width: 38px; height: 38px; border-radius: 10px; background: var(--violet-bg); color: var(--violet); display: grid; place-items: center; font-size: 19px; flex: none; }
.scopes { display: flex; flex-wrap: wrap; gap: 4px; }
.scopes code { font-size: 11px; background: #f1f4f9; border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; direction: ltr; }
.scopes code.deny { color: var(--bad); text-decoration: line-through; background: #fff; }
.console { background: #0f172a; color: #cbd5e1; border-radius: 10px; padding: 12px 14px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; min-height: 120px; max-height: 330px; overflow: auto; direction: ltr; text-align: left; }
.console div { white-space: pre-wrap; margin-bottom: 3px; }
.console .m { color: #93c5fd; } .console .ok { color: #86efac; } .console .w { color: #fcd34d; } .console .c { color: #64748b; } .console .he { direction: rtl; text-align: right; color: #e2e8f0; font-family: var(--font); }
.approval { border: 1px solid #e3d6fb; background: #fbf9ff; border-radius: 12px; padding: 14px; margin-bottom: 10px; }
.approval.done { background: #fff; border-color: var(--line); opacity: .85; }
.diff { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0; font-size: 13px; }
.diff div { border-radius: 8px; padding: 8px 10px; }
.diff .before { background: var(--bad-bg); } .diff .after { background: var(--ok-bg); }
.mail { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; font-size: 13.5px; background: #fff; }
.mail b { display: block; }

/* ---------- options ---------- */
.opt-card { border: 1px dashed #f3c27a; background: #fffdf8; }
.opt-card .card-h .chip { margin-inline-start: auto; }
.preview { margin-top: 12px; border-top: 1px dashed var(--line); padding-top: 12px; }
.blur { filter: blur(4px); user-select: none; }

/* ---------- modal / toast ---------- */
#toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%) translateY(30px); background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 11px; font-weight: 600; opacity: 0; transition: .25s; z-index: 200; pointer-events: none; max-width: 90vw; text-align: center; }
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.modal-bg { position: fixed; inset: 0; background: rgba(15,23,42,.45); z-index: 100; display: flex; align-items: flex-start; justify-content: center; padding: 50px 16px; overflow-y: auto; }
.modal { background: #fff; border-radius: 14px; width: min(760px, 100%); padding: 20px; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.modal-h { display: flex; align-items: center; margin-bottom: 14px; }
.modal-h button { margin-inline-start: auto; background: none; border: 0; font-size: 22px; cursor: pointer; color: var(--muted); }
.modal-f { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; }

/* ---------- field app (phone) ---------- */
.field-wrap { display: grid; grid-template-columns: 400px minmax(0, 1fr); gap: 26px; align-items: start; }
.phone { width: 390px; height: 800px; border-radius: 44px; background: #0b1020; padding: 12px; box-shadow: 0 24px 60px rgba(15,23,42,.35); position: sticky; top: 76px; }
.phone-in { width: 100%; height: 100%; border-radius: 34px; overflow: hidden; background: var(--bg); display: flex; flex-direction: column; position: relative; }
.m-top { background: linear-gradient(135deg, var(--blue), var(--blue-2)); color: #fff; padding: 14px 14px 12px; flex: none; }
.phone .m-top { padding-top: 28px; }
.m-top .row { gap: 8px; }
.m-top img { height: 32px; background: #fff; border-radius: 7px; padding: 2px 5px; }
.m-top small { opacity: .85; font-size: 12px; display: block; }
.m-top select { background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.3); color: #fff; border-radius: 8px; padding: 3px 6px; font-size: 13px; max-width: 150px; }
.m-top select option { color: var(--ink); }
.m-body { flex: 1; overflow-y: auto; padding: 12px; }
.m-tabs { display: flex; gap: 6px; margin-bottom: 10px; }
.m-tabs button { flex: 1; border: 1px solid var(--line); background: #fff; border-radius: 9px; padding: 7px 4px; font-weight: 700; font-size: 13px; cursor: pointer; color: var(--muted); }
.m-tabs button.on { background: var(--blue); color: #fff; border-color: var(--blue); }
.m-card { background: #fff; border: 1px solid var(--line); border-radius: 13px; padding: 12px; margin-bottom: 10px; cursor: pointer; border-inline-start: 4px solid var(--c, var(--blue)); }
.m-card h3 { font-size: 15px; margin: 4px 0; }
.m-sec { background: #fff; border: 1px solid var(--line); border-radius: 13px; padding: 12px; margin-bottom: 10px; }
.m-sec h3 { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.m-actions { display: grid; grid-template-columns: 1fr; gap: 8px; }
.m-btn { border: 0; border-radius: 12px; padding: 14px; font-weight: 800; font-size: 16px; cursor: pointer; background: var(--blue); color: #fff; width: 100%; }
.m-btn.orange { background: var(--orange); } .m-btn.ok { background: var(--ok); } .m-btn.ghost { background: #fff; color: var(--blue); border: 1px solid var(--blue-line); }
.m-btn:disabled { opacity: .45; cursor: not-allowed; }
.offline-bar { background: #fef3c7; color: #854d0e; font-size: 12.5px; font-weight: 700; padding: 6px 12px; text-align: center; flex: none; }
.switch { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; cursor: pointer; }
.switch i { width: 32px; height: 18px; border-radius: 99px; background: rgba(255,255,255,.3); position: relative; display: inline-block; }
.switch i::after { content: ''; position: absolute; top: 2px; right: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: .2s; }
.switch.on i { background: var(--orange); } .switch.on i::after { right: 16px; }
.loc-note { font-size: 12px; color: #9a3412; background: #fdeee4; border-radius: 8px; padding: 6px 8px; margin-top: 6px; }
body.standalone .shell { display: block; }
body.standalone { background: var(--bg); }
.standalone-app { min-height: 100vh; display: flex; flex-direction: column; }
.standalone-app .m-top { padding-top: calc(12px + env(safe-area-inset-top)); position: sticky; top: 0; z-index: 5; }

/* ---------- responsive ---------- */
@media (max-width: 1200px) { .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .disp { grid-template-columns: 1fr; } .field-wrap { grid-template-columns: 1fr; } .phone { position: static; margin: 0 auto; } }
@media (max-width: 980px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; inset-block: 0; inset-inline-start: 0; width: 270px; z-index: 60; transform: translateX(100%); transition: .25s; }
  body.nav-open .side { transform: none; box-shadow: 0 0 40px rgba(0,0,0,.35); }
  .menu-btn { display: inline-flex; }
  .g2, .g3, .g-main { grid-template-columns: 1fr; }
  .state-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .content { padding: 14px 12px 50px; }
  .topbar { padding: 8px 12px; gap: 8px; flex-wrap: wrap; }
  .role-sel span { display: none; }
  .who { display: none; }
  h1 { font-size: 20px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi .k-v { font-size: 22px; }
  .week { grid-template-columns: 120px repeat(6, 92px); overflow-x: auto; }
  .week-scroll { overflow-x: auto; }
  .state-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .diff { grid-template-columns: 1fr; }
  .phone { width: 100%; height: auto; padding: 0; background: none; box-shadow: none; border-radius: 0; }
  .phone-in { border-radius: 14px; height: 720px; }
  .report { padding: 18px; }
  .report-h { flex-direction: column; gap: 10px; }
  .demo-ribbon { padding: 5px 12px; }
}
