/* Lerezmap v36 · calmer workspace, without changing map geometry. */
:root {
  --bg: #0b111b;
  --panel: #111b28;
  --panel-2: #162232;
  --line: #2b394c;
  --text: #ecf2f9;
  --muted: #a0afc2;
  --accent: #ff8b57;
  --accent-2: #ffb48b;
  --cyan: #65dac5;
  --shadow: 0 16px 48px #0005;
  color-scheme: dark;
}
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
button, input, select, summary { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible, a:focus-visible {
  outline: 2px solid var(--cyan); outline-offset: 3px;
}
button { transition: background .15s, border-color .15s, box-shadow .15s; }
.primary, .secondary, .ghost, .danger { font-size: 13px; font-weight: 650; border-radius: 9px; }
.primary { background: #ff8b57; color: #23140d; box-shadow: 0 3px 10px #0002; }
.primary:hover:not(:disabled) { background: #ffa477; }
.ghost { background: #182536; border-color: #344459; }
.ghost:hover:not(:disabled) { background: #223248; border-color: #566a83; }
.eyebrow { font-size: 10px; letter-spacing: .12em; font-weight: 700; }
.app { grid-template-rows: 72px minmax(0,1fr); }
.topbar { gap: 28px; padding: 0 22px; background: #111b28; backdrop-filter: none; }
.brand { min-width: 164px; gap: 12px; }
.brand strong { font-size: 20px; letter-spacing: -.6px; font-weight: 750; }
.brand small { margin-top: 3px; font-size: 9px; letter-spacing: .14em; }
.brand-mark.small { width: 38px; height: 38px; border-radius: 11px; box-shadow: none; flex: none; }
.map-switcher { min-width: 0; flex: 1; gap: 12px; }
.map-switcher label { flex: none; font-size: 11px; }
.map-switcher select { min-width: 0; max-width: 380px; width: 100%; padding: 11px 12px; font-size: 13px; font-weight: 600; background: #0c1521; }
.map-version-badge { font-size: 10px; font-weight: 600; padding: 5px 10px; }
.top-actions { flex: none; gap: 12px; }
.top-actions .presence-summary { max-width: 170px; }
.toolbar-menu-toggle { min-height: 38px; }
.toolbar-menu-toggle[aria-expanded=true] { box-shadow: 0 0 0 2px #65dac530; }
.toolbar-menu-panel { background: #162332; border-color: #3a4e66; padding: 8px; border-radius: 12px; backdrop-filter: none; max-height: calc(100dvh - 100px); overflow-y: auto; }
.toolbar-menu-panel button strong { font-size: 13px; font-weight: 650; }
.toolbar-menu-panel button small { font-size: 11px; line-height: 1.5; }
.toolbar-menu-panel.utility-menu { width: min(260px,calc(100vw - 16px)); }
.toolbar-menu-panel.utility-menu button { display: block; min-height: 44px; padding: 12px; font-size: 13px; font-weight: 550; }
.toolbar-menu-panel.utility-menu button.menu-danger { color: #ffa3ac; }
/* The fixed menus must be positioned relative to the viewport, not a filtered header. */
.workspace { grid-template-columns: 280px minmax(0,1fr) 280px; }
.inventory-panel, .inspector-panel { padding: 22px 18px; scrollbar-width: thin; scrollbar-color: #3c5068 transparent; }
.panel-heading { margin-bottom: 18px; gap: 12px; }
.panel-heading h2 { font-size: 22px; line-height: 1.25; letter-spacing: -.65px; }
#inspector-title { font-size: 19px; overflow-wrap: anywhere; }
.count { background: #26364b; color: #d0dceb; font-size: 11px; font-variant-numeric: tabular-nums; }
.inventory-source-status { margin: -5px 0 20px; }
.sync-state { display: inline-block; font-size: 11px; color: #93dccc; white-space: normal; line-height: 1.5; }
.sync-state:before { width: 6px; height: 6px; box-shadow: none; }
.search { margin: 0 0 12px; padding: 12px; font-size: 13px; background: #0c1521; }
.inventory-filters { margin-bottom: 4px; border: 1px solid var(--line); border-radius: 9px; background: #142030; }
.inventory-filters summary { list-style: none; padding: 11px 12px; cursor: pointer; font-size: 12px; font-weight: 600; display: flex; gap: 8px; align-items: center; }
.inventory-filters summary::-webkit-details-marker { display: none; }
.inventory-filters summary:after { content: '+'; margin-left: auto; color: var(--muted); font-size: 17px; }
.inventory-filters[open] summary:after { content: '−'; }
.filter-count { min-width: 19px; padding: 2px 5px; border-radius: 5px; background: #284e49; color: #a6f0df; font-size: 10px; text-align: center; }
.inventory-filters .filter-grid { padding: 2px 10px 10px; grid-template-columns: 1fr 1fr; }
.filter-grid select { grid-column: 1/-1; }
.filter-grid input, .filter-grid select { padding: 10px; font-size: 12px; }
.filter-reset { margin: 0 10px 10px; padding: 7px 2px; background: transparent; border: 0; color: #b6ddf5; font-size: 12px; text-decoration: underline; text-underline-offset: 3px; }
.toggle { position: relative; min-height: 36px; margin: 8px 0 14px; font-size: 12px; }
.toggle input { display: block; position: absolute; width: 1px; height: 1px; opacity: 0; }
.toggle input:focus-visible + span { outline: 2px solid var(--cyan); outline-offset: 4px; }
.toggle span { flex: none; }
.inventory-list { gap: 10px; }
.asset-card { padding: 14px 12px; border-radius: 10px; background: #162333; box-shadow: none; }
.asset-card:hover { background: #1b2c40; border-color: #66819e; transform: none; }
.asset-card.assigned { opacity: .68; }
.asset-card strong { font-size: 13px; font-weight: 650; line-height: 1.4; }
.asset-card .pill { max-width: 90px; overflow: hidden; text-overflow: ellipsis; font-size: 9px; background: #2d4058; color: #d4e4f5; }
.asset-top { align-items: start; }
.asset-meta { font-size: 11px; line-height: 1.65; }
.asset-id { font-size: 11px; }
.map-area { position: relative; grid-template-rows: auto auto minmax(0,1fr); background: #0b1420; }
.map-toolbar { min-width: 0; min-height: 62px; width: 100%; gap: 8px; padding: 12px 18px; background: #131f2e; overflow-x: auto; }
.map-toolbar button { white-space: nowrap; }
.map-toolbar > .toolbar-menu { order: initial; }
.map-toolbar .ghost { border-color: transparent; background: transparent; color: #cbd7e7; }
.map-toolbar .ghost:hover, .map-toolbar .ghost[aria-expanded=true] { background: #25364a; border-color: #3d5069; }
.operations-summary { flex-wrap: wrap; gap: 12px; padding: 14px 18px; background: #101b29; }
.operations-progress { flex: 1 0 185px; max-width: 240px; gap: 6px; }
.operations-progress strong { font-size: 12px; font-weight: 650; }
.operations-progress small { font-size: 11px; }
.operations-progress-track { height: 3px; background: #2c3e52; }
.operations-counts { flex: 1 1 290px; flex-wrap: wrap; overflow: visible; gap: 6px; }
.operations-counts button { padding: 7px 10px; border-radius: 7px; font-weight: 550; font-size: 11px; background: #172536; border-color: transparent; }
.operations-counts button.active { border-color: #4a9f92; background: #1c3d3a; }
.operations-counts b { font-weight: 700; font-variant-numeric: tabular-nums; }
.operations-counts [data-operational-filter=incident] { color: #f6afb6; }
.viewport { background-color: #0b1420; background-image: radial-gradient(#344356 1px,transparent 1px); background-size: 20px 20px; }
.canvas { margin: 24px; box-shadow: 0 0 0 1px #3d4f65,0 16px 44px #0003; }
.map-navigation { pointer-events: none; position: absolute; bottom: 16px; left: 18px; right: 18px; z-index: 12; display: flex; align-items: end; justify-content: space-between; gap: 12px; }
.map-help { max-width: 320px; padding: 8px 10px; border-radius: 7px; background: #111d2eec; color: #a9b9ce; font-size: 11px; line-height: 1.45; }
.zoom { pointer-events: auto; position: static; display: flex; gap: 3px; margin-left: auto; padding: 5px; border: 1px solid #465b73; border-radius: 11px; background: #152334f5; box-shadow: 0 6px 22px #0004; flex: none; }
.zoom .ghost { background: transparent; border-color: transparent; min-height: 34px; padding: 6px 9px; color: #dce6f3; }
.zoom #fit-map { font-size: 11px; }
.zoom #zoom-in, .zoom #zoom-out { width: 34px; font-size: 19px; font-weight: 400; }
.zoom #zoom-label { width: 42px; font-size: 11px; color: #cfdaea; text-align: center; font-variant-numeric: tabular-nums; }
.zoom .zoom-divider { width: 1px; height: 18px; background: #42546b; margin: 0 3px; }
.inspector-welcome { padding: 0; border: 0; background: transparent; text-align: left; }
.inspector-welcome-icon { display: grid; place-items: center; width: 48px; height: 48px; margin: 10px 0 18px; border: 1px solid #48617d; border-radius: 14px; background: #1d3046; font-size: 28px; color: #bfd8f4; }
.inspector-welcome > strong { font-size: 14px; line-height: 1.5; color: #dce7f5; }
.inspector-welcome > p { margin: 8px 0 22px; color: #a2b2c7; font-size: 12px; line-height: 1.7; }
.inspector-tip { display: grid; gap: 5px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 11px; line-height: 1.6; }
.inspector-tip b { color: #cddbec; font-weight: 600; }
.inspector-disclosure { border-radius: 10px; background: #142031; }
.inspector-disclosure summary { font-size: 12px; }
.inspector-form label { font-size: 12px; font-weight: 550; }
.inspector-form input, .inspector-form select { font-size: 13px; padding: 10px; }
.seat-asset { background: #1b2c3f; padding: 12px; }
.empty-state { font-size: 12px; line-height: 1.65; }
.login-shell { min-height: 100dvh; overflow-y: auto; height: 100dvh; background: radial-gradient(ellipse at 50% 0,#25385370,transparent 60%),#0b131e; }
.login-card { width: min(460px,100%); padding: 38px; background: #142131; border-radius: 18px; border-color: #3a4d65; box-shadow: 0 24px 80px #0004; }
.login-card .brand-mark { width: 46px; height: 46px; border-radius: 13px; box-shadow: none; margin-bottom: 24px; }
.login-card h1 { font-size: 42px; line-height: 1.2; letter-spacing: -1.6px; margin: 6px 0 14px; font-weight: 750; }
.login-title-dot { color: var(--accent); }
.login-card .muted { font-size: 14px; line-height: 1.7; margin-bottom: 26px; }
.login-card label { font-size: 12px; font-weight: 600; margin: 16px 0; }
.login-card input { min-height: 46px; font-size: 15px; }
.login-card .primary { min-height: 46px; display: flex; justify-content: space-between; align-items: center; }
.login-card .primary span { font-size: 20px; }
.login-footnote { margin: 24px 0 0; color: #9fb2ca; font-size: 10px; text-align: center; letter-spacing: .13em; text-transform: uppercase; }
.login-card #login-error:empty { min-height: 0; margin: 0; }
dialog { border-color: #40546c; border-radius: 14px; }
dialog .dialog-heading h2 { font-size: 20px; letter-spacing: -.4px; }
@media (max-width: 1350px) {
  .topbar { gap: 18px; padding: 0 18px; }
  .brand { min-width: 154px; }
  .workspace { grid-template-columns: 260px minmax(0,1fr) 260px; }
  .map-switcher label { display: none; }
  .map-help { display: none; }
  .map-toolbar { padding-left: 12px; padding-right: 12px; }
}
@media (max-width: 1100px) {
  .app { grid-template-rows: 64px minmax(0,1fr) 60px; }
  .workspace { grid-template-columns: minmax(0,1fr); }
  .topbar { gap: 18px; }
  .brand { min-width: 0; }
  .brand div { display: grid; }
  .inventory-panel, .inspector-panel { top: 64px; padding: 22px 18px; }
  .inventory-panel .sync-state { display: inline-block; }
  .map-switcher { justify-content: start; }
  .map-switcher select { max-width: 360px; }
  .operations-progress { max-width: 230px; }
  .mobile-dock { background: #142131; border-top-color: #3c5068; }
  .mobile-dock button { font-size: 11px; font-weight: 600; }
  .mobile-dock button.active { background: #1c3e3a; color: #9ef4e1; }
}
@media (max-width: 700px) {
  .app { grid-template-rows: 60px minmax(0,1fr) 58px; }
  .topbar { gap: 8px; min-height: 60px; padding: 0 10px; }
  .brand { gap: 0; }
  .brand div { display: none; }
  .brand-mark.small { width: 32px; height: 32px; }
  .map-switcher { gap: 5px; flex: 1; }
  .map-switcher select { min-width: 0; max-width: none; padding: 10px 7px; font-size: 12px; }
  .map-version-badge, .presence-summary { display: none; }
  .top-actions { gap: 0; }
  #workspace-actions-toggle { font-size: 0; padding: 8px 10px; min-width: 38px; }
  #workspace-actions-toggle:before { content: '•••'; font-size: 14px; letter-spacing: 1px; }
  #workspace-actions-toggle > span { display: none; }
  #map-actions-toggle { padding: 8px; font-size: 11px; }
  /* Overrides for the old icon-only header actions: all are now labeled menu items. */
  .top-actions .utility-menu button, .map-switcher .utility-menu #new-map, .map-switcher .utility-menu #map-settings {
    display: block; width: 100%; height: auto; padding: 13px 12px; font-size: 13px;
  }
  .top-actions .utility-menu .hidden { display: none!important; }
  .top-actions .utility-menu button:after { content: none!important; }
  .top-actions .utility-menu #global-assets { display: block; }
  .inventory-panel, .inspector-panel { top: 60px; padding: 18px 16px; }
  .panel-heading { top: -18px; margin: -18px -16px 18px; padding: 18px 16px; background: #111b28; }
  .mobile-backdrop { top: 60px; }
  .map-toolbar { min-height: 54px; gap: 3px; padding: 8px; scrollbar-width: none; }
  .map-toolbar .toolbar-menu-toggle { font-size: 12px; padding: 8px 10px; min-height: 38px; gap: 4px; }
  .map-toolbar .toolbar-menu { order: initial!important; }
  .operations-summary { display: grid; gap: 10px; padding: 10px; }
  .operations-progress { max-width: none; display: grid; grid-template-columns: auto 1fr; gap: 6px; }
  .operations-progress strong { font-size: 11px; }
  .operations-progress small { text-align: right; font-size: 10px; }
  .operations-counts { width: 100%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .operations-counts button { min-height: 32px; padding: 6px 9px; font-size: 10px; }
  .operations-counts [data-operational-filter=all] { order: -2; }
  .operations-counts [data-operational-filter=incident] { order: -1; }
  .map-navigation { bottom: 12px; left: 10px; right: 10px; }
  .map-help { display: none; }
  .zoom { margin: 0 auto; padding: 4px; }
  .zoom .ghost { min-height: 40px; }
  .zoom #zoom-in, .zoom #zoom-out { width: 40px; }
  .zoom #fit-map { padding: 8px 12px; font-size: 12px; }
  .map-area { grid-template-rows: auto auto minmax(0,1fr); }
  .canvas { margin: 24px; }
  .inspector-welcome { padding: 10px; }
  .login-shell { padding: 20px; }
  .login-card { padding: 28px 24px; }
  .login-card h1 { font-size: 38px; }
  .login-card input { font-size: 16px; }
  .login-card .brand-mark { margin-bottom: 20px; }
  dialog input, dialog select, .search, .filter-grid input, .filter-grid select { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *:before, *:after { scroll-behavior: auto!important; transition-duration: 0s!important; animation-duration: 0s!important; }
}
@media (max-width:700px) {
  .top-actions .utility-menu #activity,
  .top-actions .utility-menu #account,
  .top-actions .utility-menu #admin,
  .top-actions .utility-menu #logout,
  .top-actions .utility-menu .install-app {
    display: block; width: 100%; height: auto; padding: 13px 12px; font-size: 13px;
  }
  .map-toolbar { gap: 2px; justify-content: space-between; padding: 8px 6px; }
  .map-toolbar .toolbar-menu-toggle { padding: 8px 6px; font-size: 11.5px; gap: 3px; }
  .map-toolbar .toolbar-menu-toggle > span { font-size: 12px; }
}
