/* Divine Air ERP - clean social-app style: light grey page, white cards, blue actions, red Divine Air wordmark.
   Previous theme: backups\theme-before-fb-20261111-0132\ (see RESTORE.txt there). */
:root {
  --bg: #f0f2f5; --panel: #ffffff; --ink: #050505; --muted: #65676b; --line: #e4e6eb; --line-strong: #ced0d4;
  --brand: #1877f2; --brand-dark: #166fe5; --brand-ink: #ffffff; --brand-soft: #e7f3ff; --accent: #d64545;
  --hover: #f2f2f2; --btn2: #e4e6eb; --btn2-hover: #d8dadf;
  --row-alt: #f7f8fa; --sel: #e7f3ff; --ok: #31a24c; --warn: #e4a11b; --bad: #e41e3f; --radius: 8px;
  --shadow: 0 1px 2px rgba(0, 0, 0, .2); --shadow-lg: 0 12px 28px rgba(0, 0, 0, .2), 0 2px 4px rgba(0, 0, 0, .1);
  --card: #ffffff; --bg2: #f0f2f5;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif; font-size: 14px; color: var(--ink);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--brand); }
[hidden] { display: none !important; }
.boot { padding: 40px; color: var(--muted); }
.ico { display: inline-flex; width: 20px; height: 20px; flex: none; align-items: center; justify-content: center; }
.ico svg { width: 100%; height: 100%; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: var(--bg); }
.login form { background: var(--panel); padding: 28px 24px; border-radius: 8px; width: min(396px, 100%); display: grid; gap: 12px; box-shadow: var(--shadow-lg); }
.login h1 { margin: 0; color: var(--accent); font-size: 34px; font-weight: 800; letter-spacing: -.5px; text-align: center; }
.login p { margin: 0 0 8px; color: var(--muted); text-align: center; }
.login .btn.primary { font-size: 17px; padding: 10px; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 280px minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--panel); box-shadow: 1px 0 0 var(--line); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; z-index: 6; }
.side .logo { display: block; padding: 14px 20px 12px; font-weight: 800; color: var(--accent); font-size: 24px; letter-spacing: -.4px; text-decoration: none; line-height: 1.1; }
.side .logo small { display: block; color: var(--muted); font-size: 12px; font-weight: 400; letter-spacing: 0; }
.side nav { overflow: auto; flex: 1; padding: 4px 8px 16px; scrollbar-width: thin; }
.side .foot { padding: 10px 20px 4px; color: var(--muted); font-size: 12px; border-top: 1px solid var(--line); }
.ngrp { margin: 0 0 2px; }
.ngrp.home { padding-bottom: 8px; margin-bottom: 6px; border-bottom: 1px solid var(--line); }
.nhead { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 8px; border: 0; background: none; padding: 10px 8px 6px;
  color: var(--muted); font-size: 15px; font-weight: 600; border-radius: 6px; text-align: left; }
.nhead:hover { background: var(--hover); }
.nchev { width: 18px; height: 18px; transition: transform .2s; color: var(--muted); }
.ngrp.open > .nhead .nchev, details[open] > summary .nchev { transform: rotate(180deg); }
.ngrp:not(.home) > .nbody { display: none; }
.ngrp.open > .nbody { display: block; }
.ngrp:not(:has(a)) { display: none; }
.nlink, .nscreens > summary { display: flex; align-items: center; gap: 12px; padding: 6px 8px; margin: 1px 0; color: var(--ink); text-decoration: none;
  border-radius: 8px; font-size: 15px; font-weight: 500; min-height: 44px; cursor: pointer; }
.nlink:hover, .nscreens > summary:hover { background: var(--hover); }
.nl { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nbub { width: 34px; height: 34px; padding: 7px; border-radius: 50%; background: var(--btn2); color: var(--ink); }
.nlink.on { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.nlink.on .nbub { background: var(--brand); color: #fff; }
.nscreens > summary { list-style: none; }
.nscreens > summary::-webkit-details-marker { display: none; }
.ncount { font-size: 12px; color: var(--muted); background: var(--bg); border-radius: 10px; padding: 1px 7px; }
.nlink.sm { min-height: 34px; font-size: 14px; font-weight: 400; padding: 6px 8px 6px 54px; position: relative; color: #1c1e21; }
.nlink.sm::before { content: ""; position: absolute; left: 24px; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: var(--line-strong); }
.nlink.sm.on::before { background: var(--brand); }
.side .own-badge { margin-left: auto; }

.main { min-width: 0; display: flex; flex-direction: column; }
.top { background: var(--panel); box-shadow: 0 1px 2px rgba(0, 0, 0, .1); padding: 0 16px; position: sticky; top: 0; z-index: 5; }
.top .row { display: flex; align-items: center; gap: 6px; min-height: 56px; }
.top h2 { margin: 0 8px 0 4px; font-size: 20px; font-weight: 700; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.iconbtn { border: 0; background: none; width: 40px; height: 40px; border-radius: 50%; color: var(--ink); display: inline-flex; align-items: center; justify-content: center; padding: 0; font-size: 18px; flex: none; }
.iconbtn:hover { background: var(--hover); }
.top .iconbtn { background: var(--btn2); }
.top .iconbtn:hover { background: var(--btn2-hover); }
.tsearch { position: relative; display: flex; align-items: center; gap: 6px; background: var(--bg); border-radius: 50px; padding: 0 12px; height: 40px; width: min(320px, 34vw); flex: none; color: var(--muted); }
.tsearch input { border: 0; background: none; outline: 0; flex: 1; min-width: 0; height: 100%; color: var(--ink); }
.tsearch input::placeholder { color: var(--muted); }
.tsearch .own-mic, .own-setsearch .own-mic { border: 0; background: none; padding: 4px; border-radius: 50%; display: inline-flex; color: var(--muted); }
.own-mic .ico { width: 18px; height: 18px; }
.own-mic.on { background: var(--bad) !important; color: #fff !important; }
.tsr { position: absolute; top: calc(100% + 6px); left: 0; right: 0; min-width: 300px; background: var(--panel); border-radius: 8px; box-shadow: var(--shadow-lg); padding: 6px; max-height: 60vh; overflow: auto; z-index: 30; }
.tsr a { display: flex; justify-content: space-between; gap: 8px; padding: 8px 10px; border-radius: 6px; text-decoration: none; color: var(--ink); }
.tsr a:hover, .tsr a:focus { background: var(--hover); }
.tsr small { color: var(--muted); white-space: nowrap; }
.tsr-none { padding: 10px; color: var(--muted); }
.avatar { display: inline-flex; width: 40px; height: 40px; border-radius: 50%; align-items: center; justify-content: center; background: var(--brand); color: #fff; font-weight: 700; font-size: 14px; }
.avatar.sm { width: 36px; height: 36px; background: var(--brand-soft); color: var(--brand); }
.avatar.sm .ico { width: 18px; height: 18px; }
.user-dd > button { border: 0 !important; background: none !important; padding: 0 !important; border-radius: 50% !important; }
.user-dd > button::after { display: none; }
.user-dd .menu { top: calc(100% + 6px) !important; border-radius: 8px !important; }

.menubar { display: flex; flex-wrap: wrap; gap: 2px; padding: 0 0 6px; border-top: 1px solid var(--line); padding-top: 4px; }
.dd { position: relative; }
.dd > button { border: 0; background: none; padding: 8px 12px; border-radius: 6px; font-weight: 600; color: var(--muted); }
.dd > button:hover, .dd.open > button { background: var(--hover); color: var(--ink); }
.dd > button::after { content: " ▾"; color: var(--muted); font-weight: 400; }
.dd .menu { display: none; position: absolute; left: 0; top: 100%; background: var(--panel); border-radius: 8px; min-width: 240px; box-shadow: var(--shadow-lg); z-index: 20; max-height: 70vh; overflow: auto; padding: 6px; }
.dd.open .menu { display: block; }
.dd .menu a, .dd .menu button { display: block; width: 100%; text-align: left; padding: 8px 10px; color: var(--ink); text-decoration: none; border: 0; background: none; border-radius: 6px; font-weight: 500; }
.dd .menu a:hover, .dd .menu button:hover { background: var(--hover); }
.dd .menu button:disabled { color: #bcc0c4; cursor: default; background: none; }
.dd .menu .grp { padding: 8px 10px 6px; font-size: 13px; color: var(--muted); border-bottom: 1px solid var(--line); margin-bottom: 4px; }

.content { padding: 20px 24px 48px; min-width: 0; }

/* ---------- dashboard: centred feed + narrow right column ---------- */
.dash { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; max-width: 1140px; margin: 0 auto; align-items: start; }
.dash.no-side { grid-template-columns: minmax(0, 760px); justify-content: center; }
.dash-feed { display: grid; gap: 16px; min-width: 0; }
.dash-side { display: grid; gap: 16px; position: sticky; top: 76px; min-width: 0; grid-template-columns: 1fr !important; }
.dash-side:empty { display: none; }
.compose { padding: 12px 16px; }
.compose-h { display: flex; align-items: center; gap: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--line); margin-bottom: 10px; font-size: 15px; }
.compose-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.tile-btn { display: inline-flex; align-items: center; gap: 6px; background: var(--btn2); color: var(--ink); border: 0; border-radius: 6px; padding: 8px 12px; font-weight: 600; font-size: 14px; }
.tile-btn:hover { background: var(--btn2-hover); }
.tile-btn .ico { width: 16px; height: 16px; color: var(--brand); }
.tiles { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }

.need { padding: 0; overflow: hidden; }
.need-h { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 6px; }
.need-h h2 { margin: 0; font-size: 20px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.need-h h2 .ico { color: var(--brand); }
.need-h small { color: var(--muted); }
.nrows { padding: 4px 8px 8px; }
.nrow { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 8px; text-decoration: none; color: var(--ink); min-height: 56px; }
a.nrow:hover { background: var(--hover); }
.nrow .nbub { background: var(--brand-soft); color: var(--brand); }
.nrow.warn .nbub { background: #fff1e0; color: #c26a00; }
.nt { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 15px; font-weight: 600; }
.nt small { font-weight: 400; color: var(--muted); font-size: 13px; }
.ncount-big { font-size: 20px; min-width: 36px; text-align: center; background: var(--bad); color: #fff; border-radius: 16px; padding: 2px 10px; font-size: 15px; }
.nrow:not(.warn) .ncount-big { background: var(--brand); }
.ngo { color: var(--muted); }
.allclear { display: flex; align-items: center; gap: 10px; padding: 12px 8px; color: var(--ok); font-weight: 600; }
.quiet { display: flex; align-items: flex-start; gap: 8px; padding: 10px 16px; color: var(--muted); font-size: 13px; border-top: 1px solid var(--line); }
.quiet .ico { width: 16px; height: 16px; color: var(--ok); margin-top: 1px; }
.quiet b { color: var(--muted); font-weight: 600; }

.dsec { display: grid; gap: 12px; min-width: 0; }
.dsec-h { margin: 8px 0 0; font-size: 17px; font-weight: 700; display: flex; align-items: center; gap: 8px; color: var(--ink); }
.dsec-h .ico { width: 18px; height: 18px; color: var(--muted); }
.kpis { padding: 0; overflow: hidden; }
.kgrid { display: flex; flex-wrap: wrap; }
.kgrid:empty { display: none; }
.kpis.only-quiet .quiet { border-top: 0; }
.kpi { flex: 1 1 170px; max-width: 280px; box-shadow: inset -1px 0 var(--line), inset 0 -1px var(--line); background: var(--panel); padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: var(--ink); min-width: 0; }
a.kpi:hover { background: var(--hover); }
.kpi .kl { font-size: 13px; color: var(--muted); font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.kpi .kv { font-size: 26px; font-weight: 700; line-height: 1.15; color: var(--ink); }
a.kpi .kv { color: var(--brand); }
.kpi small { color: var(--muted); font-size: 12px; }
.tcard { padding: 0; overflow: hidden; }
.tcard > summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 12px 16px; cursor: pointer; }
.tcard > summary::-webkit-details-marker { display: none; }
.tcard > summary:hover { background: var(--hover); }
.tcard .tt { font-weight: 700; font-size: 15px; flex: 1; min-width: 0; }
.tcard .tm { color: var(--muted); font-size: 12px; white-space: nowrap; }
.tchev { width: 18px; height: 18px; color: var(--muted); transform: rotate(-90deg); transition: transform .2s; }
.tcard[open] .tchev { transform: none; }
.tscroll { overflow: auto; max-height: 360px; border-top: 1px solid var(--line); }
.dtable { border-collapse: collapse; width: 100%; font-size: 13px; }
.dtable th, .dtable td { padding: 8px 12px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
.dtable thead th { position: sticky; top: 0; background: #f7f8fa; color: var(--muted); font-weight: 600; font-size: 12px; z-index: 1; }
.dtable tbody th { position: sticky; left: 0; background: var(--panel); font-weight: 600; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.dtable td.num { text-align: right; font-variant-numeric: tabular-nums; }
.dtable tbody tr:hover td, .dtable tbody tr:hover th { background: var(--hover); }

.charts { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.card { background: var(--panel); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); min-width: 0; }
.card h3 { margin: 0 0 12px; font-size: 16px; font-weight: 700; }
.card.wide { grid-column: span 2; }
.card .big { font-size: 32px; font-weight: 700; text-align: center; padding: 12px 0; color: var(--ink); }
.card .empty { text-align: center; color: var(--muted); padding: 24px 0; }
.card .canvas { position: relative; height: 220px; }
.card table { width: 100%; border-collapse: collapse; font-size: 13px; }
.card td, .card th { border-bottom: 1px solid var(--line); padding: 6px 8px; text-align: left; }
.card .tbl { max-height: 260px; overflow: auto; }
.dash-side .card ul { padding-left: 18px; }

/* ---------- list screen ---------- */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.toolbar .grow { flex: 1; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; background: var(--btn2); color: var(--ink); border-radius: 6px; padding: 8px 14px;
  font-weight: 600; text-decoration: none; line-height: 1.25; }
.btn:hover { background: var(--btn2-hover); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.primary { background: var(--brand); color: var(--brand-ink); }
.btn.primary:hover { background: var(--brand-dark); }
.btn.danger { color: var(--bad); }
.toolbar .dd > button { background: var(--btn2); color: var(--ink); }
.toolbar .dd > button:hover, .toolbar .dd.open > button { background: var(--btn2-hover); }
.search { display: flex; align-items: center; border-radius: 50px; overflow: hidden; background: var(--panel); box-shadow: inset 0 0 0 1px var(--line-strong); }
.search select { border: 0; border-right: 1px solid var(--line); padding: 8px 10px; max-width: 160px; background: var(--bg); }
.search input { border: 0; padding: 8px 12px; width: 240px; outline: 0; background: none; }
.count { color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.chip { background: var(--brand-soft); color: var(--brand); border-radius: 14px; padding: 4px 10px; font-size: 13px; font-weight: 600; }
.chip button { border: 0; background: none; margin-left: 4px; color: var(--brand); }
.gridwrap { background: var(--panel); border-radius: var(--radius); overflow: auto; max-height: calc(100vh - 230px); box-shadow: var(--shadow); }
table.grid { border-collapse: collapse; width: 100%; font-size: 13px; }
.grid th { position: sticky; top: 0; background: #f7f8fa; font-size: 12px; font-weight: 600; color: var(--muted); padding: 10px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; cursor: pointer; text-align: left; z-index: 1; }
.grid td { padding: 8px; border-bottom: 1px solid var(--line); max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grid tbody tr:nth-child(even) { background: var(--row-alt); }
.grid tbody tr:hover { background: var(--hover); }
.grid tbody tr.sel { background: var(--sel); }
.grid td.num { text-align: right; font-variant-numeric: tabular-nums; }
.grid tfoot td { font-weight: 700; background: #f7f8fa; }
.pager { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 12px; flex-wrap: wrap; }
.pager select { padding: 4px 6px; border-radius: 6px; border: 1px solid var(--line-strong); background: var(--panel); }

/* ---------- form drawer ---------- */
.overlay { position: fixed; inset: 0; background: rgba(244, 244, 244, .8); display: flex; justify-content: flex-end; z-index: 50; }
.drawer { background: var(--panel); width: min(760px, 100%); height: 100%; display: flex; flex-direction: column; box-shadow: var(--shadow-lg); }
.drawer header { padding: 12px 16px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.drawer header h3 { margin: 0; flex: 1; font-size: 20px; font-weight: 700; }
.drawer header .iconbtn { background: var(--btn2); }
.drawer .body { padding: 16px; overflow: auto; flex: 1; }
.drawer footer { padding: 12px 16px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.drawer.wide { width: min(1280px, 100%); }
.drawer footer .dd .menu { top: auto; bottom: 100%; }
.drawer footer .dd > button { background: var(--btn2); color: var(--ink); }
.items-title { margin: 20px 0 8px; font-size: 16px; border-top: 1px solid var(--line); padding-top: 14px; }
.items-grid { max-height: 50vh; box-shadow: inset 0 0 0 1px var(--line); }
.items-grid td { overflow: visible; max-width: none; }
.items-grid input, .items-grid select { border: 1px solid var(--line-strong); border-radius: 6px; padding: 5px 7px; width: 110px; background: #fff; }
.items-grid .ac input { width: 190px; }
.items-grid input[type=number] { width: 90px; text-align: right; }
.fgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px 16px; }
.field { display: grid; gap: 4px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 13px; color: var(--muted); font-weight: 600; }
.field label .req { color: var(--bad); }
.field input, .field select, .field textarea { border: 1px solid var(--line-strong); border-radius: 6px; padding: 9px 10px; background: #fff; width: 100%; }
.field input:focus, .field select:focus, .field textarea:focus, .own-field input:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft); }
.field textarea { min-height: 70px; resize: vertical; }
.field .ro { padding: 9px 10px; background: var(--bg); border-radius: 6px; min-height: 38px; }
.field .multi { display: flex; flex-wrap: wrap; gap: 6px 12px; }
.ac { position: relative; }
.ac ul { position: absolute; z-index: 60; left: 0; right: 0; top: 100%; background: #fff; list-style: none; margin: 4px 0 0; padding: 6px; max-height: 220px; overflow: auto; box-shadow: var(--shadow-lg); border-radius: 8px; }
.ac li { padding: 7px 9px; cursor: pointer; border-radius: 6px; }
.ac li:hover { background: var(--hover); }

#toast { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); background: #242526; color: #fff; padding: 12px 18px; border-radius: 8px; opacity: 0; transition: opacity .2s; pointer-events: none; z-index: 99; box-shadow: var(--shadow-lg); font-weight: 500; }
#toast.show { opacity: 1; }
#toast.err { background: var(--bad); }

/* ---------- settings: left tabs + one page at a time ---------- */
.own-settings { max-width: 1100px; margin: 0 auto; }
.own-setgrid { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 20px; align-items: start; }
.own-setnav { padding: 8px; position: sticky; top: 76px; }
.own-setsearch { display: flex; align-items: center; gap: 6px; background: var(--bg); border-radius: 50px; padding: 0 12px; height: 38px; margin: 4px 4px 8px; color: var(--muted); }
.own-setsearch input { border: 0; background: none; outline: 0; flex: 1; min-width: 0; color: var(--ink); }
.own-tabs { display: grid; gap: 2px; }
.own-tab { display: flex; align-items: center; gap: 12px; border: 0; background: none; text-align: left; padding: 6px 8px; border-radius: 8px; font-weight: 500; font-size: 15px; min-height: 48px; }
.own-tab:hover { background: var(--hover); }
.own-tab .own-tab-t { flex: 1; }
.own-tab small { color: var(--muted); }
.own-tab.on { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.own-tab.on .nbub { background: var(--brand); color: #fff; }
.own-pane { display: grid; gap: 16px; min-width: 0; }
.own-pane-h h2 { margin: 4px 0 2px; font-size: 24px; font-weight: 700; }
.own-pane-h p { margin: 0; color: var(--muted); }
.own-set { display: grid; gap: 14px; }
.own-set h3 { margin: 0; }
.own-field { display: grid; gap: 6px; }
.own-field .own-flabel { font-size: 14px; font-weight: 600; color: var(--ink); }
.own-field input:not([type=checkbox]) { width: 100%; max-width: 560px; padding: 9px 10px; border: 1px solid var(--line-strong); border-radius: 6px; background: #fff; }
.own-switch label { display: flex; align-items: center; justify-content: space-between; gap: 16px; cursor: pointer; margin: 0 !important; }
.own-sw { display: inline-flex; align-items: center; gap: 8px; flex: none; }
.own-sw-state { font-size: 12px; color: var(--muted); min-width: 28px; }
input[role=switch] { appearance: none; -webkit-appearance: none; width: 44px !important; height: 24px; border-radius: 12px; background: var(--line-strong); position: relative; margin: 0 !important; cursor: pointer; transition: background .2s; border: 0 !important; padding: 0 !important; }
input[role=switch]::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px #0004; transition: transform .2s; }
input[role=switch]:checked { background: var(--brand); }
input[role=switch]:checked::after { transform: translateX(20px); }
.own-savebar { position: sticky; bottom: 0; display: flex; align-items: center; justify-content: flex-end; gap: 8px; background: var(--panel); padding: 12px 16px; border-radius: 8px; box-shadow: 0 -1px 0 var(--line), var(--shadow); z-index: 2; }
.own-dirty { flex: 1; color: var(--muted); }
.own-dirty.on { color: #c26a00; font-weight: 600; }
.own-warn { border-radius: 8px !important; }

/* feature pages: same card look */
.content .own-tile, .content .money-kpi, .content .store-kpi, .content .tap-card, .content .des-kpi { border-radius: 8px; }

/* ---------- phone / tablet ---------- */
.menu-toggle, .scrim { display: none; }
@media (max-width: 1100px) {
  .dash { grid-template-columns: minmax(0, 1fr); }
  .dash-side { position: static; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)) !important; }
}
/* small laptops / tablets in landscape: the page title, caller box and + Create keep their room; the search box opens from
   the search icon (as on phones, Ctrl+K still works) and Home is in the side menu */
@media (min-width: 861px) and (max-width: 1240px) {
  .top .find-toggle { display: inline-flex; }
  .top .tsearch { display: none; }
  .top.find-open .row { flex-wrap: wrap; }
  .top.find-open .tsearch { display: flex; order: 10; width: 100%; }
  .top .hide-sm { display: none; }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; left: 0; top: 0; width: 300px; max-width: 86vw; z-index: 40; transform: translateX(-102%); transition: transform .22s; box-shadow: var(--shadow-lg); }
  .shell.nav-open .side { transform: none; }
  .shell.nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, .35); z-index: 39; }
  .menu-toggle { display: inline-flex; }
  .hide-sm { display: none; }
  .top { padding: 0 10px; }
  .top .row { flex-wrap: wrap; gap: 6px; padding: 8px 0; min-height: 0; }
  .top .iconbtn { width: 36px; height: 36px; }
  .top .iconbtn .ico { width: 18px; height: 18px; }
  .top h2 { font-size: 18px; flex: 1 1 0; }
  .avatar { width: 36px; height: 36px; }
  .tsearch { order: 10; width: 100%; height: 38px; }
  .tsr { min-width: 0; }
  .card.wide { grid-column: auto; }
  .search { flex: 1 1 100%; }
  .search input { width: 100%; min-width: 0; }
  .content { padding: 12px 10px 40px; }
  .own-setgrid { grid-template-columns: minmax(0, 1fr); }
  .own-setnav { position: static; }
  .own-tabs { display: flex; overflow-x: auto; gap: 6px; padding-bottom: 4px; }
  .own-tab { flex: none; min-height: 40px; padding: 4px 12px 4px 4px; background: var(--bg); border-radius: 20px; font-size: 14px; }
  .own-tab .nbub { width: 30px; height: 30px; padding: 6px; }
  .own-tab small { display: none; }
  .kpi { flex-basis: 50%; max-width: none; }
  .need-h h2 { font-size: 18px; }
  .menubar { overflow-x: auto; flex-wrap: nowrap; }
  .drawer footer .btn { flex: 1 1 auto; }
}

/* ---------- motion: short, transform/opacity only, first render of a page only (app.js adds the classes) ---------- */
.da-in { animation: da-in .42s cubic-bezier(.2, .8, .2, 1) backwards; animation-delay: calc(var(--i, 0) * 45ms); }
@keyframes da-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.da-grow { transform-origin: left center; animation: da-grow .6s cubic-bezier(.2, .8, .2, 1) backwards .15s; }
.store-spark > .da-grow { transform-origin: center bottom; animation-name: da-grow-y; }
@keyframes da-grow { from { transform: scaleX(0); } }
@keyframes da-grow-y { from { transform: scaleY(0); } }
.card .big, .own-tile b, .tap-card b, .money-kpi b, .store-kpi b, .kpi .kv { font-variant-numeric: tabular-nums; }

/* sliding pill under a page's own menu tabs */
.menubar.has-pill { position: relative; }
.menubar.has-pill .dd > button:hover, .menubar.has-pill .dd.open > button { background: transparent; }
.menubar.has-pill .dd.cur > button { color: var(--brand); }
.tab-pill { position: absolute; left: 0; top: 0; width: 100px; height: 34px; z-index: 0; pointer-events: none; opacity: 0;
  background: var(--hover); border-radius: 6px; box-shadow: inset 0 -3px 0 var(--brand); transform-origin: left top;
  transition: transform .32s cubic-bezier(.2, .8, .2, 1), opacity .2s; will-change: transform; }
.menubar.has-pill .dd { z-index: 1; }
.menubar.has-pill .dd.open { z-index: 21; }

/* gentle hover lift */
@media (hover: hover) {
  .charts > .card, .own-tile, .tap-card, .money-kpi, .store-kpi, .service-item { transition: transform .18s ease, box-shadow .18s ease; }
  .own-tile:hover, .tap-card:hover, .money-kpi:hover, .store-kpi:hover, .service-item:hover { transform: translateY(-2px); box-shadow: 0 6px 18px #0000001a; }
  .btn, .tile-btn { transition: background-color .15s, transform .15s; }
  .btn:active, .tile-btn:active { transform: scale(.98); }
}

/* skeleton shimmer while a list or chart is loading */
.skel-rows td { padding: 10px 6px; }
.skel { display: block; height: 10px; border-radius: 5px; background: #e4e6eb; position: relative; overflow: hidden; }
.skel-rows tr:nth-child(odd) .skel { width: 82%; }
.skel::after, .card .skel-box::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, #ffffffb3, transparent); animation: da-shimmer 1.2s ease-in-out infinite; }
.card .skel-box { color: transparent; position: relative; overflow: hidden; min-height: 120px; margin: 4px 0; border-radius: 6px; background: #f0f2f5; }
@keyframes da-shimmer { to { transform: translateX(100%); } }

@media (prefers-reduced-motion: reduce) {
  .da-in, .da-grow, .skel::after, .card .skel-box::after { animation: none !important; }
  .tab-pill, .card, .tile-btn, .btn, .own-tile, .tap-card, .money-kpi, .store-kpi, .service-item, .side, .nchev, .tchev { transition: none !important; }
  .own-tile:hover, .tap-card:hover, .money-kpi:hover, .store-kpi:hover, .service-item:hover, .btn:active { transform: none; }
}
@media print { .da-in, .da-grow { animation: none !important; } .tab-pill { display: none; } .side, .top { display: none; } .shell { display: block; } }

/* ---------- shared pieces added for mobile (fix-ui 11-11-2026) ---------- */
.side-h { display: flex; align-items: center; justify-content: space-between; padding-right: 10px; }
.side-close, .find-toggle { display: none; }
.dd .menu .danger, .sheet .danger { color: var(--bad); }
.mnote { padding: 8px 10px; color: #8a5a00; background: #fff6e0; border-radius: 6px; font-size: 13px; margin: 4px 0; }
.chip { display: inline-flex; align-items: center; gap: 2px; }
.chip.fixed { background: var(--btn2); color: var(--ink); }
.chip.ghost { border: 1px dashed var(--brand); background: none; cursor: pointer; }
.chip button { min-width: 24px; min-height: 24px; font-size: 16px; line-height: 1; cursor: pointer; }
.grid tbody tr.go { cursor: pointer; }
.grid th.sortable { cursor: pointer; }
.grid th:not(.sortable) { cursor: default; }
.grid .cbx { width: 40px; text-align: center; cursor: pointer; }
.grid .cbx input, .mcb input { width: 18px; height: 18px; cursor: pointer; accent-color: var(--brand); }
.grid td.tlabel { color: var(--muted); font-weight: 600; white-space: nowrap; }
.vlink { display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 12px; background: var(--brand-soft); text-decoration: none; font-weight: 600; font-size: 12px; }
.empty-row { text-align: center; padding: 30px 12px !important; color: var(--muted); }
.empty-row .btn { margin-top: 10px; }
.empty-t { font-size: 15px; }
.list-tools .tbtns { display: contents; }
.list-tools .search { order: 1; }
.list-tools .tbtns > .grow, .list-tools .tbtns > .grow ~ * { order: 2; }
.tcards { display: none; }
.field.cbf { align-content: start; }
.field .multi .mopt { display: inline-flex; align-items: center; gap: 6px; }
.itabs { margin-bottom: 8px; }

/* ---------- left menu (redesign 11-11-2026): coloured groups, Pinned, Recent, filter, user card ---------- */
.side-h { padding: 4px 8px 0 0; min-height: 60px; }
.mini-toggle { background: none !important; color: var(--muted); }
.shell.nav-mini .mini-toggle .ico { transform: rotate(180deg); }
.nfind { display: flex; align-items: center; gap: 6px; margin: 4px 12px 6px; padding: 0 12px; height: 40px; border-radius: 20px; background: var(--bg); color: var(--muted); }
.nfind .ico { width: 18px; height: 18px; }
.nfind input { border: 0; background: none; outline: 0; flex: 1; min-width: 0; height: 100%; color: var(--ink); }
.navhost { flex: 1; overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; padding: 2px 8px 12px; }
.side nav { overflow: visible; padding: 0; }
.nsec { display: flex; align-items: center; gap: 6px; padding: 12px 10px 4px; font-size: 12px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: var(--muted); }
.nsec .ico { width: 14px; height: 14px; }
.nempty { padding: 16px 10px; color: var(--muted); }
.nlink { position: relative; min-height: 48px; }
.nlink.on { background: var(--brand-soft); color: var(--brand); font-weight: 600; box-shadow: inset 3px 0 0 var(--brand); }
.nlink.sm { min-height: 44px; font-size: 15px; padding-left: 58px; }
.nlink.sm::before { left: 30px; }
.nlink.rc { min-height: 38px; font-size: 14px; font-weight: 400; padding: 4px 10px 4px 16px; color: #1c1e21; }
.nlink.rc.on { font-weight: 600; }
.npins .nlink .nbub { background: #fff6dc; color: #b07800; }
.ngroups .ngrp { margin: 0 0 2px; }
.nhead { min-height: 48px; padding: 6px 8px; gap: 12px; justify-content: flex-start; color: var(--ink); font-size: 15px; font-weight: 600; }
.nhead > .nl { flex: 1; }
.ngrp.open > .nhead { background: var(--hover); }
.gicon { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 11px; flex: none;
  background: var(--t-bg, var(--brand-soft)); color: var(--t-fg, var(--brand)); }
.gicon .ico { width: 20px; height: 20px; }
.ncnt { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--bad); color: #fff; font-size: 12px; font-weight: 700; line-height: 20px; text-align: center; flex: none; }
.nstar { display: none; border: 0; background: none; width: 32px; height: 32px; border-radius: 50%; padding: 0; color: var(--line-strong); align-items: center; justify-content: center; flex: none; }
.nstar .ico { width: 16px; height: 16px; }
.nstar.on { color: #e4a11b; }
.nstar.on svg { fill: currentColor; }
@media (hover: hover) { .nlink:hover .nstar, .nlink:focus-visible .nstar, .npins .nstar { display: inline-flex; } .nstar:hover { background: var(--btn2); } }
.nmore { margin: 0; }
.nmore > summary { list-style: none; display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 4px 8px 4px 58px; color: var(--muted); font-size: 14px; font-weight: 600; cursor: pointer; border-radius: 8px; }
.nmore > summary::-webkit-details-marker { display: none; }
.nmore > summary:hover { background: var(--hover); }
.nmore[open] > summary .nchev { transform: rotate(180deg); }
/* edit mode */
.side.editing .navhost { background: #fbfcfe; }
.side.editing .nfind { opacity: .5; pointer-events: none; }
.side.editing .ngrp > .nhead, .side.editing .nlink { outline: 1px dashed var(--line-strong); outline-offset: -2px; cursor: grab; }
.side.editing .nlink.off .nl, .side.editing .nlink.off .nbub { opacity: .4; text-decoration: line-through; }
.ngrip { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; color: var(--muted); touch-action: none; flex: none; }
.ngrip .ico { width: 18px; height: 18px; }
.ngrip .ico svg { stroke-width: 3.2; }
.neye { border: 0; background: var(--btn2); width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; padding: 0; flex: none; }
.neye .ico { width: 16px; height: 16px; }
.nlink.dragging, .ngrp.dragging { position: relative; z-index: 5; background: var(--panel); box-shadow: var(--shadow-lg); border-radius: 8px; }
/* the user card at the bottom */
.side .foot.ucard { padding: 10px 12px 12px; display: grid; gap: 8px; font-size: 14px; color: var(--ink); }
.ucard-who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ucard-who .avatar { width: 40px; height: 40px; flex: none; }
.ucard-t { display: grid; min-width: 0; }
.ucard-t b, .ucard-t small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ucard-t small { color: var(--muted); }
.ucard-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.ucard-btns .btn { flex: 1 1 auto; min-height: 40px; padding: 6px 10px; font-size: 14px; }
.ucard-btns .btn .ico { width: 16px; height: 16px; }
.ucard-hint { margin: 0; font-size: 12px; color: var(--muted); }
/* desktop: narrow, icons-only menu (remembered) */
@media (min-width: 861px) {
  .shell.nav-mini { grid-template-columns: 76px minmax(0, 1fr); }
  .shell.nav-mini .side .logo, .shell.nav-mini .nfind, .shell.nav-mini .nsec, .shell.nav-mini .npins, .shell.nav-mini .nrecent,
  .shell.nav-mini .nl, .shell.nav-mini .nchev, .shell.nav-mini .nstar, .shell.nav-mini .ncnt, .shell.nav-mini .ngrp > .nbody,
  .shell.nav-mini .ucard-t, .shell.nav-mini .ucard-btns .btn > span:not(.ico), .shell.nav-mini .ucard-hint { display: none !important; }
  .shell.nav-mini .ucard-btns .btn { padding: 6px 0; }
  .shell.nav-mini .own-badge { position: absolute; top: 2px; right: 2px; transform: scale(.85); }
  .shell.nav-mini .side-h { justify-content: center; padding: 8px 0 0; }
  .shell.nav-mini .navhost { padding: 2px 6px 12px; }
  .shell.nav-mini .nlink, .shell.nav-mini .nhead { justify-content: center; padding: 6px 0; }
  .shell.nav-mini .ucard-who { justify-content: center; }
  .shell.nav-mini .ucard-btns { flex-direction: column; }
}
@media (max-width: 860px) {
  .mini-toggle { display: none !important; }
  .side { height: 100vh; height: 100dvh; width: 320px; max-width: 88vw; }
  .side .side-close { width: 48px; height: 48px; }
  .nfind { height: 44px; }
  .nstar { display: none !important; }
}

/* Home launcher: big section icons */
.launch { padding: 12px 8px; }
.launch-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; }
.ltile { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 8px; min-height: 96px; padding: 10px 4px 8px;
  border-radius: 10px; text-decoration: none; color: var(--ink); text-align: center; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.ltile:hover, .ltile:focus-visible { background: var(--hover); }
.ltile:active .licon { transform: scale(.94); }
.licon { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 60px; height: 60px; border-radius: 18px; flex: none;
  background: var(--t-bg, var(--brand-soft)); color: var(--t-fg, var(--brand)); transition: transform .12s; }
.licon > .ico { width: 30px; height: 30px; }
.licon > .ico svg { stroke-width: 1.8; }
.licon.sm { width: 36px; height: 36px; border-radius: 11px; }
.licon.sm > .ico { width: 20px; height: 20px; }
.llabel { font-size: 13px; font-weight: 600; line-height: 1.2; max-width: 100%; overflow-wrap: anywhere; }
.lbadge { position: absolute; top: -6px; right: -8px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--bad); color: #fff;
  font-size: 12px; font-weight: 700; line-height: 22px; text-align: center; box-shadow: 0 0 0 2px var(--panel); }
[data-tint=blue] { --t-bg: #e7f3ff; --t-fg: #1877f2; }
[data-tint=green] { --t-bg: #e3f4e8; --t-fg: #1e7b3a; }
[data-tint=teal] { --t-bg: #dff3f1; --t-fg: #0b7a70; }
[data-tint=orange] { --t-bg: #fff1e0; --t-fg: #c26a00; }
[data-tint=purple] { --t-bg: #f1e8fb; --t-fg: #7a3fc0; }
[data-tint=brown] { --t-bg: #f6ece2; --t-fg: #8a5a2c; }
[data-tint=indigo] { --t-bg: #e8ebfb; --t-fg: #3b4cc0; }
[data-tint=pink] { --t-bg: #fde8f1; --t-fg: #c2185b; }
[data-tint=red] { --t-bg: #fde7ea; --t-fg: #d0213b; }
[data-tint=cyan] { --t-bg: #e0f4fa; --t-fg: #0b7fa6; }
[data-tint=slate] { --t-bg: #e9edf2; --t-fg: #44546a; }
[data-tint=grey] { --t-bg: #eceef1; --t-fg: #4b4f56; }
.sec-page .need-h h2 .licon { margin-right: 2px; }
/* rearranging the icons */
.launch-h { display: flex; align-items: center; gap: 8px; padding: 0 8px 8px; }
.launch-h > b { font-size: 15px; }
.launch-h .grow { flex: 1; }
.launch-status { color: var(--muted); }
.launch-h .btn { padding: 6px 12px; min-height: 36px; }
.launch-h .btn .ico { width: 16px; height: 16px; }
.launch-hint { margin: 0 8px 8px; padding: 8px 10px; border-radius: 8px; background: var(--brand-soft); color: #0b4fa8; font-size: 13px; }
.launch-grid { position: relative; }
.ltile { position: relative; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.ltile.dragging { z-index: 5; background: var(--panel); box-shadow: var(--shadow-lg); cursor: grabbing; transition: none; }
.launch.dragging-on .ltile:not(.dragging):hover { background: none; }
.launch.editing .ltile { cursor: grab; outline: 1px dashed var(--line-strong); outline-offset: -2px; }
.launch.editing .ltile:not(.dragging) .licon { animation: da-wiggle .9s ease-in-out infinite; }
.launch.editing .ltile:nth-child(2n) .licon { animation-delay: -.45s; }
.launch.editing .lbadge { display: none; }
.ltile.off .licon, .ltile.off .llabel { opacity: .35; filter: grayscale(1); }
.lgrip { position: absolute; top: 4px; left: 4px; width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); touch-action: none; border-radius: 6px; }
.lgrip .ico { width: 18px; height: 18px; }
.lgrip .ico svg { stroke-width: 3.2; }
.leye { position: absolute; top: 2px; right: 2px; width: 32px; height: 32px; border: 0; border-radius: 50%; background: var(--btn2); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.leye .ico { width: 16px; height: 16px; }
.leye:hover { background: var(--btn2-hover); }
@keyframes da-wiggle { 0%, 100% { transform: rotate(-2deg); } 50% { transform: rotate(2deg); } }
@media (prefers-reduced-motion: reduce) { .launch.editing .ltile .licon { animation: none; } }
@media (max-width: 860px) {
  .launch-h .btn { min-height: 40px; }
  .launch-h .launch-reset > span:not(.ico) { display: none; }
  .launch-h .launch-reset { min-width: 44px; }
  .leye { width: 36px; height: 36px; top: 0; right: 0; }
  .lgrip { width: 32px; height: 32px; top: 0; left: 0; }
}
@media (max-width: 700px) {
  .launch { padding: 10px 4px; }
  .launch-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2px; }
  .licon { width: 56px; height: 56px; border-radius: 16px; }
  .licon > .ico { width: 28px; height: 28px; }
  .ltile { min-height: 92px; padding: 8px 2px; }
}
@media (max-width: 400px) {
  .launch-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
  .ltile { min-height: 96px; }
}

/* bottom sheet (phones) / centred picker */
.sheet-bg { position: fixed; inset: 0; background: rgba(0, 0, 0, 0); z-index: 90; display: flex; align-items: flex-end; justify-content: center; transition: background .18s; }
.sheet-bg.on { background: rgba(0, 0, 0, .4); }
.sheet { background: var(--panel); width: 100%; max-width: 560px; max-height: 80vh; max-height: 80dvh; border-radius: 16px 16px 0 0; box-shadow: var(--shadow-lg); display: flex; flex-direction: column;
  transform: translateY(16px); transition: transform .2s cubic-bezier(.2, .8, .2, 1); padding-bottom: env(safe-area-inset-bottom, 0); }
.sheet-bg.on .sheet { transform: none; }
.sheet-bg.center { align-items: center; }
.sheet-bg.center .sheet { border-radius: 12px; width: min(440px, calc(100% - 24px)); }
.sheet-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px 8px 16px; border-bottom: 1px solid var(--line); }
.sheet-h b { font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sheet-h .iconbtn { background: var(--btn2); }
.sheet-list { overflow: auto; padding: 6px 8px 12px; -webkit-overflow-scrolling: touch; }
.sheet-list > a, .sheet-list > button { display: flex; align-items: center; width: 100%; min-height: 48px; padding: 10px 12px; text-align: left; border: 0; background: none;
  border-radius: 8px; color: var(--ink); text-decoration: none; font-weight: 500; font-size: 15px; }
.sheet-list > a:hover, .sheet-list > button:hover, .sheet-list > button:active { background: var(--hover); }
.sheet-list > button:disabled { color: #a8acb1; }
.sheet-list > button.danger { color: var(--bad); }
.sheet-list .grp { padding: 12px 12px 4px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); }
.sheet-el { padding: 4px 4px; }
.sheet-el > * { width: 100%; min-height: 48px; justify-content: flex-start; }
.sheet-el .dd > button { width: 100%; text-align: left; min-height: 48px; }
.fpick { display: grid; gap: 12px; padding: 8px 6px 4px; }
.fpick input[type=text], .fpick input[type=date], .fpick .ac input { width: 100%; min-height: 44px; border: 1px solid var(--line-strong); border-radius: 8px; padding: 8px 10px; font-size: 16px; }
.fpick-b { display: flex; gap: 8px; justify-content: flex-end; }
.fpick-b .btn { min-height: 44px; min-width: 96px; }
.fopts { display: grid; gap: 2px; }
.fopt { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 6px; border-radius: 8px; cursor: pointer; }
.fopt:hover { background: var(--hover); }
.fopt input { width: 20px; height: 20px; accent-color: var(--brand); }
.fother { margin-top: 6px; }

/* phone list cards */
.mcards { display: grid; gap: 8px; }
.mcard { display: flex; align-items: flex-start; gap: 4px; background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow); padding: 10px 8px 10px 0; cursor: pointer;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.mcard:active { background: var(--hover); }
.mcard.sel { background: var(--sel); box-shadow: inset 0 0 0 2px var(--brand); }
.mcb { display: flex; align-items: center; justify-content: center; width: 44px; min-height: 44px; flex: none; cursor: pointer; }
.mcb input { width: 22px; height: 22px; }
.mbody { flex: 1; min-width: 0; display: grid; gap: 3px; }
.mtop { display: flex; align-items: baseline; gap: 8px; justify-content: space-between; }
.mtitle { font-size: 15px; font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mmoney { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.mparty { color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mmeta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--muted); font-size: 13px; }
.mmeta:empty { display: none; }
.mdate { white-space: nowrap; }
.schip { display: inline-flex; padding: 2px 8px; border-radius: 10px; font-size: 12px; font-weight: 700; background: var(--btn2); color: var(--ink); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.schip[class*="s-confirm"], .schip[class*="s-complet"], .schip[class*="s-paid"], .schip[class*="s-active"], .schip[class*="s-closed"], .schip[class*="s-fully"], .schip[class*="s-approved"], .schip[class*="s-done"] { background: #e3f4e8; color: #1e7b3a; }
.schip[class*="s-pending"], .schip[class*="s-draft"], .schip[class*="s-open"], .schip[class*="s-unpaid"], .schip[class*="s-scheduled"], .schip[class*="s-ready"], .schip[class*="s-partly"] { background: #fff1e0; color: #a35a00; }
.schip[class*="s-cancel"], .schip[class*="s-reject"], .schip[class*="s-lost"], .schip[class*="s-overdue"] { background: #fde7ea; color: var(--bad); }
.mextra { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1px 8px; margin: 2px 0 0; font-size: 13px; }
.mextra dt { color: var(--muted); }
.mextra dd { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mgo { color: var(--line-strong); align-self: center; width: 18px; height: 18px; margin-right: 4px; }
.mtotals { display: flex; flex-wrap: wrap; gap: 4px 14px; padding: 10px 12px; margin-top: 8px; background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow); font-size: 13px; color: var(--muted); }
.mtotals > b { width: 100%; color: var(--ink); }
.gridwrap.as-cards { background: none; box-shadow: none; overflow: visible; max-height: none; }

/* phone item line cards inside a form */
.items-cards .lcards { display: grid; gap: 10px; }
.lcard { border: 1px solid var(--line-strong); border-radius: 10px; padding: 8px 10px 10px; background: #fff; }
.lcard-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.lcard-h .rm { width: 40px; height: 40px; background: var(--btn2); color: var(--bad); }
.lgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 10px; }
.lf { display: grid; gap: 3px; min-width: 0; }
.lf:has(.ac), .lf:has(input[type=text]), .lf:first-child { grid-column: 1 / -1; }
.lf > label { font-size: 12px; color: var(--muted); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lf input, .lf select { width: 100%; min-height: 44px; border: 1px solid var(--line-strong); border-radius: 8px; padding: 8px 10px; background: #fff; font-size: 16px; }
.lf.num input { text-align: right; }
.lf.ro .rov { display: block; min-height: 44px; padding: 11px 10px; background: var(--bg); border-radius: 8px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lf.ro.num .rov { text-align: right; font-variant-numeric: tabular-nums; }
.lmore { margin-top: 8px; }
.lmore > summary { min-height: 40px; display: flex; align-items: center; color: var(--brand); font-weight: 600; cursor: pointer; }
.ltotals { display: flex; flex-wrap: wrap; gap: 4px 14px; padding: 10px; margin-top: 8px; background: var(--brand-soft); border-radius: 8px; font-size: 14px; }

/* ---------- phones and small tablets ---------- */
@media (max-width: 860px) {
  .side { box-shadow: none; }
  .shell.nav-open .side { box-shadow: var(--shadow-lg); }
  .side-close { display: inline-flex; background: var(--btn2) !important; }
  .nhead { min-height: 44px; }
  .nlink.sm { min-height: 44px; }
  .side .foot select { min-height: 40px; }
  /* one-row sticky top bar: search lives behind the search icon */
  .top { padding: 0 8px; }
  .top .row { flex-wrap: nowrap; gap: 4px; padding: 6px 0; min-height: 56px; }
  .top .iconbtn { width: 44px; height: 44px; }
  .avatar { width: 44px; height: 44px; }
  .find-toggle { display: inline-flex; }
  .tsearch { display: none; }
  .top.find-open .row { flex-wrap: wrap; }
  .top.find-open .tsearch { display: flex; order: 10; width: 100%; height: 44px; }
  .top.find-open .find-toggle { background: var(--brand-soft); color: var(--brand); }
  .tsearch .own-mic, .own-setsearch .own-mic { min-width: 40px; min-height: 40px; justify-content: center; }
  .tsr { max-height: calc(100vh - 140px); max-height: calc(100dvh - 140px); }
  .tsr a { min-height: 44px; align-items: center; }
  .top h2 { font-size: 17px; line-height: 1.15; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word; margin: 0 2px; }
  .menubar { overflow: visible; flex-wrap: nowrap; padding: 4px 0 6px; }
  .menubar .page-actions > button { background: var(--btn2); color: var(--ink); min-height: 40px; }
  /* touch sizes */
  .btn, .tile-btn, .toolbar .dd > button, .drawer footer .dd > button { min-height: 44px; }
  .dd .menu a, .dd .menu button { min-height: 44px; display: flex; align-items: center; }
  input, select, textarea, .tsearch input, .search input, .items-grid input { font-size: 16px; }
  .field input, .field select { min-height: 44px; }
  .field .ro { min-height: 44px; }
  .field .multi { gap: 4px 14px; }
  .field .multi .mopt { min-height: 44px; }
  .field .multi input, .field.cbf input[type=checkbox] { width: 22px; height: 22px; }
  .pager .btn { min-width: 44px; }
  .pager select { min-height: 44px; }
  .grid th, .ncount, .tcard .tm, .dtable thead th { font-size: 13px; }
  .grid .cbx { width: 48px; }
  .grid .cbx input { width: 22px; height: 22px; }
  .vlink { min-height: 32px; padding: 4px 12px; }
  .gridwrap { max-height: none; }
  /* list toolbar: full-width search, then the buttons in one row */
  .list-tools { gap: 8px; }
  .list-tools .search { flex: 1 1 100%; height: 44px; order: 0; }
  .list-tools .search .qcol { display: none; }
  .list-tools .tbtns { display: flex; align-items: center; gap: 8px; width: 100%; }
  .list-tools .count { font-size: 13px; white-space: nowrap; }
  /* settings switches: label left, switch right with room */
  .own-switch label { align-items: center; }
  .own-switch .own-flabel { flex: 1; min-width: 0; }
  .own-sw { margin-left: 12px; min-height: 44px; }
  input[role=switch] { width: 52px !important; height: 30px; border-radius: 15px; }
  input[role=switch]::after { width: 24px; height: 24px; }
  input[role=switch]:checked::after { transform: translateX(22px); }
  .own-tabs { scroll-padding-inline: 12px; padding-left: 2px; }
  /* form drawer: full screen, one footer row, the body scrolls above it */
  .drawer, .drawer.wide { width: 100%; max-height: 100%; }
  .drawer header { padding: 8px 8px 8px 14px; }
  .drawer header h3 { font-size: 18px; }
  .drawer header .iconbtn { width: 44px; height: 44px; }
  .drawer .body { padding: 12px 12px 24px; overscroll-behavior: contain; }
  .drawer footer.one-row { flex-wrap: nowrap; padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0)); }
  .drawer footer.one-row .btn { flex: 0 0 auto; }
  .drawer footer.one-row .btn.save { flex: 1 1 auto; }
  .fgrid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .itabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .itabs .btn { flex: none; }
  .items-grid { max-height: none; }
  /* dashboards */
  .tcard .tscroll { display: none; }
  .tcards { display: grid; gap: 8px; padding: 10px; border-top: 1px solid var(--line); }
  .tcard-row { background: var(--bg); border-radius: 8px; padding: 8px 10px; }
  .tcard-row > b { display: block; margin-bottom: 4px; }
  .tcard-row dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 12px; margin: 0; font-size: 13px; }
  .tcard-row dt { color: var(--muted); }
  .tcard-row dd { margin: 0 0 4px; font-weight: 600; font-variant-numeric: tabular-nums; }
  .content .card { overflow-x: auto; }
  .content .card.tcard, .content .card.need, .content .card.kpis { overflow: hidden; }
}
@media (max-width: 400px) {
  .top h2 { font-size: 16px; }
  .list-tools .tbtns .btn { padding: 8px 10px; }
}

/* masked key fields (CSS mask, not type=password, so no browser autofill) */
.own-masked { -webkit-text-security: disc; text-security: disc; font-family: monospace; }

/* ---------- final mobile pass (11-11-2026): nothing wider than the phone, 40 px+ tap targets ---------- */
/* one card column that can shrink: a long item name ellipses inside the card instead of widening the page */
.mcards { grid-template-columns: minmax(0, 1fr); }
.mcard, .mbody, .mtop, .mextra, .mextra dd { min-width: 0; }
.mtitle, .mparty { overflow-wrap: anywhere; }
.tcard-row dd, .kpi small { overflow-wrap: anywhere; }
td.neg, dd.neg, .neg { color: var(--bad); }
.vlink.tel { font-variant-numeric: tabular-nums; }
@media (max-width: 860px) {
  /* safety net: a page never scrolls sideways (tables and wide cards scroll inside their own box) */
  html, body { overflow-x: clip; }
  .main, .content, .content > * { min-width: 0; max-width: 100%; }
  /* search box and the voice mic */
  .list-tools .search input, .search input[type=search] { min-height: 44px; }
  .search .own-mic, .list-tools .own-mic, .own-setsearch .own-mic { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; border: 0; padding: 0; margin: 0; }
  .own-setsearch { min-height: 44px; }
  /* filter chip x: a 40 px hit area without making the chip itself tall */
  .chip { min-height: 32px; }
  .chip button { min-width: 40px; min-height: 40px; margin: -6px -10px -6px -2px; border-radius: 50%; }
  .chips { gap: 8px; }
  /* checkboxes and links */
  .mcb input, .grid .cbx input, .field.cbf input[type=checkbox], .content input[type=checkbox] { width: 24px; height: 24px; }
  .content label:has(> input[type=checkbox]) { min-height: 44px; display: inline-flex; align-items: center; gap: 8px; }
  .vlink { min-height: 40px; padding: 6px 14px; font-size: 14px; }
  .content a[href^="tel:"], .content a[href^="#/s/"]:not(.nrow):not(.kpi):not(.ltile):not(.btn), .content .card a[href^="#/x/"]:not(.nrow):not(.kpi):not(.ltile):not(.btn) { display: inline-flex; align-items: center; min-height: 40px; }
  .content small { overflow-wrap: anywhere; }
  /* every box you type in or pick from */
  .content input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([role=switch]), .content select, .content textarea,
  .sheet input:not([type=checkbox]):not([type=radio]), .sheet select, .drawer input:not([type=checkbox]):not([type=radio]):not([type=file]), .drawer select { min-height: 44px; }
  .content button:not(.iconbtn):not([role=switch]) { min-height: 40px; }
  .lay-tab { min-height: 44px; }
  .leaflet-touch .leaflet-bar a { width: 44px; height: 44px; line-height: 44px; }
  .nrecent a.nlink, .npins a.nlink { min-height: 44px; }
}

/* ---------- desktop density (owner 11-11-2026: "so much white space"): use the width, cards side by side ---------- */
@media (min-width: 1025px) {
  /* one grid for the whole page: feed cards and the side cards (Technicians, margin ...) share the columns */
  .dash, .dash.no-side { --cols: 2; display: grid; max-width: 1600px; margin: 0; gap: 12px; grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
    grid-auto-flow: row dense; align-items: start; justify-content: stretch; }
  .dash-feed, .dash-side { display: contents; }
  .dash > .dash-feed > *, .dash-side > * { grid-column: 1 / -1; order: 3; min-width: 0; }
  .dash-feed > .launch { order: 0; }
  .dash-feed > .compose, .dash-feed > .need { order: 1; }
  .dash-side > * { order: 2; grid-column: span 1; position: static; }
  .dash-feed.home > .compose, .dash-feed.home > .need { grid-column: span 1; }
  .dash > .dash-feed > .dsec[data-solo="1"] { grid-column: span 1; --cols: 1; }
  /* sections: header across, then KPI card + small tables / charts side by side, wide tables across */
  .dsec { grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: 12px; align-items: start; }
  .dsec > * { grid-column: span 1; }
  .dsec > .dsec-h { grid-column: 1 / -1; font-size: 18px; margin: 8px 0 0; }
  .dsec > .kpis { grid-column: 1 / -1; }
  .dsec > .kpis[data-n="0"], .dsec > .kpis[data-n="1"], .dsec > .kpis[data-n="2"] { grid-column: span 1; }
  .dsec > .tcard.twide { grid-column: 1 / -1; }
  .kpi { flex: 1 1 150px; max-width: none; padding: 12px 16px; }
  .kpi .kv { font-size: 24px; }
  .quiet { padding: 8px 16px; }
  /* "Create new": one compact row */
  .compose { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; padding: 10px 16px; }
  .compose-h { border: 0; padding: 0; margin: 0; font-size: 14px; flex: none; }
  .compose-h .avatar.sm { width: 28px; height: 28px; }
  .compose-btns { gap: 6px; }
  .tile-btn { padding: 6px 10px; }
  .need-h { padding: 12px 16px 4px; }
  .need-h h2 { font-size: 18px; }
  .nrow { min-height: 48px; padding: 6px 8px; }
  .tcard > summary { padding: 10px 16px; }
  /* section pages (#/x/sec/...): the screen list in columns */
  .sec-page .nrows { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 2px 8px; }
}
@media (min-width: 1440px) {
  .dash, .dash.no-side { --cols: 3; }
  .dash-feed.home > .launch { grid-column: span 2; }
  .dsec > .kpis[data-n="3"], .dsec > .kpis[data-n="4"] { grid-column: span 2; }
  .dsec > .kpis[data-n="0"], .dsec > .kpis[data-n="1"], .dsec > .kpis[data-n="2"] { grid-column: span 1; }
  .dsec > .tcard.twide { grid-column: span 2; }
  .dsec > .tcard.xwide { grid-column: 1 / -1; }
}

/* ws: WP0 workspace slots (docs/WORKSPACE-HOOKS.md). An empty slot is hidden, so nothing shows until a ws_*.js file fills it. */
.da-slot:empty { display: none; }
.da-slot-top { display: flex; align-items: center; gap: 6px; flex: none; }
.da-slot-bottom { display: none; }
@media (max-width: 860px) {
  .da-slot-bottom:not(:empty) { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 35; min-height: 56px; gap: 4px;
    padding: 4px 8px calc(4px + env(safe-area-inset-bottom)); background: var(--panel); box-shadow: 0 -1px 3px rgba(0, 0, 0, .12);
    align-items: stretch; justify-content: space-around; }
  .shell.has-bbar .content { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
}
.grid .da-ract { white-space: nowrap; }
.mcard .da-ract { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
@media print { .da-slot { display: none !important; } }
