:root {
  --bg: #efe4cf;
  --bg-2: #e6d7bb;
  --card: #fbf6ec;
  --line: #d6c3a0;
  --text: #2b2118;
  --muted: #7a6650;
  --accent: #9b1c1c;
  --accent-2: #7a1414;
  --accent-soft: #f3dcd6;
  --ok: #3f6b2f;
  --ok-soft: #e1ecd5;
  --warn: #a8650b;
  --warn-soft: #f8e7c6;
  --bad: #a3241c;
  --bad-soft: #f6d9d4;
  --need: #2f6fa8;
  --need-soft: rgba(47, 111, 168, .12);
  --shadow: 0 1px 2px rgba(60, 40, 20, .08), 0 4px 14px rgba(60, 40, 20, .06);
  --radius: 10px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #17120e;
  --bg-2: #211a14;
  --card: #241c16;
  --line: #3d3027;
  --text: #f0e6d6;
  --muted: #a8977f;
  --accent: #d9443a;
  --accent-2: #f06a5f;
  --accent-soft: #3a1c18;
  --ok: #8cc06e;
  --ok-soft: #22301b;
  --warn: #e9a945;
  --warn-soft: #3a2b12;
  --bad: #f07466;
  --bad-soft: #3c1b17;
  --need: #6fa8dc;
  --need-soft: rgba(111, 168, 220, .14);
  --shadow: 0 1px 2px rgba(0, 0, 0, .4);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: Inter, system-ui, sans-serif; font-size: 14px; background: var(--bg); color: var(--text); line-height: 1.45; }
h1, h2, h3 { margin: 0; font-weight: 600; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); }

/* Topbar */
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 24px;
  padding: 10px 24px; background: #2a1d14; color: #f3e7d3; border-bottom: 3px solid var(--accent);
}
.brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.brand-mark { font-size: 22px; color: #e0533f; }
.brand h1 { font-family: Rye, serif; font-weight: 400; font-size: 20px; letter-spacing: .5px; white-space: nowrap; }
.tabs { display: flex; gap: 4px; flex: 1; overflow-x: auto; }
.tabs button { background: none; border: 0; padding: 8px 14px; border-radius: 6px; color: #d8c6aa; cursor: pointer; white-space: nowrap; font-weight: 500; }
.tabs button:hover { background: rgba(255,255,255,.07); color: #fff; }
.tabs button.active { background: var(--accent); color: #fff; }
.tabs button.locked::before { content: "🔒 "; font-size: 11px; }
.top-actions { display: flex; gap: 8px; align-items: center; }
.icon-btn { width: 34px; height: 34px; border-radius: 6px; border: 1px solid rgba(255,255,255,.15); background: none; color: #f3e7d3; cursor: pointer; font-size: 16px; }
.icon-btn:hover { background: rgba(255,255,255,.08); }
.sync { font-size: 12px; color: #bfa98a; white-space: nowrap; }
.sync.err { color: #ff8a7d; }
.user-chip { display: flex; align-items: center; gap: 8px; font-size: 12.5px; border: 1px solid rgba(255,255,255,.15); border-radius: 999px; padding: 4px 6px 4px 12px; white-space: nowrap; }
.user-chip:empty { display: none; }
.user-chip a { color: #d8c6aa; text-decoration: none; padding: 2px 6px; border-radius: 999px; }
.user-chip a:hover { color: #fff; background: rgba(255,255,255,.1); }
.role { font-size: 11px; padding: 2px 8px; border-radius: 999px; background: var(--bg-2); color: var(--muted); font-weight: 600; }
.role.editor { background: #3f6b2f; color: #fff; }
.role.admin { background: #a8650b; color: #fff; }
.role.owner { background: var(--accent); color: #fff; }
.banner { background: var(--warn-soft); color: var(--warn); border-bottom: 1px solid var(--line); padding: 8px 24px; font-size: 13px; text-align: center; }
.banner[hidden] { display: none; }

main { max-width: 1400px; margin: 0 auto; padding: 20px 24px 80px; }

/* Cards, Buttons, Felder */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; margin-bottom: 18px; }
.card-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.card-head h2 { font-size: 16px; }
.card-head-actions { margin-left: auto; display: flex; gap: 6px; }
.hint { color: var(--muted); font-size: 12.5px; margin: 0 0 10px; }
.card-head .hint { margin: 0; }
.dim { color: var(--muted); }
.small { font-size: 12px; }
.empty { color: var(--muted); padding: 14px 0; text-align: center; margin: 0; }
.neg { color: var(--bad); font-weight: 600; }
.ok-text { color: var(--ok); font-weight: 700; }
.grow { flex: 1; min-width: 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.grid-2 > * { min-width: 0; }

.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar input[type=search] { flex: 1; min-width: 220px; padding: 9px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); }
.seg { display: inline-flex; background: var(--bg-2); border-radius: 8px; padding: 3px; border: 1px solid var(--line); max-width: 100%; overflow-x: auto; }
.seg button { border: 0; background: none; padding: 6px 12px; border-radius: 6px; cursor: pointer; color: var(--muted); font-weight: 500; white-space: nowrap; }
.seg button.active { background: var(--card); color: var(--text); box-shadow: var(--shadow); }

.btn { border: 1px solid var(--line); background: var(--card); padding: 8px 14px; border-radius: 8px; cursor: pointer; font-weight: 500; text-decoration: none; color: var(--text); display: inline-block; }
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-2); }
.btn.small { padding: 4px 10px; font-size: 12.5px; }
.btn.ghost { background: none; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--bad); }
.btn.danger { color: var(--bad); }
.btn:disabled { opacity: .5; cursor: not-allowed; }

label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); font-weight: 500; }
label input, label select, .field, dialog textarea {
  padding: 8px 10px; border-radius: 7px; border: 1px solid var(--line); background: var(--card); color: var(--text); font-size: 14px;
}
.field:disabled, .lines input:disabled, .lines select:disabled { border-color: transparent; background: transparent; appearance: none; -webkit-appearance: none; opacity: 1; }
.check { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; flex-direction: row; color: var(--text); font-size: 13px; }
.check input { width: 16px; height: 16px; accent-color: var(--accent); }
.field-label { font-size: 12px; color: var(--muted); font-weight: 500; margin-bottom: 6px; }
.wide-field { width: 100%; margin-bottom: 10px; }

/* Badges */
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.low { background: var(--warn-soft); color: var(--warn); }
.badge.out { background: var(--bad-soft); color: var(--bad); }
.badge.neutral { background: var(--bg-2); color: var(--muted); }
.badge.personal { background: var(--need-soft); color: var(--need); }

/* Tabellen */
.table-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.table-wrap.flat { box-shadow: none; max-height: 70vh; overflow-y: auto; }
table { border-collapse: collapse; width: 100%; }
table.data th, table.data td { padding: 8px 12px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
table.data thead th { position: sticky; top: 0; background: var(--bg-2); font-size: 12px; text-transform: uppercase; letter-spacing: .3px; color: var(--muted); }
table.data tbody tr:hover { background: var(--bg-2); }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.data td.sep, table.data th.sep { border-left: 1px solid var(--line); }
table.data .name { font-weight: 600; cursor: pointer; }
table.data .name:hover { color: var(--accent); }
table.data .alias { color: var(--muted); font-size: 12px; display: block; font-weight: 400; }
table.data td { white-space: normal; }
input.cell { width: 80px; text-align: right; padding: 4px 6px; border: 1px solid transparent; border-radius: 5px; background: transparent; font-variant-numeric: tabular-nums; }
input.cell:hover:not(:disabled) { border-color: var(--line); }
input.cell:focus { border-color: var(--accent); background: var(--card); outline: none; }
table.mini { font-size: 13px; }
table.mini td, table.mini th { padding: 5px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
table.mini th { color: var(--muted); font-weight: 500; font-size: 12px; }
table.mini .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lines th { text-align: left; }
.lines td, .lines th { padding: 6px; border-bottom: 1px solid var(--line); }
.lines th { font-size: 12px; color: var(--muted); font-weight: 500; text-transform: uppercase; }
.lines .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lines select, .lines input { padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--card); width: 100%; }
.lines input[type=number] { width: 90px; text-align: right; }
.mono { font-family: ui-monospace, Consolas, monospace; font-size: 13px; }

/* Startseite */
.hub { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; max-width: 980px; margin: 40px auto; }
.hub-btn {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 34px 20px 26px; cursor: pointer;
  background: linear-gradient(160deg, var(--accent-soft), var(--card) 65%); border: 1px solid var(--line); border-top: 4px solid var(--accent);
  border-radius: 12px; box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s, border-color .15s; text-align: center;
}
.hub-btn:hover { transform: translateY(-3px); box-shadow: 0 10px 26px rgba(0,0,0,.14); border-color: var(--accent); }
.hub-icon { font-size: 40px; line-height: 1; margin-bottom: 6px; }
.hub-btn strong { font-family: Rye, serif; font-weight: 400; font-size: 24px; letter-spacing: .5px; }
.hub-btn small { color: var(--muted); font-size: 12.5px; }
.hub-tag { margin-top: 10px; font-size: 11.5px; font-weight: 600; color: var(--muted); background: var(--bg-2); border-radius: 999px; padding: 3px 10px; }

.lock { max-width: 460px; margin: 60px auto; text-align: center; border-top: 4px solid var(--accent); padding: 34px 28px; }
.lock-mark { font-size: 30px; margin-bottom: 8px; }
.lock h1 { font-family: Rye, serif; font-weight: 400; font-size: 24px; margin-bottom: 10px; }
.lock p { color: var(--muted); }
.uid { display: inline-block; background: var(--bg-2); border: 1px solid var(--line); padding: 8px 14px; border-radius: 8px; font-size: 16px; user-select: all; }

/* Allgemein: Aktionsleiste über der Karte */
.actbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.actbar .btn { font-weight: 600; }
.actbar .btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* Karte */
.map-wrap { position: relative; z-index: 0; isolation: isolate; }
#rdmap { height: calc(100vh - 210px); min-height: 460px; border-radius: var(--radius); border: 1px solid var(--line); background: #d2b790; box-shadow: var(--shadow); }
.blip { background: none; border: 0; }
.blip span { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; color: #fff; font-weight: 800; font-size: 15px; border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.45); }
.blip-mini { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; color: #fff; font-size: 11px; font-weight: 800; vertical-align: middle; flex: none; }
.blip-big { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; color: #fff; font-size: 22px; font-weight: 800; flex: none; border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.3); }
.leaflet-tooltip { background: var(--card); color: var(--text); border-color: var(--line); font: 13px/1.4 Inter, system-ui, sans-serif; }

/* Auslage */
.stand-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.stand-head h2 { font-family: Rye, serif; font-weight: 400; font-size: 22px; }
.stand .lines td:first-child { width: 45%; }
.stand-list { display: flex; flex-direction: column; }
.stand-row { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line); padding: 9px 4px; cursor: pointer; }
.stand-row:last-child { border-bottom: 0; }
.stand-row:hover { background: var(--bg-2); }
.pers-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.pers-row:last-child { border-bottom: 0; }
details.more { display: inline-block; font-size: 12px; margin-left: 4px; }
details.more summary { cursor: pointer; color: var(--muted); }
details.more[open] { display: block; margin: 4px 0 0; }

/* Tagesaufträge */
.task-items { font-weight: 600; font-size: 14.5px; }
.task { border-left: 4px solid var(--warn); }
.task.done { border-left-color: var(--ok); opacity: .7; }
.task-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 10px; }
.task.done .task-head { margin-bottom: 0; }
.task-cost { font-weight: 700; font-variant-numeric: tabular-nums; }
.sugg td:nth-child(3) { min-width: 220px; }
.group-title { font-size: 13px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); margin: 6px 0 10px; }
.task-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin-bottom: 18px; }
.task-card { margin: 0; display: flex; flex-direction: column; gap: 10px; border-left: 4px solid var(--line); }
.task-card.on { border-left-color: var(--accent); }
.task-foot { display: flex; align-items: center; gap: 6px; margin-top: auto; flex-wrap: wrap; }
.task-foot .dim { margin-right: auto; font-size: 12.5px; }
.task-row, .loc-row { display: grid; grid-template-columns: 1fr 90px auto; gap: 8px; margin-bottom: 6px; align-items: center; }
.loc-row { grid-template-columns: 1fr auto auto; }
.loc-row:has(> :nth-child(2):last-child) { grid-template-columns: 1fr auto; }
.pick-loc { margin-top: 12px; }
.pick-list { display: flex; flex-direction: column; gap: 6px; }
.shop-total { margin-left: auto; font-size: 20px; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.shop-group { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.shop-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.shop-head strong { margin-left: auto; font-variant-numeric: tabular-nums; }
.shop-head a { font-weight: 600; }
.shop-row { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; padding: 2px 0; }
.shop-row .dim { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Geschützte Bereiche */
.area-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.area-head h1 { font-family: Rye, serif; font-weight: 400; font-size: 26px; letter-spacing: .5px; }
.subnav { display: flex; gap: 4px; margin: 0 0 16px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.subnav button { background: none; border: 0; border-bottom: 3px solid transparent; padding: 8px 14px 9px; margin-bottom: -1px; color: var(--muted); font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap; }
.subnav button:hover { color: var(--text); }
.subnav button.active { color: var(--accent); border-bottom-color: var(--accent); }

/* Bestellungen */
.cust-layout { display: grid; grid-template-columns: 300px 1fr; gap: 18px; align-items: start; }
.cust-layout > * { min-width: 0; }
.cust-list { display: flex; flex-direction: column; gap: 6px; max-height: calc(100vh - 200px); overflow-y: auto; position: sticky; top: 80px; }
.cust-tools { display: flex; gap: 6px; margin-bottom: 4px; }
.cust-tools .field { flex: 1; min-width: 0; }
.cust-item { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; cursor: pointer; display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; text-align: left; align-items: center; }
.cust-item:hover { border-color: var(--muted); }
.cust-item.active { border-color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }
.cust-item.overview { border-style: dashed; }
.cust-item .t { font-weight: 600; }
.cust-item .s { color: var(--muted); font-size: 12px; grid-column: 1 / -1; }
.cust-detail { margin-bottom: 0; }
.cust-head { display: flex; gap: 10px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 16px; }
.cust-head h2 { font-size: 22px; font-family: Rye, serif; font-weight: 400; }
.cust-note { white-space: pre-line; font-size: 13px; margin-top: 4px; }
.order { border: 1px solid var(--line); border-left: 4px solid var(--warn); border-radius: 8px; padding: 12px 14px; margin-bottom: 12px; }
.order.overdue { border-left-color: var(--bad); }
.order.done { border-left-color: var(--line); opacity: .8; }
.order-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.order-total { font-size: 16px; font-variant-numeric: tabular-nums; }
.og-name { background: none; border: 0; padding: 0; font-weight: 700; font-size: 15px; cursor: pointer; color: var(--text); }
.og-name:hover { color: var(--accent); }
.inline-label { flex-direction: row; align-items: center; gap: 6px; }
.inline-label .field { padding: 4px 8px; font-size: 13px; }
.order-foot { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.order-foot .field { min-width: 200px; padding: 6px 10px; font-size: 13px; }
.order .lines td:first-child { min-width: 200px; }

/* Inventur */
.inv-section { margin-bottom: 18px; }
.inv-section.collapsed { margin-bottom: 6px; }
.inv-title { display: flex; align-items: baseline; gap: 8px; width: 100%; text-align: left; background: none; border: 0; padding: 4px 2px; margin: 0 0 8px; cursor: pointer; font-family: Rye, serif; font-size: 16px; letter-spacing: .3px; color: var(--text); }
.inv-title:hover { color: var(--accent); }
.inv-title .caret { font-family: Inter, system-ui, sans-serif; font-size: 12px; width: 12px; color: var(--muted); }
.inv-title .dim { font-family: Inter, system-ui, sans-serif; font-size: 13px; }
.inv-section.collapsed .inv-title { border-bottom: 1px dashed var(--line); padding-bottom: 8px; }
table.inv { table-layout: fixed; min-width: 900px; }
table.inv th { line-height: 1.25; }
table.inv th:first-child { width: 24%; }

/* Herstellung */
.calc { display: grid; grid-template-columns: 2fr 1fr; gap: 10px; }
.calc > label { min-width: 0; }
.calc select, .calc input { min-width: 0; width: 100%; }
.craft-mode { margin-bottom: 12px; }
.craft-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin: 16px 0 12px; }
.craft-summary > div { background: var(--bg-2); border-radius: 8px; padding: 8px 10px; display: flex; flex-direction: column; }
.craft-summary .dim { font-size: 11.5px; text-transform: uppercase; letter-spacing: .3px; }
.craft-summary strong { font-size: 16px; font-variant-numeric: tabular-nums; }
.recipe { padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.recipe:last-child { border-bottom: 0; }
.recipe-head { display: flex; align-items: center; gap: 10px; margin-bottom: 2px; flex-wrap: wrap; }
.recipe-head strong { font-size: 14px; }
.recipe-head .btn { margin-left: auto; }
.task-row select { min-width: 0; }

/* Zugriff */
.roles-help { margin: 0 0 14px; padding-left: 18px; color: var(--muted); font-size: 12.5px; line-height: 1.7; }
.roles-help strong { color: var(--text); }
.access-add { display: grid; grid-template-columns: 1.2fr 1.2fr 160px auto; gap: 10px; align-items: end; }
table.access select { padding: 5px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--card); }
table.access input.note { padding: 5px 8px; border: 1px solid transparent; border-radius: 6px; background: transparent; min-width: 160px; }
table.access input.note:hover:not(:disabled) { border-color: var(--line); }
table.access input.note:focus { border-color: var(--accent); outline: none; background: var(--card); }

/* Zahnrad (Owner) */
.gear {
  position: fixed; right: 16px; bottom: 16px; z-index: 30; width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--card); color: var(--muted); font-size: 17px; cursor: pointer;
  opacity: .45; transition: opacity .15s, transform .3s; box-shadow: var(--shadow);
}
.gear:hover, .gear.on:hover { opacity: 1; transform: rotate(60deg); color: var(--accent); }
.gear.on { opacity: .8; }

/* Dialog */
dialog { border: 1px solid var(--line); border-radius: 12px; padding: 0; background: var(--card); color: var(--text); width: min(560px, calc(100vw - 32px)); box-shadow: 0 20px 60px rgba(0,0,0,.3); }
dialog:has(form.wide) { width: min(900px, calc(100vw - 32px)); }
dialog::backdrop { background: rgba(20, 12, 6, .55); }
dialog form { padding: 20px; max-height: calc(100vh - 60px); overflow-y: auto; }
dialog h2 { font-size: 18px; margin-bottom: 14px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
.form-grid .full { grid-column: 1 / -1; }
.form-sub { grid-column: 1 / -1; font-size: 12px; text-transform: uppercase; color: var(--muted); letter-spacing: .4px; margin-top: 6px; border-top: 1px solid var(--line); padding-top: 10px; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 18px; }
.modal-actions .left { margin-right: auto; }
.pop-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.pop-head h2 { margin: 0; }
.pop-head .btn { margin-left: auto; }

.toast {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%) translateY(calc(100% + 40px));
  background: #2a1d14; color: #f3e7d3; padding: 10px 18px; border-radius: 8px; transition: transform .2s, opacity .2s, visibility .2s;
  opacity: 0; visibility: hidden; box-shadow: var(--shadow); z-index: 100; max-width: min(640px, calc(100vw - 32px));
}
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; visibility: visible; }

@media (max-width: 1000px) {
  .grid-2, .cust-layout { grid-template-columns: 1fr; }
  .cust-list { position: static; max-height: 280px; }
  .access-add { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .topbar { flex-wrap: wrap; padding: 10px 16px; gap: 10px; }
  .tabs { order: 3; flex-basis: 100%; }
  .top-actions { margin-left: auto; }
  .sync, .user-chip .uname { display: none; }
  main { padding: 16px; }
  .hub { grid-template-columns: 1fr; margin: 16px auto; }
  .hub-btn { padding: 22px 16px; }
  .form-grid { grid-template-columns: 1fr; }
  .lines, table.mini { display: block; overflow-x: auto; }
  #rdmap { height: 65vh; }
}
