:root {
  color-scheme: dark;
  --bg: #0b1220;
  --panel: #122033;
  --panel-2: #192a42;
  --panel-3: #0f1a2a;
  --text: #eef2f7;
  --muted: #9eacc4;
  --line: #314560;
  --accent: #ff7a18;
  --accent-2: #f43f5e;
  --danger: #ef4444;
  --success: #22c55e;
  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 12px;
}

* { box-sizing: border-box; }
body { margin: 0; font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; background: radial-gradient(circle at top, #163053 0%, #0b1220 42%, #08111d 100%); color: var(--text); }
button, input, select { font: inherit; }
.hidden { display: none !important; }

.app { display: grid; grid-template-columns: 390px 1fr; min-height: 100vh; }
.sidebar { height: 100vh; background: linear-gradient(180deg, rgba(18,32,51,.98) 0%, rgba(11,22,36,.98) 100%); border-right: 1px solid var(--line); padding: 16px; overflow: hidden; display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
h1 { font-size: 20px; margin: 0; }
.session-user { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
h2 { font-size: 12px; color: var(--muted); margin: 18px 0 8px; text-transform: uppercase; letter-spacing: .05em; }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
.stat { display: flex; align-items: center; gap: 10px; background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 9px 10px; }
.stat-icon { width: 34px; height: 34px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 9px; color: var(--stat, var(--accent)); background: color-mix(in srgb, var(--stat, var(--accent)) 16%, transparent); border: 1px solid color-mix(in srgb, var(--stat, var(--accent)) 30%, transparent); }
.stat-icon svg { width: 18px; height: 18px; }
.stat-body { display: grid; min-width: 0; line-height: 1.05; }
.stat-body strong { font-size: 20px; }
.stat-label { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.field { display: grid; gap: 6px; color: var(--muted); font-size: 13px; }
input, select { width: 100%; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #0f1724; color: var(--text); padding: 10px; outline: none; }
input:focus, select:focus { border-color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 12px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: rgba(15,26,42,.55); }
button { border: 1px solid var(--line); background: var(--panel-2); color: var(--text); border-radius: var(--radius-sm); padding: 8px 10px; cursor: pointer; }
button.active { border-color: var(--accent); background: rgba(255,122,24,.16); }
button.ghost { background: transparent; }
button.compact { padding: 5px 8px; font-size: 12px; }
.primary { background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%); border: 0; color: white; font-weight: 700; }
.sidebar-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.sidebar-tab { flex: 1 1 calc(50% - 4px); min-width: 0; height: 36px; font-weight: 600; font-size: 12.5px; padding: 0 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-tab.active { border-color: var(--accent); background: rgba(255,122,24,.16); }
.side-panel { display: none; flex: 1; min-height: 0; overflow: auto; padding-right: 4px; }
.side-panel.active { display: block; }
.panel-block { margin-top: 14px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.results, .layers { display: grid; gap: 8px; }
.result, .layer { border: 1px solid var(--line); border-radius: var(--radius-md); background: #121c2d; padding: 10px; cursor: pointer; transition: border-color .12s ease, background .12s ease; }
.result:hover, .layer:hover { border-color: var(--accent); background: #16223a; }
.result.active { border-color: var(--accent); background: rgba(255,122,24,.12); }
.result.has-map-point { border-left: 4px solid #38bdf8; }
.result-title, .layer-title { font-weight: 700; font-size: 13px; }
.result-meta, .layer-meta { color: var(--muted); font-size: 12px; margin-top: 4px; line-height: 1.35; }
.empty-state { border: 1px dashed rgba(158,172,196,.35); border-radius: var(--radius-md); padding: 14px; color: var(--muted); line-height: 1.45; background: rgba(15,26,42,.62); }
.health { border: 1px solid var(--line); border-radius: 12px; background: rgba(15,26,42,.62); padding: 12px; margin-bottom: 12px; display: grid; gap: 10px; }
.health-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.health-head-right { display: flex; align-items: center; gap: 8px; }
.health-head h2 { margin: 0; font-size: 13px; color: var(--text); text-transform: none; }
.health-pct { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line); }
.health-pct.good { color: #b8f7c9; border-color: rgba(34,197,94,.5); background: rgba(34,197,94,.14); }
.health-pct.warn { color: #ffe0b8; border-color: rgba(245,158,11,.5); background: rgba(245,158,11,.14); }
.health-pct.bad { color: #ffc7c7; border-color: rgba(239,68,68,.5); background: rgba(239,68,68,.14); }
.health-bar { height: 8px; border-radius: 999px; background: rgba(148,163,184,.28); overflow: hidden; }
.health-bar-online { display: block; height: 100%; background: linear-gradient(90deg, #22c55e, #16a34a); border-radius: 999px; transition: width .4s ease; }
.health-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.health-metric { display: grid; gap: 2px; padding: 8px 6px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel-2); text-align: center; }
.health-metric strong { font-size: 17px; line-height: 1; }
.health-metric span { color: var(--muted); font-size: 10.5px; text-transform: uppercase; letter-spacing: .03em; }
.health-metric.good strong { color: #6ee7a0; }
.health-metric.bad strong { color: #fca5a5; }
.health-status { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text); }
.health-status.muted { color: var(--muted); }
.progress { height: 6px; border-radius: 999px; background: rgba(148,163,184,.25); overflow: hidden; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-radius: 999px; transition: width .4s ease; }
.spinner { width: 14px; height: 14px; flex: 0 0 auto; border-radius: 999px; border: 2px solid rgba(255,255,255,.25); border-top-color: var(--accent); animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.client-actions { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 10px; }
.client-settings { display: grid; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: rgba(15,26,42,.55); }
.client-toggle { justify-content: space-between; padding: 2px 0; }
/* Chips de filtro: tamanho uniforme em grade, ponto colorido = cor no mapa */
.kind {
  position: relative;
  min-height: 36px;
  width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 11px;
  font-size: 13px;
  text-align: left;
  background: rgba(18,28,45,.9);
  transition: border-color .12s ease, background .12s ease;
}
.kind::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 999px;
  flex: 0 0 auto;
  background: var(--dot, var(--muted));
  box-shadow: 0 0 0 2px rgba(8,17,29,.55);
}
.kind:hover { border-color: rgba(255,122,24,.5); }
.kind.active {
  border-color: var(--accent);
  background: rgba(255,122,24,.16);
  font-weight: 600;
}
/* "Tudo" = mostrar tudo / reset; mesmo tamanho dos demais, ponto em accent */
.kind-all::before {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  box-shadow: none;
}
.client-status-dot { display: inline-block; width: 9px; height: 9px; border-radius: 999px; margin-right: 6px; vertical-align: middle; }
.client-status-dot.online { background: #22c55e; }
.client-status-dot.offline { background: #94a3b8; }
.client-status-dot.unknown { background: #94a3b8; }
.client-map-marker {
  position: relative;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  filter: drop-shadow(0 8px 18px rgba(0,0,0,.45));
}
.client-map-marker svg {
  width: 28px;
  height: 28px;
}
.client-map-marker.is-new::before {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 999px;
  border: 2px solid #38bdf8;
  box-shadow: 0 0 10px rgba(56,189,248,.8);
  animation: newPulse 1.8s ease-in-out infinite;
}
@keyframes newPulse {
  0%, 100% { transform: scale(.92); opacity: .55; }
  50% { transform: scale(1.12); opacity: 1; }
}
.client-cancelled-marker {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  filter: drop-shadow(0 4px 10px rgba(127,29,29,.6));
}
.client-cancelled-marker svg {
  width: 24px;
  height: 24px;
}
.network-marker {
  display: grid;
  place-items: center;
  filter: drop-shadow(0 6px 14px rgba(0,0,0,.38));
}
.network-marker svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}
.marker-cto {
  width: 22px;
  height: 22px;
}
.marker-ceo,
.marker-olt {
  width: 22px;
  height: 22px;
}
.marker-reserva {
  width: 18px;
  height: 18px;
}
.marker-radio {
  width: 30px;
  height: 30px;
}
.marker-cluster-small,
.marker-cluster-medium,
.marker-cluster-large {
  background: rgba(19, 35, 58, .72);
}
.marker-cluster-small div,
.marker-cluster-medium div,
.marker-cluster-large div {
  background: linear-gradient(135deg, rgba(34,197,94,.92) 0%, rgba(56,189,248,.92) 100%);
  color: white;
  font-weight: 700;
  border: 2px solid rgba(255,255,255,.9);
  box-shadow: 0 10px 24px rgba(0,0,0,.35);
}
.map-wrap { position: relative; min-width: 0; }
#map { height: 100vh; width: 100%; background: #0b1220; }
.map-toolbar {
  position: absolute;
  left: 68px;
  top: 18px;
  z-index: 700;
  display: flex;
  gap: 8px;
}
.legend {
  position: absolute;
  left: 18px;
  bottom: 22px;
  z-index: 700;
  width: 226px;
  max-height: calc(100vh - 120px);
  overflow: auto;
  background: rgba(24, 34, 53, .96);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: 0 18px 44px rgba(0,0,0,.4);
}
.legend-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.legend-head h2 { margin: 0; font-size: 13px; color: var(--text); text-transform: none; }
.legend-group { margin-top: 10px; }
.legend-group:first-child { margin-top: 0; }
.legend-group h3 { margin: 0 0 6px; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.legend-item { display: flex; align-items: center; gap: 9px; padding: 3px 0; }
.legend-swatch { width: 22px; height: 22px; flex: 0 0 auto; display: grid; place-items: center; }
.legend-swatch svg { width: 20px; height: 20px; }
.legend-label { font-size: 12px; color: var(--text); line-height: 1.3; }
.map-switcher {
  position: relative;
}
.map-button {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 10px;
  background: rgba(24, 34, 53, .96);
  box-shadow: 0 18px 44px rgba(0,0,0,.35);
}
.map-button svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}
.map-button[aria-expanded="true"] {
  border-color: var(--accent);
  background: #173825;
}
.map-menu {
  position: absolute;
  top: 48px;
  left: 0;
  min-width: 210px;
  background: rgba(24, 34, 53, .98);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px;
  display: grid;
  gap: 6px;
  box-shadow: 0 18px 44px rgba(0,0,0,.35);
}
.map-option {
  width: 100%;
  text-align: left;
  background: #121c2d;
  padding: 9px 10px;
}
.map-option.active {
  border-color: var(--accent);
  background: #173825;
}
.map-option small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 2px;
}
.details { position: absolute; right: 18px; top: 18px; width: min(460px, calc(100vw - 430px)); max-height: calc(100vh - 36px); overflow: auto; background: rgba(24, 34, 53, .96); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 14px; z-index: 700; box-shadow: 0 18px 44px rgba(0,0,0,.35); }
.details h3 { margin: 0; font-size: 17px; line-height: 1.25; }
.details a { color: #67e8f9; word-break: break-all; }
.details-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.close { flex: 0 0 auto; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.badge { font-size: 11px; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line); color: var(--text); background: rgba(255,255,255,.05); text-transform: capitalize; }
.badge-soft { color: var(--muted); }
.badge-online { border-color: rgba(34,197,94,.5); color: #b8f7c9; background: rgba(34,197,94,.14); }
.badge-offline { border-color: rgba(148,163,184,.5); color: #d6deea; background: rgba(148,163,184,.14); }
.badge-warn { border-color: rgba(249,115,22,.55); color: #ffd2ac; background: rgba(249,115,22,.14); }
.badge-new { border-color: rgba(56,189,248,.6); color: #bae6fd; background: rgba(56,189,248,.16); font-weight: 700; }
.badge-cancelled { border-color: rgba(220,38,38,.6); color: #fecaca; background: rgba(220,38,38,.18); font-weight: 700; }
.detail-rows { display: grid; gap: 0; margin: 0 0 12px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.detail-row { display: grid; grid-template-columns: 116px 1fr; gap: 10px; padding: 8px 11px; }
.detail-row:nth-child(odd) { background: rgba(255,255,255,.03); }
.detail-row dt { color: var(--muted); font-size: 12px; }
.detail-row dd { margin: 0; font-size: 13px; word-break: break-word; }
.detail-row dd a { color: #7cc4ff; text-decoration: none; }
.detail-row dd a:hover { text-decoration: underline; }
.contact-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.contact-line + .contact-line { margin-top: 4px; }
.wa-link { font-size: 11px; font-weight: 600; color: #0b3d2e !important; background: #25d366; border-radius: 6px; padding: 1px 7px; text-decoration: none !important; }
.wa-link:hover { background: #1fc25d; }
.detail-note { margin: 0 0 12px; font-size: 12.5px; line-height: 1.4; color: #ffd2ac; background: rgba(249,115,22,.1); border: 1px solid rgba(249,115,22,.32); border-radius: 8px; padding: 8px 10px; }
.detail-hint { font-size: 12px; color: var(--muted); line-height: 1.4; margin: 0 0 12px; }
.detail-hint.fresh { color: #8fdfa8; }
.detail-hint.stale { color: #ffd2ac; }
.detail-hint.error { color: #fca5a5; }
.detail-desc { color: var(--muted); white-space: pre-wrap; line-height: 1.45; font-size: 13px; border-top: 1px solid var(--line); padding-top: 10px; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.drawing-action { flex: 1 1 130px; }
.button-link { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; color: var(--text); }
.drawing-modal { position: absolute; inset: 0; z-index: 900; background: rgba(3, 8, 15, .72); padding: 24px; display: grid; place-items: center; }
.drawing-window { width: min(1120px, 100%); height: min(760px, calc(100vh - 48px)); background: rgba(12, 22, 36, .98); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 28px 80px rgba(0,0,0,.55); display: grid; grid-template-rows: auto 1fr; overflow: hidden; }
.drawing-window header { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.drawing-window h2 { margin: 0; color: var(--text); }
.drawing-window p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.drawing-actions { display: flex; gap: 8px; align-items: center; }
#drawingFrame { width: 100%; height: 100%; border: 0; background: white; }
.login { min-height: 100vh; display: grid; place-items: center; background:
  radial-gradient(circle at top left, rgba(255,122,24,.18), transparent 30%),
  radial-gradient(circle at bottom right, rgba(244,63,94,.15), transparent 24%),
  linear-gradient(180deg, #09111d 0%, #0d1727 100%);
  padding: 20px; }
.login-box { width: min(430px, 100%); display: grid; justify-items: center; gap: 14px; background: rgba(12, 22, 36, .94); border: 1px solid rgba(255,255,255,.08); border-radius: 20px; padding: 32px 28px; box-shadow: 0 28px 70px rgba(0,0,0,.45); text-align: center; }
.login-logo { width: 126px; height: auto; display: block; margin: 0 auto 2px; }
.login-copy { display: grid; gap: 6px; justify-items: center; }
.login-copy p { margin: 0; color: var(--muted); line-height: 1.45; max-width: 300px; }
.login .field { width: 100%; text-align: left; }
.login .primary { width: 100%; min-height: 42px; }
#loginError { color: var(--danger); min-height: 20px; margin: 0; }

.launcher { min-height: 100vh; display: flex; flex-direction: column; align-items: center; gap: 28px; padding: 48px 24px; background:
  radial-gradient(circle at top left, rgba(255,122,24,.16), transparent 32%),
  radial-gradient(circle at bottom right, rgba(56,189,248,.14), transparent 26%),
  linear-gradient(180deg, #09111d 0%, #0d1727 100%); }
.launcher-head { width: min(960px, 100%); display: flex; align-items: center; gap: 16px; }
.launcher-logo { width: 84px; height: auto; }
.launcher-copy { flex: 1; }
.launcher-copy h1 { margin: 0; font-size: 22px; }
.launcher-user { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.launcher-grid { width: min(960px, 100%); display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.launcher-card { text-align: left; display: grid; gap: 8px; padding: 20px; border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: var(--radius-lg); background: rgba(15,26,42,.85); color: var(--text); cursor: pointer; transition: transform .12s ease, border-color .12s ease, background .12s ease; }
.launcher-card:hover { transform: translateY(-3px); background: rgba(20,33,52,.95); }
.launcher-icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 20%, transparent); }
.launcher-icon svg { width: 24px; height: 24px; fill: var(--accent); }
.launcher-title { font-size: 16px; font-weight: 600; }
.launcher-desc { font-size: 13px; color: var(--muted); line-height: 1.45; }
.launcher-note { font-size: 11.5px; color: var(--muted); opacity: .85; }
.brand-actions { display: flex; align-items: center; gap: 8px; }
.location-edit-marker { display: block; width: 34px; height: 50px; cursor: grab; filter: drop-shadow(0 4px 8px rgba(0,0,0,.5)); animation: locEditBounce 1s ease-in-out infinite; }
.location-edit-marker:active { cursor: grabbing; }
.location-edit-marker svg { width: 100%; height: 100%; overflow: visible; }
@keyframes locEditBounce { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
.loc-edit-tip { background: #ff7a18; color: #08111d; border: none; font-weight: 700; font-size: 12px; box-shadow: 0 4px 10px rgba(0,0,0,.4); }
.loc-edit-tip::before { border-top-color: #ff7a18; }
.draw-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0; }
.mode-btn { padding: 8px; font-size: 13px; }
.mode-btn.active { border-color: var(--accent); color: #ffd2ac; background: color-mix(in srgb, var(--accent) 18%, transparent); }
.draw-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.draw-stat { background: var(--panel-3); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px 10px; text-align: center; }
.draw-stat strong { display: block; font-size: 18px; }
.draw-stat span { font-size: 11px; color: var(--muted); }
.draw-house { display: flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 6px; background: #37c522; color: #08210b; font-size: 11px; font-weight: 700; border: 2px solid #fff; box-shadow: 0 2px 5px rgba(0,0,0,.4); }
.coverage-profile { width: 100%; height: 110px; display: block; margin: 0 0 12px; background: rgba(8,17,30,.5); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.coverage-controls { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 10px; }
.cov-field { display: grid; gap: 4px; }
.cov-field span { font-size: 11px; color: var(--muted); }
.cov-field input { padding: 6px 8px; }
.admin-panel { padding-top: 0; }
.admin-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.admin-actions { display: flex; gap: 8px; align-items: center; }
.user-form { display: grid; gap: 10px; margin-bottom: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: rgba(15,26,42,.72); }
.form-title-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.form-title-row h3 { margin: 0; font-size: 14px; }
.toggle { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.toggle input { width: auto; }
.form-message { min-height: 18px; margin: 0; color: var(--muted); font-size: 12px; }
.permissions-matrix { display: grid; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: rgba(8,17,30,.45); }
.matrix-head { font-size: 12px; font-weight: 600; color: var(--muted); }
.matrix-row { display: grid; grid-template-columns: 92px 1fr; gap: 8px; align-items: start; }
.matrix-module { font-size: 12.5px; font-weight: 600; padding-top: 2px; }
.matrix-actions { display: flex; flex-wrap: wrap; gap: 6px 12px; }
.matrix-action { display: flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--muted); }
.matrix-action input { width: auto; }
.user-perms { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.perm-chip { font-size: 10.5px; padding: 1px 7px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.users-list { display: grid; gap: 4px; }
.user-row { display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 10px; padding: 7px 9px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--panel-3); }
.user-row.off { opacity: .55; }
.user-avatar { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; color: #08111d; background: #9eacc4; }
.user-avatar.admin { background: #ffb27a; }
.user-avatar.operator { background: #7cc4ff; }
.user-avatar.viewer { background: #86e0a3; }
.user-row-main { min-width: 0; }
.user-row-top { display: flex; align-items: center; gap: 7px; }
.user-row-top strong { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-row-sub { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.user-chip { padding: 1px 7px; border-radius: 999px; font-size: 10.5px; border: 1px solid var(--line); flex-shrink: 0; }
.user-chip.admin { border-color: rgba(255,122,24,.4); color: #ffd2ac; }
.user-chip.operator { border-color: rgba(56,189,248,.4); color: #c3f0ff; }
.user-chip.viewer { border-color: rgba(34,197,94,.35); color: #cdfad9; }
.user-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.user-dot.on { background: #22c55e; }
.user-dot.offdot { background: #ef4444; }
.user-row-actions { display: flex; gap: 4px; }
.icon-btn { width: 30px; height: 30px; padding: 0; display: grid; place-items: center; border-radius: var(--radius-sm); }
.icon-btn svg { width: 16px; height: 16px; }
.icon-btn.danger { color: #ffc7c7; }
.icon-btn.danger:hover { border-color: rgba(239,68,68,.5); }

@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; grid-template-rows: 42vh 58vh; }
  .sidebar { order: 2; height: 58vh; border-right: 0; border-top: 1px solid var(--line); }
  .map-wrap { order: 1; }
  #map { height: 42vh; }
  .map-toolbar { left: 10px; top: 58px; }
  .map-menu { min-width: 180px; }
  .details { left: 10px; right: 10px; top: 10px; width: auto; max-height: calc(42vh - 20px); }
  .drawing-modal { padding: 10px; }
  .drawing-window { height: calc(42vh - 20px); }
  .drawing-window header { align-items: flex-start; flex-direction: column; }
}
