:root {
  color-scheme: dark;
  --page: #000000; --line: #2A2523; --card: #1F1C1B; --card-line: #2C2826;
  --well: #262220; --well-line: #2F2A28; --field: #1B1817; --btn: #221F1E; --btn-line: #3A3431;
  --hover: #2A2523; --ink: #F2EEEA; --ink-2: #E4DED8; --ink-3: #D8D2CC; --nav: #B5AEA8; --muted: #A39C96;
  --red: #E94F49; --red-card: #3A1C1A; --on-red: #160E0D; --track: #2E2A28; --pill: #332D2A;
  --warn-bg: #33260f; --warn-ink: #ffcf94; --err: #ff8a80;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}
* { box-sizing: border-box; }
/* Scrollbars. Chrome, Edge and Safari take the pseudo-elements. Firefox only has the standard pair. */
@supports not selector(::-webkit-scrollbar) {
  * { scrollbar-color: #4A423E transparent; scrollbar-width: thin; }
}
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track, ::-webkit-scrollbar-corner { background: transparent; }
::-webkit-scrollbar-thumb { background: #3A3431; border: 2px solid transparent; border-radius: 999px; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: #5A534F; border: 2px solid transparent; background-clip: padding-box; }
.nav::-webkit-scrollbar { height: 6px; }
[hidden] { display: none !important; }
.mesh-bg { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
body { margin: 0; padding: 24px; background: var(--page); color: var(--ink); font: 14px/1.45 var(--sans); min-height: 100vh; }
h1 { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -.01em; }
h2 { margin: 0; font-size: 15px; font-weight: 600; }
h3 { margin: 18px 0 8px; font-size: 14px; font-weight: 600; }
button { font: inherit; color: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible, .drawer:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); margin: 0; font-size: 13px; }
.small { font-size: 12px; }
.sub { display: block; color: var(--muted); font-size: 12px; font-weight: 400; }
.link { background: none; border: 0; padding: 0; color: var(--muted); font-size: 12px; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.link:hover { color: var(--ink); }

.frame { max-width: 1392px; margin: 0 auto; display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 20px; padding: 20px; border-radius: 24px; border: 1px solid var(--line); background: linear-gradient(180deg, rgba(112,32,28,.92) 0, rgba(74,26,24,.66) 170px, rgba(38,21,20,.3) 400px, rgba(23,21,20,.1) 620px, rgba(23,21,20,.1) 100%); align-items: start; }
main { min-width: 0; display: grid; gap: 16px; }

.side { position: sticky; top: 24px; min-height: calc(100vh - 88px); display: flex; flex-direction: column; justify-content: space-between; gap: 32px; padding: 24px 16px 16px; border-radius: 16px; background: #1C1918; border: 1px solid var(--line); }
.side-top { display: grid; gap: 28px; }
.logo { display: block; width: 104px; height: auto; margin: 0 8px; }
.nav { display: grid; gap: 4px; }
.nav button { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 0 12px; border: 0; border-radius: 10px; background: none; color: var(--nav); font-size: 14px; font-weight: 500; cursor: pointer; text-align: left; white-space: nowrap; }
.nav button:hover { background: var(--hover); color: var(--ink); }
.nav button[aria-current="page"] { background: var(--hover); color: var(--ink); font-weight: 600; box-shadow: inset 2px 0 0 var(--red); }
.nav svg { flex: none; }
.me { display: flex; align-items: center; gap: 12px; padding: 14px 8px 4px; border-top: 1px solid var(--line); }
.avatar { flex: 0 0 36px; height: 36px; border-radius: 50%; background: #3D2523; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; }
.me-text { min-width: 0; display: grid; gap: 2px; }
.me-email { font-size: 12px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.title-left { display: flex; align-items: center; gap: 12px; }
.client-logo { display: block; height: 40px; width: auto; }
.title-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 8px; padding: 4px 4px 0; }
.banner { margin: 0; padding: 10px 14px; border-radius: 10px; background: var(--warn-bg); color: var(--warn-ink); font-weight: 500; }

.filters { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: flex-end; }
.filter { display: grid; gap: 3px; flex: 1 1 150px; min-width: 0; font-size: 12px; color: var(--muted); font-weight: 500; }
.filter.on .dd-btn { border-color: var(--red); }
.clear { padding-bottom: 11px; flex: none; }

.kpis { display: flex; flex-wrap: wrap; gap: 12px; }
.kpi { flex: 1 1 200px; min-height: 140px; display: flex; flex-direction: column; border-radius: 16px; background: var(--card); border: 1px solid var(--card-line); overflow: hidden; }
.kpi:hover { border-color: var(--btn-line); }
.kpi.alert { background: var(--red-card); border-color: var(--red); }
.kpi.selected { box-shadow: inset 0 0 0 1px var(--ink), 0 0 0 1px var(--ink); border-color: var(--ink); }
.kpi-main { flex: 1; display: flex; justify-content: space-between; gap: 12px; width: 100%; padding: 18px 20px; background: none; border: 0; text-align: left; cursor: pointer; }
.kpi-text { display: flex; flex-direction: column; justify-content: space-between; gap: 16px; min-width: 0; }
.kpi-label { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.kpi-count { display: block; font-size: 36px; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; }
.kpi.alert .kpi-count { font-weight: 700; color: var(--red); }
.kpi-hint { display: block; margin-top: 8px; font-size: 12px; color: var(--muted); }
.kpi.alert .kpi-hint { color: var(--ink-3); }
.kpi-foot { display: block; width: calc(100% - 40px); margin: -6px 20px 14px; padding: 10px 0 0; background: none; border: 0; border-top: 1px solid var(--card-line); font-size: 12px; color: var(--ink-3); text-align: left; }
.kpi-foot b { font-weight: 700; font-variant-numeric: tabular-nums; }
button.kpi-foot { cursor: pointer; }
button.kpi-foot:hover { color: var(--ink); }
button.kpi-foot[aria-pressed="true"] { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
.kpi.alert .kpi-foot { border-top-color: #4A2C29; }
.donut { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; flex: none; }
.donut-label { font-size: 11px; color: var(--muted); text-align: center; line-height: 1.3; }
.donut text { font-family: var(--sans); font-size: 13px; font-weight: 700; fill: var(--ink); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 10px; border: 1px solid var(--card-line); background: var(--card); font-size: 12px; color: var(--muted); cursor: pointer; }
.chip:hover { border-color: var(--btn-line); }
.chip[aria-pressed="true"] { border-color: var(--ink); }
.chip b { color: var(--ink); font-variant-numeric: tabular-nums; }

.deadlines-body { display: flex; flex-wrap: wrap; gap: 24px; }
.deadlines-left { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.deadlines-right { flex: 1.5 1 460px; min-width: 0; display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
.stack { display: flex; height: 14px; border-radius: 7px; overflow: hidden; gap: 2px; background: #2E2A28; }
.stack button { display: block; height: 100%; padding: 0; border: 0; min-width: 2px; cursor: pointer; }
.stack button:hover { filter: brightness(1.15); }
.lfd-legend { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.lfd-seg { display: flex; flex-direction: column; gap: 4px; padding: 6px; margin: -6px; border: 0; border-radius: 8px; background: none; text-align: left; cursor: pointer; min-width: 0; }
.lfd-seg:hover { background: var(--hover); }
.lfd-seg[aria-pressed="true"] { box-shadow: inset 0 0 0 1px var(--ink); }
.lfd-seg-label { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); white-space: nowrap; }
.lfd-seg-label i { flex: none; width: 8px; height: 8px; border-radius: 2px; }
.lfd-seg b { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.well-box { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border-radius: 12px; background: var(--well); border: 1px solid var(--well-line); }
.well-box .sub-head { font-size: 12px; }
.due-list { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12px; color: var(--muted); }
.due-list b { color: var(--ink); }
.mini-table { overflow-x: auto; border-radius: 12px; border: 1px solid var(--well-line); }
.mini-table table { min-width: 560px; font-size: 12px; }
.mini-table th { position: static; background: var(--well); }
.drawer { background: #1F1C1B; }
.mini-table th.plain { padding: 10px 12px; color: var(--muted); }
.mini-table .num { text-align: right; }
.mini-table td { padding: 10px 12px; border-bottom: 0; border-top: 1px solid var(--well-line); max-width: 260px; }
.mini-table td b { color: var(--ink); }
.mini-table td.mono { white-space: normal; min-width: 150px; font-size: 11.5px; max-width: none; }
.mini-table td:nth-child(3) { white-space: normal; min-width: 110px; }
.mini-table tbody tr { cursor: pointer; }
.mini-table tbody tr:hover td { background: var(--hover); }
.mini-table tr.today { background: rgba(240,138,108,.06); }
.days-past { font-weight: 700; color: var(--red); }
tr.today .days-past { color: #F08A6C; }
.more { display: inline-block; margin-left: 4px; white-space: nowrap; font-family: var(--sans); color: var(--muted); }

.panels { display: flex; flex-wrap: wrap; gap: 12px; align-items: stretch; }
.panel { min-width: 0; padding: 20px 22px; border-radius: 16px; background: var(--card); border: 1px solid var(--card-line); display: flex; flex-direction: column; gap: 14px; }
#loc-panel { flex: 1.6 1 520px; padding: 20px; }
.loc-body { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.loc-map { flex: 1.2 1 290px; min-width: 0; display: grid; gap: 8px; }
.view-locations .loc-map { flex-basis: 100%; }
#side-panel { flex: 1 1 340px; padding: 20px; }
#no-yard { display: grid; gap: 14px; margin-bottom: 8px; }
.panel-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.panel-foot { margin-top: auto; display: flex; justify-content: flex-end; gap: 8px; padding-top: 4px; }
.panel-foot:empty { display: none; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px; border-radius: 10px; border: 1px solid var(--btn-line); background: var(--btn); font-size: 13px; font-weight: 600; cursor: pointer; }
.btn:hover { background: var(--hover); }
.btn.icon { width: 44px; padding: 0; }
.btn.primary { background: var(--red); border-color: var(--red); color: var(--on-red); font-weight: 700; }
.btn.primary:hover { background: #F2645E; }
.btn.small-btn { min-height: 36px; padding: 0 14px; }
.sub-head { font-size: 13px; font-weight: 600; }

.loc-body .bars { flex: 1 1 230px; min-width: 0; }
.map-wrap { isolation: isolate; position: relative; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: #1A1817; }
#map { height: 420px; background: #1A1817; font-family: var(--sans); }
.view-locations #map { height: 560px; }
.basemap { position: absolute; top: 10px; right: 10px; z-index: 500; display: flex; padding: 3px; gap: 2px; border-radius: 10px; background: rgba(23,21,20,.92); border: 1px solid var(--btn-line); }
.basemap button { min-height: 32px; padding: 0 12px; border: 0; border-radius: 7px; background: none; color: var(--nav); font-size: 12px; font-weight: 600; cursor: pointer; }
.basemap button[aria-pressed="true"] { background: var(--pill); color: var(--ink); }
.pin { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; border-radius: 50%; background: var(--red); color: var(--on-red); font-weight: 800; font-variant-numeric: tabular-nums; box-shadow: 0 0 0 5px rgba(233,79,73,.28), 0 0 0 11px rgba(233,79,73,.13); cursor: pointer; }
.pin.picked { background: var(--ink); box-shadow: 0 0 0 5px rgba(242,238,234,.32), 0 0 0 11px rgba(242,238,234,.14); }
.leaflet-container a { color: var(--ink-3); }
.leaflet-control-attribution { background: rgba(23,21,20,.8) !important; color: var(--muted); font-size: 10px; }
.leaflet-bar a { background: rgba(23,21,20,.92); color: var(--ink); border-bottom-color: var(--btn-line); }
.leaflet-bar a:hover, .leaflet-bar a:focus { background: var(--hover); color: var(--ink); }
.leaflet-bar a.leaflet-disabled { background: rgba(23,21,20,.92); color: #5f5955; }
.leaflet-tooltip { background: #171514; color: var(--ink); border: 1px solid var(--btn-line); border-radius: 8px; font-family: var(--sans); font-size: 12px; padding: 7px 10px; white-space: normal; width: max-content; max-width: 280px; box-shadow: none; }
.leaflet-tooltip-top::before { border-top-color: var(--btn-line); }
.tip-title { display: block; font-weight: 700; }

.unplaced-list { display: grid; gap: 6px; margin-top: 8px; }
.unplaced-list button { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; width: 100%; padding: 8px 10px; border-radius: 8px; background: var(--well); border: 1px solid var(--well-line); font-size: 12px; color: var(--ink-3); cursor: pointer; text-align: left; }
.unplaced-list b { font-size: 13px; color: var(--ink); }

.bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.bar { width: 100%; display: grid; gap: 4px; padding: 6px 8px; margin: 0; background: none; border: 0; border-radius: 8px; cursor: pointer; text-align: left; }
.bar:hover { background: var(--hover); }
.bar[aria-pressed="true"] { background: var(--hover); box-shadow: inset 0 0 0 1px var(--red); }
.bar-top { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.bar-n { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.bar-name { font-size: 12px; color: var(--ink-3); min-width: 0; }
.bar-addr { font-size: 11px; line-height: 1.35; color: var(--muted); }
.bar-addr:empty { display: none; }
.track { display: block; height: 4px; border-radius: 2px; background: var(--track); overflow: hidden; margin-top: 2px; }
.fill { display: block; height: 4px; min-width: 2px; border-radius: 2px; background: var(--red); }
.fill.off-map { background: #8F8882; }

.rows { display: flex; flex-direction: column; gap: 8px; }
.row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border-radius: 12px; background: var(--well); border: 1px solid var(--well-line); cursor: pointer; text-align: left; }
.row:hover { border-color: var(--btn-line); }
.row[aria-pressed="true"] { border-color: var(--red); }
.row-icon { flex: 0 0 32px; height: 32px; border-radius: 8px; border: 1px solid var(--btn-line); color: var(--ink-3); display: flex; align-items: center; justify-content: center; }
.row-label { flex: 1 1 auto; min-width: 0; font-size: 13px; font-weight: 600; }
.row-n { font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; }
.row-label .sub { margin-top: 2px; }
.row.urgent { background: var(--red-card); border-color: #4A2C29; }
.row.urgent .row-icon { color: var(--red); border-color: #5A3532; }
.row.urgent .row-n { font-size: 18px; color: var(--red); }
.flag { flex: none; font-size: 11px; font-weight: 600; color: var(--red); padding: 2px 8px; border-radius: 999px; border: 1px solid #5A3532; white-space: nowrap; }
td .flag { display: inline-block; }
.row.card { align-items: flex-start; }
.card-body { flex: 1 1 auto; min-width: 0; display: grid; gap: 3px; }
.card-top { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 10px; }
.card-id { font-family: var(--mono); font-size: 13px; font-weight: 500; }
.pill { font-size: 11px; font-weight: 600; color: var(--ink-3); padding: 2px 8px; border-radius: 999px; background: var(--pill); }
.card-line { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.card-line.lead { color: var(--ink-3); }

.search-wrap { position: relative; }
.search-wrap svg { position: absolute; left: 14px; top: 14px; color: var(--muted); }
.lookup-input { width: 100%; height: 44px; padding: 0 14px 0 40px; border-radius: 10px; border: 1px solid var(--btn-line); background: var(--field); color: var(--ink); font-family: inherit; font-size: 13px; }
.lookup-input::placeholder { color: #8F8882; }
.notice { margin: 0; padding: 8px 12px; border-radius: 8px; background: var(--warn-bg); color: var(--warn-ink); font-size: 13px; overflow-wrap: anywhere; }
.empty { padding: 20px 0 6px; text-align: center; }

.table-wrap { overflow: auto; max-height: 70vh; margin: 0 -22px -20px; border-top: 1px solid var(--card-line); border-radius: 0 0 16px 16px; }
table { border-collapse: collapse; width: 100%; font-size: 13px; }
th { position: sticky; top: 0; z-index: 1; padding: 0; background: #1F1C1B; text-align: left; white-space: nowrap; box-shadow: inset 0 -1px 0 var(--card-line); }
th button { width: 100%; padding: 10px 14px; background: none; border: 0; color: var(--ink-2); font-weight: 600; text-align: left; white-space: nowrap; cursor: pointer; }
th button:hover { background: var(--hover); }
td { padding: 9px 14px; border-bottom: 1px solid var(--card-line); white-space: nowrap; max-width: 280px; overflow: hidden; text-overflow: ellipsis; color: var(--ink-3); }
tbody tr { cursor: pointer; }
tbody tr:hover td { background: var(--well); }
td.mono { font-family: var(--mono); font-size: 12.5px; }
td.place { max-width: 340px; }
td.place > span { display: block; overflow: hidden; text-overflow: ellipsis; }
.open { background: none; border: 0; padding: 0; color: var(--ink); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; text-decoration-color: var(--btn-line); }
.open:hover { text-decoration-color: currentColor; }

.scrim { position: fixed; inset: 0; z-index: 1000; background: rgba(0,0,0,.55); }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 1001; width: min(480px, 100%); padding: 20px 22px 32px; overflow-y: auto; background: #1F1C1B; border-left: 1px solid var(--btn-line); outline: none; }
.drawer-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.drawer-head h2 { font-size: 18px; overflow-wrap: anywhere; }
.drawer dl { display: grid; grid-template-columns: 130px 1fr; gap: 7px 12px; margin: 0; }
.drawer dt { color: var(--muted); }
.drawer dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.moves { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.moves li { display: grid; grid-template-columns: 18px 1fr; gap: 8px; }
.moves .mark { text-align: center; font-weight: 700; }
.moves .done .mark, .moves .live .mark { color: var(--red); }
.moves .todo { color: var(--muted); }
.moves .todo b { font-weight: 500; }
.moves .void b { text-decoration: line-through; color: var(--muted); }

body.login { display: grid; place-items: center; }
.login-card { width: min(380px, 100%); padding: 28px; display: grid; gap: 14px; border-radius: 16px; background: linear-gradient(180deg, #6A201C 0, #3B1917 170px, #191615 340px, #171514 100%); border: 1px solid var(--line); }
.login-card .logo { margin: 0 0 6px; }
.login-card label { display: grid; gap: 4px; font-weight: 500; font-size: 13px; color: var(--ink-3); }
.login-card input { width: 100%; height: 44px; padding: 0 12px; font: inherit; color: var(--ink); background: var(--field); border: 1px solid var(--btn-line); border-radius: 10px; }
.login-card .submit { width: 100%; height: 44px; margin-top: 4px; background: var(--red); color: var(--on-red); border: 0; border-radius: 10px; font-weight: 700; cursor: pointer; }
.login-card .submit:hover { background: #F2645E; }
.login-card .submit:disabled { opacity: .6; cursor: progress; }
.login-card #fields { display: grid; gap: 10px; }
.login-card label[for] { font-weight: 500; font-size: 13px; color: var(--ink-3); margin-bottom: -10px; }
.login-card #fields label[for] { margin-bottom: -6px; }
.login-card .forgot { justify-self: end; margin-top: -6px; }
.login-card a.link { font-size: 13px; }
.pw-field { position: relative; }
.pw-field input { padding-right: 68px; }
.pw-toggle { position: absolute; top: 5px; right: 5px; height: 34px; min-width: 56px; padding: 0 10px; border: 0; border-radius: 7px; background: var(--pill); color: var(--ink-3); font-size: 12px; font-weight: 600; cursor: pointer; }
.pw-toggle:hover { color: var(--ink); }
.form-error { margin: 0; color: var(--err); font-weight: 500; }

.dd { position: relative; min-width: 0; }
.dd-btn { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; height: 38px; padding: 0 10px 0 12px; background: var(--field); border: 1px solid var(--btn-line); border-radius: 10px; color: var(--ink); font-size: 13px; font-weight: 500; text-align: left; cursor: pointer; }
.dd-btn:hover:not(:disabled) { border-color: #5A534F; }
.dd-btn[aria-expanded="true"] { border-color: var(--red); }
.dd-btn:disabled { color: var(--muted); cursor: not-allowed; }
.dd-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dd-chevron { flex: none; width: 14px; height: 14px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .12s; }
.dd-btn[aria-expanded="true"] .dd-chevron { transform: rotate(180deg); }
.dd-pop { position: fixed; z-index: 1500; display: flex; flex-direction: column; padding: 6px; background: #1B1817; border: 1px solid var(--btn-line); border-radius: 12px; box-shadow: 0 12px 32px rgba(0,0,0,.6); }
.dd-search { flex: none; height: 34px; margin-bottom: 6px; padding: 0 10px; background: var(--well); border: 1px solid var(--well-line); border-radius: 8px; color: var(--ink); font: inherit; font-size: 13px; }
.dd-search::placeholder { color: #8F8882; }
.dd-list { list-style: none; margin: 0; padding: 0; overflow-y: auto; outline: none; min-height: 0; }
.dd-option { padding: 8px 10px; border-radius: 8px; font-size: 13px; color: var(--ink-3); cursor: pointer; overflow-wrap: anywhere; }
.dd-option.active { background: var(--hover); color: var(--ink); }
.dd-option[aria-selected="true"] { color: var(--ink); font-weight: 600; box-shadow: inset 2px 0 0 var(--red); }
.dd-none { padding: 10px; font-size: 13px; color: var(--muted); }
@media (forced-colors: active) { .dd-option.active { outline: 2px solid Highlight; } }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.users-view { display: grid; gap: 12px; min-width: 0; }
.invite-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.invite-form label { display: grid; gap: 3px; flex: 1 1 200px; min-width: 0; font-size: 12px; font-weight: 500; color: var(--muted); }
.invite-form input { height: 44px; width: 100%; padding: 0 10px; font: inherit; font-size: 13px; color: var(--ink); background: var(--field); border: 1px solid var(--btn-line); border-radius: 10px; }
.invite-field { display: grid; gap: 3px; flex: 1 1 200px; min-width: 0; font-size: 12px; font-weight: 500; color: var(--muted); }
.invite-field .dd-btn { height: 44px; }
.invite-form .btn { flex: none; }
.link-result { display: grid; gap: 8px; padding: 12px 14px; border-radius: 12px; background: var(--well); border: 1px solid var(--well-line); }
.link-result-text { margin: 0; font-weight: 600; font-size: 13px; }
.link-copy { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.link-copy input { flex: 1 1 240px; min-width: 0; height: 36px; padding: 0 10px; font-family: var(--mono); font-size: 12px; color: var(--ink-3); background: var(--field); border: 1px solid var(--btn-line); border-radius: 8px; }
th.plain { padding: 10px 14px; color: var(--ink-2); font-weight: 600; }
.users-table { max-height: none; }
.users-table tbody tr { cursor: default; }
.users-table tbody tr:hover td { background: none; }
.users-table td { max-width: none; vertical-align: middle; }
.users-table .person b { display: block; font-weight: 600; color: var(--ink); }
.role-select { width: 110px; }
.role-select .dd-btn { height: 36px; }
.row-actions { display: flex; justify-content: flex-end; gap: 8px; }
.btn.danger { color: var(--err); }
.pill.warn { background: var(--warn-bg); color: var(--warn-ink); margin-left: 6px; }
.status-fail { color: var(--err); font-weight: 600; }
.activity { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 13px; color: var(--ink-3); }
.activity time { color: var(--muted); margin-right: 8px; font-size: 12px; }
.activity .none { color: var(--muted); }

@media (max-width: 1000px) {
  body { padding: 0; }
  .frame { grid-template-columns: minmax(0, 1fr); border-radius: 0; border: 0; padding: 12px; gap: 12px; }
  .side { position: static; min-height: 0; padding: 12px; gap: 12px; }
  .side-top { gap: 10px; }
  .logo { width: 64px; margin: 0; }
  .nav { display: flex; overflow-x: auto; gap: 4px; }
  .nav button { width: auto; flex: none; min-height: 40px; box-shadow: none !important; }
  .nav button[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--red) !important; }
  .me { padding: 10px 0 0; }
  .panel { padding: 16px; }
  .table-wrap { margin: 0 -16px -16px; }
  #map, .view-locations #map { height: 320px; }
}
@media (max-width: 520px) {
  .kpi { flex: 1 1 100%; min-height: 0; }
  .lfd-legend { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 8px; }
  .kpi-count { font-size: 32px; }
  .filter { flex: 1 1 calc(50% - 10px); }
  .drawer dl { grid-template-columns: 110px 1fr; }
  #loc-panel, #side-panel { flex-basis: 100%; }
}
@media (forced-colors: active) { .fill, .pin { background: CanvasText; forced-color-adjust: none; } }
