/* iMedia Suite — feuille de style commune (portail, iTerrain). Thème sombre « Graphite » / clair « Studio ». */
:root {
  --accent: #e30613;
  --brand: #0b1d3a;
  --r: 10px; --r-s: 7px;
  --side-w: 244px; --top-h: 58px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b0c0e; --bg2: #111215; --bg3: #17181c; --panel: #141518; --line: #24262c; --line2: #32353d;
  --tx: #ededf0; --tx2: #b4b8c2; --tx3: #7d818c; --input: #0e0f12; --hover: #1d1f24;
  --shadow: 0 1px 2px rgba(0,0,0,.5), 0 10px 30px rgba(0,0,0,.4);
  --ok: #22c55e; --ok-bg: rgba(34,197,94,.13); --bad: #f43f5e; --bad-bg: rgba(244,63,94,.13);
  --warn: #f59e0b; --warn-bg: rgba(245,158,11,.14); --info: #38bdf8; --info-bg: rgba(56,189,248,.13);
  --mut-bg: rgba(148,163,184,.12); --vio: #a78bfa; --vio-bg: rgba(167,139,250,.14);
}
html[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f4f6; --bg2: #ffffff; --bg3: #f0f0f3; --panel: #ffffff; --line: #e3e4e9; --line2: #cfd1d8;
  --tx: #111216; --tx2: #474a53; --tx3: #7a7e89; --input: #ffffff; --hover: #f1f1f4;
  --shadow: 0 1px 2px rgba(17,18,22,.05), 0 6px 20px rgba(17,18,22,.07);
  --ok: #15803d; --ok-bg: #dcfce7; --bad: #be123c; --bad-bg: #ffe4e6;
  --warn: #b45309; --warn-bg: #fef3c7; --info: #0369a1; --info-bg: #e0f2fe;
  --mut-bg: #eceef2; --vio: #6d28d9; --vio-bg: #ede9fe;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 14.5px/1.5 var(--font); background: var(--bg); color: var(--tx); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0 0 .5em; line-height: 1.25; letter-spacing: -.01em; }
h1 { font-size: 1.45rem; } h2 { font-size: 1.05rem; } h3 { font-size: .95rem; }
p { margin: .3em 0; }
hr { border: 0; border-top: 1px solid var(--line); margin: 10px 0; }
code, .mono { font-family: var(--mono); font-size: .92em; }
.ic { flex: none; vertical-align: middle; }
.muted { color: var(--tx2); } .dim { color: var(--tx3); } .small { font-size: .86em; } .xs { font-size: .78em; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.nowrap { white-space: nowrap; } .right { text-align: right; } .center { text-align: center; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; } .row.top { align-items: flex-start; } .row.nw { flex-wrap: nowrap; }
.grow { flex: 1; min-width: 0; }
.stack > * + * { margin-top: 12px; }
.mt { margin-top: 16px; } .mb { margin-bottom: 16px; } .mt0 { margin-top: 0; } .mb0 { margin-bottom: 0; }
.hidden, [hidden] { display: none !important; }

/* ---------- Structure ---------- */
.app { display: flex; min-height: 100vh; }
.side { width: var(--side-w); background: var(--bg2); border-right: 1px solid var(--line); position: fixed; inset: 0 auto 0 0; display: flex; flex-direction: column; z-index: 40; transition: transform .22s ease; }
.brand { display: flex; gap: 10px; align-items: center; padding: 12px 16px; min-height: var(--top-h); border-bottom: 1px solid var(--line); color: var(--tx); text-decoration: none !important; }
.logo-mark { width: 34px; height: 34px; border-radius: 9px; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 13px; letter-spacing: -.02em; position: relative; overflow: hidden; flex: none; }
.logo-mark::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--accent); }
.brand-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.brand-txt small { color: var(--tx3); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav { padding: 10px; flex: 1; overflow-y: auto; }
.nav-sec { font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--tx3); font-weight: 700; padding: 14px 12px 5px; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 7px 12px; border-radius: 8px; color: var(--tx2); font-weight: 500; text-decoration: none; margin-bottom: 2px; }
.nav a:hover { background: var(--hover); color: var(--tx); }
.nav a.on { background: color-mix(in srgb, var(--accent) 15%, transparent); color: var(--tx); box-shadow: inset 3px 0 0 var(--accent); }
.nav a .cnt { margin-left: auto; font-size: 11px; background: var(--mut-bg); color: var(--tx2); border-radius: 20px; padding: 0 7px; font-weight: 600; }
.side-foot { padding: 10px 14px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.user-chip { display: flex; align-items: center; gap: 8px; min-width: 0; color: var(--tx2); font-size: 13px; }
.user-chip b { width: 28px; height: 28px; border-radius: 50%; background: var(--bg3); border: 1px solid var(--line2); display: grid; place-items: center; font-size: 11px; color: var(--tx); flex: none; }
.user-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.main { flex: 1; margin-left: var(--side-w); min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 30; height: var(--top-h); display: flex; align-items: center; gap: 12px; padding: 0 22px; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top-title { font-weight: 650; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.content { padding: 22px; max-width: 1280px; width: 100%; margin: 0 auto; padding-bottom: 70px; }
.content.narrow { max-width: 860px; }
.scrim, .tabbar { display: none; }
.only-m { display: none !important; }
.page-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head h1 { margin: 0; }
.page-head .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Composants ---------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; box-shadow: var(--shadow); }
.card + .card { margin-top: 16px; }
.card-h { display: flex; align-items: center; gap: 10px; margin: -2px 0 14px; }
.card-h h2 { margin: 0; display: flex; align-items: center; gap: 8px; }
.card-h .actions { margin-left: auto; display: flex; gap: 6px; }
.card.flush { padding: 0; overflow: hidden; }
.card.flush > .card-h { padding: 14px 18px 0; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.span2 { grid-column: span 2; } .spanall { grid-column: 1 / -1; }
.cols { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--line2); background: var(--bg2); color: var(--tx); font: inherit; font-weight: 550; font-size: 14px; cursor: pointer; text-decoration: none !important; white-space: nowrap; transition: background .12s, border-color .12s; }
.btn:hover { background: var(--hover); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, var(--line2)); }
.btn.danger:hover { background: var(--bad-bg); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--tx2); }
.btn.ghost:hover { background: var(--hover); color: var(--tx); }
.btn.sm { height: 30px; padding: 0 10px; font-size: 13px; border-radius: 7px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .55; cursor: default; }
.btn-icon { width: 36px; height: 36px; display: inline-grid; place-items: center; border-radius: 8px; border: 1px solid transparent; background: transparent; color: var(--tx2); cursor: pointer; text-decoration: none !important; }
.btn-icon:hover { background: var(--hover); color: var(--tx); }
.btn-icon.sm { width: 30px; height: 30px; }

label.f { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
label.f > span, .lbl { font-size: 12.5px; color: var(--tx2); font-weight: 550; }
.input, select.input, textarea.input { width: 100%; height: 38px; padding: 0 11px; border: 1px solid var(--line2); border-radius: 8px; background: var(--input); color: var(--tx); font: inherit; font-size: 14.5px; outline: none; transition: border-color .12s, box-shadow .12s; }
textarea.input { height: auto; min-height: 76px; padding: 9px 11px; resize: vertical; line-height: 1.45; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.input.sm { height: 32px; font-size: 13.5px; }
.input.mono { font-family: var(--mono); }
.hint { font-size: 12px; color: var(--tx3); }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; }
.check input { width: 17px; height: 17px; accent-color: var(--accent); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 13px; border: 1px solid var(--line2); border-radius: 20px; background: var(--bg2); color: var(--tx2); cursor: pointer; font-weight: 550; font-size: 13.5px; user-select: none; }
.chip input { display: none; }
.chip:has(input:checked), .chip.on { background: color-mix(in srgb, var(--accent) 16%, transparent); border-color: var(--accent); color: var(--tx); }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 20px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--mut-bg); color: var(--tx2); }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.b-ok { background: var(--ok-bg); color: var(--ok); } .b-bad { background: var(--bad-bg); color: var(--bad); }
.b-warn { background: var(--warn-bg); color: var(--warn); } .b-info { background: var(--info-bg); color: var(--info); }
.b-vio { background: var(--vio-bg); color: var(--vio); } .b-mut { background: var(--mut-bg); color: var(--tx3); }

.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--tx3); font-weight: 650; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr.link { cursor: pointer; }
.tbl tbody tr.link:hover td { background: var(--hover); }
.tbl .t-main { font-weight: 600; color: var(--tx); }
.tbl-wrap { overflow-x: auto; }

.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; color: var(--tx); text-decoration: none !important; display: block; box-shadow: var(--shadow); }
.kpi:hover { border-color: var(--line2); }
.kpi small { display: block; color: var(--tx3); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.kpi b { display: block; font-size: 26px; font-weight: 750; letter-spacing: -.02em; margin-top: 2px; font-variant-numeric: tabular-nums; }
.kpi.accent b { color: var(--accent); }

.flash { padding: 11px 14px; border-radius: 9px; margin-bottom: 14px; display: flex; gap: 10px; align-items: flex-start; font-weight: 500; }
.flash .flash-x { margin-left: auto; background: none; border: 0; color: inherit; cursor: pointer; font-size: 18px; line-height: 1; opacity: .7; }
.f-ok { background: var(--ok-bg); color: var(--ok); } .f-err { background: var(--bad-bg); color: var(--bad); }
.f-warn { background: var(--warn-bg); color: var(--warn); } .f-info { background: var(--info-bg); color: var(--info); }

.empty { text-align: center; padding: 40px 20px; color: var(--tx3); }
.empty .ic { width: 38px; height: 38px; opacity: .6; margin-bottom: 8px; }

.search { display: flex; align-items: center; gap: 8px; background: var(--input); border: 1px solid var(--line2); border-radius: 8px; padding: 0 11px; color: var(--tx3); height: 38px; min-width: 220px; }
.search input { border: 0; outline: 0; background: transparent; color: var(--tx); font: inherit; flex: 1; min-width: 0; height: 100%; }
.search:focus-within { border-color: var(--accent); }
.seg { display: inline-flex; border: 1px solid var(--line2); border-radius: 8px; overflow: hidden; background: var(--bg2); }
.seg a, .seg button { padding: 0 12px; height: 34px; display: inline-flex; align-items: center; gap: 6px; color: var(--tx2); font-weight: 550; font-size: 13.5px; border: 0; background: none; cursor: pointer; text-decoration: none !important; border-right: 1px solid var(--line); }
.seg a:last-child, .seg button:last-child { border-right: 0; }
.seg .on { background: color-mix(in srgb, var(--accent) 15%, transparent); color: var(--tx); }
.seg .cnt { font-size: 11px; color: var(--tx3); }

.dropdown { position: relative; }
.dd-menu { position: absolute; top: calc(100% + 6px); left: 0; min-width: 230px; background: var(--panel); border: 1px solid var(--line2); border-radius: 10px; box-shadow: var(--shadow); padding: 6px; z-index: 60; display: none; }
.dd-menu.right { left: auto; right: 0; }
.dropdown.open .dd-menu { display: block; }
.dd-menu a, .dd-menu button { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 7px; color: var(--tx); text-decoration: none !important; width: 100%; background: none; border: 0; font: inherit; cursor: pointer; text-align: left; }
.dd-menu a:hover, .dd-menu button:hover { background: var(--hover); }
.dd-menu .dd-sec { font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--tx3); font-weight: 700; padding: 8px 10px 4px; }
.dd-menu .app-dot { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; color: #fff; font-size: 11px; font-weight: 800; flex: none; }

.modal { position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.55); display: grid; place-items: center; padding: 16px; }
.modal-box { background: var(--panel); border: 1px solid var(--line2); border-radius: 14px; width: 100%; max-width: 560px; max-height: calc(100vh - 32px); overflow: auto; box-shadow: var(--shadow); position: relative; }
.modal-box.wide { max-width: 820px; }
.modal-head { padding: 16px 18px 0; display: flex; align-items: center; gap: 10px; }
.modal-head h2 { margin: 0; }
.modal-body { padding: 16px 18px; }
.modal-foot { padding: 0 18px 16px; display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.modal-x { margin-left: auto; }

.savebar { position: sticky; bottom: 0; z-index: 20; margin: 18px -22px -70px; padding: 12px 22px calc(12px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-top: 1px solid var(--line); display: flex; gap: 8px; align-items: center; }
.savebar .dirty { color: var(--warn); font-size: 13px; font-weight: 600; display: none; }
.savebar.is-dirty .dirty { display: inline; }

.qty { display: inline-flex; align-items: center; border: 1px solid var(--line2); border-radius: 8px; overflow: hidden; background: var(--input); }
.qty button { width: 34px; height: 34px; border: 0; background: transparent; color: var(--tx); font-size: 18px; cursor: pointer; }
.qty button:hover { background: var(--hover); }
.qty input { width: 46px; height: 34px; border: 0; border-left: 1px solid var(--line); border-right: 1px solid var(--line); text-align: center; background: transparent; color: var(--tx); font: inherit; font-weight: 650; -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty.has input { color: var(--accent); }

.prod-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.prod { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--bg2); }
.prod.has { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); background: color-mix(in srgb, var(--accent) 6%, var(--bg2)); }
.prod .p-name { flex: 1; min-width: 0; font-weight: 550; font-size: 13.5px; }
.cat-block { border: 1px solid var(--line); border-radius: var(--r); padding: 14px; background: var(--bg3); }
.cat-block + .cat-block { margin-top: 12px; }
.cat-block h3 { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }

.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.photo { position: relative; aspect-ratio: 1; border-radius: 9px; overflow: hidden; border: 1px solid var(--line); background: var(--bg3); }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; cursor: zoom-in; }
.photo .del { position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(0,0,0,.65); color: #fff; cursor: pointer; display: grid; place-items: center; }
.photo.add { display: grid; place-items: center; border-style: dashed; color: var(--tx3); cursor: pointer; text-align: center; font-size: 12.5px; }
.photo.add:hover { color: var(--tx); border-color: var(--accent); }
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.9); z-index: 120; display: grid; place-items: center; padding: 20px; cursor: zoom-out; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 8px; }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 16px 22px; }
.timeline li::before { content: ""; position: absolute; left: 5px; top: 7px; width: 9px; height: 9px; border-radius: 50%; background: var(--line2); }
.timeline li::after { content: ""; position: absolute; left: 9px; top: 18px; bottom: 0; width: 1px; background: var(--line); }
.timeline li:last-child::after { display: none; }
.timeline li.k-statut::before { background: var(--accent); }
.timeline .t-meta { font-size: 12px; color: var(--tx3); }
.timeline .t-body { white-space: pre-wrap; }

.cam-tbl td { padding: 6px 6px; } .cam-tbl th { padding: 8px 6px; }
.cam-tbl .input { min-width: 90px; }
.cam-tbl td.n { color: var(--tx3); font-weight: 700; font-variant-numeric: tabular-nums; }
.map { height: 240px; border-radius: 9px; border: 1px solid var(--line); overflow: hidden; background: var(--bg3); }

/* ---------- Portail ---------- */
.apps-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.app-tile { display: flex; flex-direction: column; gap: 14px; padding: 20px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); color: var(--tx); text-decoration: none !important; box-shadow: var(--shadow); position: relative; overflow: hidden; transition: transform .15s, border-color .15s; min-height: 170px; }
.app-tile:hover { transform: translateY(-2px); border-color: var(--line2); }
.app-tile::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--c, var(--accent)); }
.app-tile .a-ic { width: 46px; height: 46px; border-radius: 12px; background: var(--c, var(--accent)); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 16px; }
.app-tile .a-name { font-size: 17px; font-weight: 700; }
.app-tile .a-desc { color: var(--tx2); font-size: 13.5px; flex: 1; }
.app-tile .a-go { color: var(--tx3); font-size: 12.5px; display: flex; align-items: center; gap: 6px; }
.app-tile.off { opacity: .45; pointer-events: none; }
.hello { margin: 4px 0 22px; }
.hello h1 { font-size: 1.7rem; margin-bottom: 4px; }

.auth { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: radial-gradient(1200px 500px at 50% -10%, color-mix(in srgb, var(--accent) 14%, transparent), transparent); }
.auth-box { width: 100%; max-width: 390px; }
.auth-logo { display: flex; align-items: center; gap: 12px; justify-content: center; margin-bottom: 20px; }
.auth-logo img { max-height: 54px; max-width: 220px; }
.auth .card { padding: 24px; }

/* ---------- Mobile ---------- */
@media (max-width: 980px) {
  .cols { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g3, .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .side { transform: translateX(-100%); box-shadow: var(--shadow); }
  body.menu-open .side { transform: none; }
  body.menu-open .scrim { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 35; }
  .main { margin-left: 0; }
  .only-m { display: inline-grid !important; }
  .hide-m { display: none !important; }
  .top { padding: 0 10px; }
  .content { padding: 14px; padding-bottom: calc(86px + env(safe-area-inset-bottom)); }
  .g2, .g3, .g4, .form-grid { grid-template-columns: 1fr; }
  .span2 { grid-column: auto; }
  .card { padding: 14px; }
  .tabbar { display: flex; position: fixed; inset: auto 0 0 0; z-index: 30; background: color-mix(in srgb, var(--bg2) 94%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--tx3); font-size: 10.5px; font-weight: 600; text-decoration: none !important; padding: 4px 0; }
  .tabbar a.on { color: var(--accent); }
  .tabbar a.tab-plus { color: #fff; }
  .tabbar a.tab-plus .ic { background: var(--accent); border-radius: 50%; padding: 9px; width: 42px; height: 42px; margin-top: -14px; box-shadow: 0 6px 16px color-mix(in srgb, var(--accent) 40%, transparent); }
  .savebar { margin: 18px -14px 0; padding: 10px 14px; bottom: calc(60px + env(safe-area-inset-bottom)); }
  .page-head .actions { margin-left: 0; width: 100%; }
  .search { min-width: 0; width: 100%; }
  .tbl.resp thead { display: none; }
  .tbl.resp tr { display: block; padding: 10px 12px; border-bottom: 1px solid var(--line); }
  .tbl.resp td { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; border: 0; }
  .tbl.resp td::before { content: attr(data-l); color: var(--tx3); font-size: 12px; }
  .tbl.resp td.t-first { display: block; }
  .tbl.resp td.t-first::before { display: none; }
  .kpi b { font-size: 22px; }
}
@media print {
  .side, .top, .tabbar, .savebar, .no-print { display: none !important; }
  .main { margin: 0; } .content { padding: 0; } .card { box-shadow: none; }
}
