:root {
  color-scheme: light;
  --app-bg: #f3f7f8;
  --surface: #ffffff;
  --surface-raised: #f7fafb;
  --ink: #142127;
  --muted: #64747b;
  --line: #dbe4e7;
  --brand: #087f83;
  --brand-deep: #076568;
  --on-brand: #ffffff;
  --safe: #197d54;
  --danger: #c42a38;
  --danger-deep: #9f1828;
  --danger-soft: #fdebed;
  --medical: #087ca5;
  --medical-soft: #e8f5fa;
  --fire: #cb5b1d;
  --fire-soft: #fff0e7;
  --arrival: #6a4aba;
  --arrival-soft: #f1edfb;
  --shadow: rgba(14, 40, 50, .16);
  --safe-area-top: env(safe-area-inset-top, 0px);
  --safe-area-bottom: env(safe-area-inset-bottom, 0px);
  font-family: Arial, Helvetica, sans-serif;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --app-bg: #081116;
  --surface: #101c22;
  --surface-raised: #17262d;
  --ink: #f2f7f8;
  --muted: #9aabb1;
  --line: #263941;
  --brand: #3ad4cd;
  --brand-deep: #25aaa5;
  --safe: #52d69a;
  --danger: #ff5c68;
  --danger-deep: #b61f2c;
  --danger-soft: #32181d;
  --medical: #4bc7f2;
  --medical-soft: #112b35;
  --fire: #ff914d;
  --fire-soft: #352116;
  --arrival: #ac8cff;
  --arrival-soft: #271f3a;
  --shadow: rgba(0, 0, 0, .46);
}

:root[data-theme="technical"] {
  color-scheme: light;
  --app-bg: #fff8f2;
  --surface: rgba(255, 255, 255, .88);
  --surface-raised: rgba(255, 241, 230, .72);
  --ink: #54301f;
  --muted: #946b55;
  --line: rgba(198, 104, 53, .22);
  --brand: #e99868;
  --brand-deep: #c86635;
  --on-brand: #ffffff;
  --safe: #4f8768;
  --danger: #d94b42;
  --danger-deep: #b93631;
  --danger-soft: rgba(217, 75, 66, .12);
  --medical: #b86639;
  --medical-soft: rgba(233, 152, 104, .14);
  --fire: #cb6b32;
  --fire-soft: rgba(232, 132, 66, .15);
  --arrival: #9b6a51;
  --arrival-soft: rgba(197, 130, 92, .14);
  --shadow: rgba(111, 58, 30, .15);
}

@media (prefers-color-scheme: dark) {
  :root[data-theme="system"] {
    color-scheme: dark;
    --app-bg: #081116;
    --surface: #101c22;
    --surface-raised: #17262d;
    --ink: #f2f7f8;
    --muted: #9aabb1;
    --line: #263941;
    --brand: #3ad4cd;
    --brand-deep: #25aaa5;
    --safe: #52d69a;
    --danger: #ff5c68;
    --danger-deep: #b61f2c;
    --danger-soft: #32181d;
    --medical: #4bc7f2;
    --medical-soft: #112b35;
    --fire: #ff914d;
    --fire-soft: #352116;
    --arrival: #ac8cff;
    --arrival-soft: #271f3a;
    --shadow: rgba(0, 0, 0, .46);
  }
}

* { box-sizing: border-box; }

html { min-height: 100%; overflow-x: hidden; overscroll-behavior: none; background: var(--app-bg); }

body {
  min-width: 320px;
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 85% 5%, color-mix(in srgb, var(--brand) 9%, transparent), transparent 30rem),
    var(--app-bg);
}

button, input, select { font: inherit; }
button { color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 48%, transparent); outline-offset: 3px; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.app-icon { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.app-shell {
  position: relative;
  width: min(100%, 440px);
  min-height: 100svh;
  margin: 0 auto;
  overflow: hidden;
  overflow: clip;
  background: var(--app-bg);
  box-shadow: 0 0 50px var(--shadow);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(12px + var(--safe-area-top)) 20px 10px;
  border-bottom: 1px solid color-mix(in srgb,var(--brand) 16%,var(--line));
  background: color-mix(in srgb,var(--app-bg) 94%,transparent);
  box-shadow: 0 7px 18px color-mix(in srgb,var(--shadow) 18%,transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.topbar[data-custom-colors="true"] { color: var(--user-bar-text); background: var(--user-bar-background); }
.topbar[data-custom-colors="true"] .icon-button,.topbar[data-custom-colors="true"] .avatar { color: inherit; border-color: color-mix(in srgb,currentColor 35%,transparent); background: color-mix(in srgb,currentColor 8%,transparent); }
.topbar[data-custom-colors="true"] .brand-mark { background: color-mix(in srgb,currentColor 14%,transparent); }
.topbar[data-context-brand="municipal"] .brand-mark { width: 36px; height: 36px; border-radius: 11px; background: transparent; }
.topbar[data-context-brand="municipal"] .topbar-brand { letter-spacing: .04em; }
.topbar-brand { min-width: 0; max-width: calc(100% - 112px); }
.topbar-brand > strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.icon-button {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; letter-spacing: .08em; }
.brand-mark { display: grid; place-items: center; width: 29px; height: 29px; border-radius: 9px; color: var(--on-brand); background: var(--brand); }
.brand-mark .app-icon { width: 17px; height: 17px; }
.brand-mark.has-logo { background: transparent; }
.brand-mark img { display: block; width: 100%; height: 100%; padding: 0; border-radius: inherit; object-fit: contain; background: transparent; }

.avatar {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 2px solid var(--brand);
  border-radius: 50%;
  color: var(--brand-deep);
  background: var(--surface);
  font-weight: 700;
  overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar > span { display: grid; place-items: center; width: 100%; height: 100%; }

.home-content { padding: 7px 20px calc(32px + var(--safe-area-bottom)); }
.greeting { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 9px 0 18px; }
.active-account-card { width: 100%; margin: 18px 0 0; padding: 13px; border: 1px solid color-mix(in srgb,var(--brand) 28%,var(--line)); border-radius: 17px; color: var(--ink); background: var(--surface); box-shadow: 0 8px 22px color-mix(in srgb,var(--shadow) 48%,transparent); }
.account-summary { display: grid; grid-template-columns: 48px minmax(0,1fr) auto; align-items: center; gap: 12px; }
.account-state { min-width: 48px; display: grid; place-items: center; align-self: stretch; gap: 3px; padding: 7px 4px 5px; border-radius: 14px; color: var(--muted); background: color-mix(in srgb,currentColor 11%,transparent); }
.account-state .app-icon { width: 23px; height: 23px; }
.account-state small { max-width: 46px; overflow: hidden; font-size: 8px; font-weight: 700; line-height: 1.1; text-align: center; text-overflow: ellipsis; }
.account-copy { min-width: 0; display: grid; gap: 2px; }
.account-copy small,.account-copy em { color: var(--muted); font-size: 10px; font-style: normal; }
.account-copy strong { overflow: hidden; color: var(--ink); font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.change-account { align-self: center; padding: 8px 2px 8px 10px; border: 0; color: var(--brand-deep); background: transparent; font-size: 11px; font-weight: 700; }
.account-activity { display: flex; flex-wrap: wrap; gap: 3px 13px; margin: 11px 1px 0 60px; color: var(--muted); font-size: 10px; line-height: 1.4; }
.account-activity span { min-width: 0; }
.account-activity strong { color: var(--ink); font-weight: 600; }
.events-action { width: 100%; min-height: 39px; display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 11px; border: 1px solid color-mix(in srgb,var(--brand-deep) 55%,var(--line)); border-radius: 11px; color: var(--brand-deep); background: color-mix(in srgb,var(--brand) 8%,transparent); font-size: 11px; font-weight: 800; letter-spacing: .055em; }
.events-action .app-icon { width: 16px; height: 16px; }
.eyebrow { margin: 0 0 5px; color: var(--muted); font-size: 11px; letter-spacing: .07em; text-transform: uppercase; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: 27px; font-weight: 500; line-height: 1.1; }
h2 { margin-bottom: 0; font-size: 18px; font-weight: 500; }
.protected-status { display: flex; align-items: center; gap: 7px; padding-bottom: 3px; color: var(--safe); font-size: 11px; white-space: nowrap; }
.protected-status > span { width: 8px; height: 8px; border-radius: 50%; background: var(--safe); box-shadow: 0 0 0 5px color-mix(in srgb, var(--safe) 16%, transparent); }

.panic-action {
  width: 100%;
  min-height: 126px;
  display: flex;
  align-items: center;
  gap: 17px;
  padding: 22px;
  border: 0;
  border-radius: 24px;
  color: #fff;
  text-align: left;
  background: linear-gradient(135deg, var(--danger), var(--danger-deep));
  box-shadow: 0 14px 32px color-mix(in srgb, var(--danger) 28%, transparent);
  transition: transform .16s ease, box-shadow .16s ease;
}
.panic-action:active { transform: scale(.985); box-shadow: 0 8px 20px color-mix(in srgb, var(--danger) 22%, transparent); }
.panic-icon { display: grid; place-items: center; flex: 0 0 59px; height: 59px; border-radius: 19px; background: rgba(255,255,255,.15); }
.panic-icon .app-icon { width: 29px; height: 29px; }
.panic-action strong { display: block; margin-bottom: 5px; font-size: 25px; font-weight: 700; letter-spacing: .025em; }
.panic-action small { display: block; font-size: 13px; opacity: .86; }

.emergency-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; margin-top: 11px; }
.emergency-grid[data-count="4"] { grid-template-columns: repeat(2,minmax(0,1fr)); }
.emergency-grid[data-count="2"] { grid-template-columns: repeat(2,minmax(0,1fr)); }
.emergency-grid[data-count="1"] { grid-template-columns: minmax(0,1fr); }
.emergency-grid[data-count="1"] .emergency-action { min-height: 88px; flex-direction: row; align-items: center; justify-content: flex-start; gap: 15px; }
.emergency-grid[data-count="1"] .emergency-action .app-icon { width: 27px; height: 27px; }
.emergency-action { min-height: 103px; display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 15px; border: 1px solid transparent; border-radius: 19px; text-align: left; transition: transform .16s ease; }
.emergency-action:active { transform: scale(.97); }
.emergency-action span { font-size: 13px; font-weight: 700; }
.emergency-action.medical { color: var(--medical); background: var(--medical-soft); border-color: color-mix(in srgb, var(--medical) 18%, transparent); }
.emergency-action.fire { color: var(--fire); background: var(--fire-soft); border-color: color-mix(in srgb, var(--fire) 18%, transparent); }
.emergency-action.arrival { color: var(--arrival); background: var(--arrival-soft); border-color: color-mix(in srgb, var(--arrival) 18%, transparent); }
.emergency-action.enroute { color: var(--brand); background: color-mix(in srgb, var(--brand) 11%, var(--surface)); border-color: color-mix(in srgb, var(--brand) 25%, transparent); }

.services-section { margin-top: 27px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.text-action { padding: 7px 0; border: 0; color: var(--brand-deep); background: transparent; font-size: 12px; }
.service-selector { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.service-button { min-width: 0; display: grid; justify-items: center; gap: 8px; padding: 12px 4px; border: 1px solid var(--line); border-radius: 17px; background: var(--surface); font-size: 11px; transition: transform .16s ease, background .16s ease; }
.service-button:active { transform: scale(.96); }
.service-button[aria-pressed="true"] { color: var(--on-brand); border-color: var(--brand-deep); background: var(--brand-deep); }

.service-detail { margin-top: 12px; padding: 17px; border: 1px solid var(--line); border-radius: 21px; background: var(--surface); }
.service-detail-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 9px; }
.service-detail-heading > span { padding: 5px 9px; border-radius: 999px; color: var(--brand-deep); background: color-mix(in srgb, var(--brand) 12%, transparent); font-size: 11px; }
.service-row { width: 100%; display: flex; align-items: center; gap: 11px; padding: 11px 0; border: 0; border-top: 1px solid var(--line); background: transparent; text-align: left; }
.service-row:first-child { border-top: 0; }
.service-row-icon { display: grid; place-items: center; width: 39px; height: 39px; flex: 0 0 auto; border-radius: 13px; color: var(--brand-deep); background: var(--surface-raised); }
.service-row-copy { flex: 1; min-width: 0; }
.service-row-copy strong, .service-row-copy small { display: block; }
.service-row-copy strong { font-size: 13px; font-weight: 700; }
.service-row-copy small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.service-state { color: var(--safe); font-size: 11px; }

.backdrop { position: absolute; inset: 0; z-index: 10; background: rgba(0,0,0,.52); backdrop-filter: blur(2px); }
.drawer { position: absolute; inset: 0 auto 0 0; z-index: 11; width: min(83%, 340px); padding: calc(23px + var(--safe-area-top)) 18px calc(22px + var(--safe-area-bottom)); transform: translateX(-105%); visibility: hidden; background: var(--surface); box-shadow: 16px 0 40px var(--shadow); transition: transform .24s ease, visibility .24s; }
.drawer.open { transform: translateX(0); visibility: visible; }
.drawer-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 27px; }
.drawer[data-context-brand="municipal"] .drawer-heading { margin: calc(-12px - var(--safe-area-top)) -8px 23px; padding: calc(12px + var(--safe-area-top)) 10px 12px; border-radius: 0 0 16px 16px; color: var(--context-brand-text); background: var(--context-brand-background); }
.drawer[data-context-brand="municipal"] .drawer-heading .brand { min-width: 0; letter-spacing: .04em; }
.drawer[data-context-brand="municipal"] .drawer-heading .brand>span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drawer[data-context-brand="municipal"] .drawer-heading .brand-mark { width: 36px; height: 36px; flex: 0 0 36px; color: inherit; background: transparent; }
.drawer[data-context-brand="municipal"] .drawer-heading .icon-button { color: inherit; border-color: color-mix(in srgb,currentColor 35%,transparent); background: color-mix(in srgb,currentColor 8%,transparent); }
.profile-summary { display: flex; align-items: center; gap: 12px; margin-bottom: 23px; padding: 14px; border-radius: 18px; background: var(--surface-raised); }
.profile-summary strong, .profile-summary small { display: block; }
.profile-summary strong { font-size: 14px; }
.profile-summary small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.main-menu { display: grid; gap: 4px; }
.main-menu button { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 13px; border: 0; border-radius: 14px; background: transparent; text-align: left; font-size: 14px; }
.main-menu button.current { color: var(--brand-deep); background: color-mix(in srgb, var(--brand) 12%, transparent); }
.main-menu .app-icon { width: 19px; height: 19px; }
.alarm-tree { display: grid; }
.alarm-tree > button b { min-width: 24px; margin-left: auto; padding: 3px 7px; border-radius: 999px; color: var(--on-brand); background: var(--brand-deep); font-size: 10px; text-align: center; }
.alarm-tree > button::after { content: ''; width: 7px; height: 7px; margin-left: 1px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform .18s ease; }
.alarm-tree > button[aria-expanded="false"]::after { transform: rotate(-45deg); }
[data-alarm-tree-items] { position: relative; display: grid; gap: 3px; margin: 2px 0 7px 23px; padding-left: 13px; border-left: 1px solid var(--line); }
.main-menu .alarm-tree-item { position: relative; display: grid; grid-template-columns: 27px minmax(0,1fr) auto; gap: 8px; min-height: 53px; padding: 7px 8px; border-radius: 12px; }
.main-menu .alarm-tree-item::before { content: ''; position: absolute; top: 25px; left: -14px; width: 12px; border-top: 1px solid var(--line); }
.main-menu .alarm-tree-item > .app-icon { width: 17px; height: 17px; margin-top: 3px; color: var(--muted); }
.alarm-tree-item > span { min-width: 0; display: grid; gap: 3px; }
.alarm-tree-item strong,.alarm-tree-item small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.alarm-tree-item strong { font-size: 12px; }
.alarm-tree-item small { color: var(--muted); font-size: 9px; }
.alarm-tree-item em { align-self: start; padding: 3px 5px; border-radius: 6px; font-size: 8px; font-style: normal; font-weight: 700; background: var(--surface-raised); }
.main-menu .alarm-tree-item.selected { background: color-mix(in srgb,var(--brand) 11%,transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb,var(--brand) 24%,transparent); }
.alarm-tree-empty { margin: 5px 6px 9px; color: var(--muted); font-size: 11px; line-height: 1.4; }
.state-green { color: #16834f !important; }
.state-red { color: #cf2939 !important; }
.state-mustard { color: #b78400 !important; }

.theme-settings { margin-top: 21px; padding-top: 17px; border-top: 1px solid var(--line); }
.theme-settings > span { display: block; margin-bottom: 9px; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.theme-settings > div { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.theme-settings button { padding: 8px 4px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-raised); font-size: 11px; }
.theme-settings button.active { color: var(--on-brand); border-color: var(--brand-deep); background: var(--brand-deep); }
.install-action { width: 100%; display: flex; align-items: center; justify-content: center; gap: 9px; margin-top: 12px; padding: 12px; border: 0; border-radius: 13px; color: var(--on-brand); background: var(--brand-deep); font-weight: 700; }
.logout-action { width: 100%; margin-top: 9px; padding: 11px; border: 1px solid var(--line); border-radius: 13px; color: var(--muted); background: transparent; }
.drawer { overflow-y: auto; }
.drawer .update-app-link{display:block;width:fit-content;margin:14px auto 0;padding:4px 6px;border:0;border-radius:0;background:none;color:var(--muted);font-size:13px;text-decoration:underline;text-underline-offset:3px;cursor:pointer}.drawer .update-app-link:hover{color:var(--text)}.drawer .update-app-link:focus-visible{outline:2px solid var(--primary);outline-offset:3px}.drawer .update-app-link[aria-disabled="true"]{opacity:.6;cursor:wait}.drawer .update-app-status{margin:8px 0 0;text-align:center;font-size:12px;color:var(--muted);line-height:1.4}
.service-row.selected { margin-inline: -7px; width: calc(100% + 14px); padding-inline: 7px; border-radius: 13px; background: color-mix(in srgb, var(--brand) 9%, transparent); }
.command-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.command-list[data-count="1"] { grid-template-columns: minmax(0,1fr); }
.command-action { --command-bg: #3e8fd8; --command-fg: #fff; min-width: 0; min-height: 55px; display: flex; align-items: center; justify-content: flex-start; gap: 9px; padding: 9px 10px; border: 2px solid var(--command-bg); border-radius: 13px; color: var(--command-fg); background: color-mix(in srgb,var(--command-bg) 76%,transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb,#fff 10%,transparent); text-align: left; font-weight: 700; }
.command-action:active { transform: scale(.98); }
.command-action img,.command-action > span:first-child { width: 31px; height: 31px; display: grid; place-items: center; flex: 0 0 31px; padding: 4px; border-radius: 9px; background: rgba(255,255,255,.17); object-fit: contain; }
.command-action .app-icon { width: 20px; height: 20px; }
.command-action strong { min-width: 0; overflow: hidden; font-size: 11px; line-height: 1.2; text-overflow: ellipsis; }

.auth-screen { min-height: 100svh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 15% 0%,color-mix(in srgb,var(--brand) 25%,transparent),transparent 42%),var(--app-bg); }
.auth-card { width: min(100%,420px); padding: 28px; border: 1px solid var(--line); border-radius: 28px; background: var(--surface); box-shadow: 0 22px 55px var(--shadow); }
.auth-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 30px; color: var(--brand-deep); font-size: 21px; }
.auth-card h1 { margin-bottom: 9px; font-size: 30px; }
.auth-card p:not(.eyebrow) { color: var(--muted); font-size: 14px; line-height: 1.5; }
.auth-card form,.account-panel form { display: grid; gap: 13px; margin-top: 22px; }
.auth-card label,.account-panel label { display: grid; gap: 6px; color: var(--muted); font-size: 12px; }
.auth-card input,.account-panel input { width: 100%; min-height: 48px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 13px; color: var(--ink); background: var(--surface-raised); font: inherit; }
.auth-card form button,.account-panel form button { min-height: 49px; padding: 11px 16px; border: 0; border-radius: 14px; color: var(--on-brand); background: var(--brand-deep); font-weight: 700; }
.auth-card form small,.account-panel form small { min-height: 18px; color: var(--safe); line-height: 1.4; }
.auth-card form small.error,.account-panel form small.error { color: var(--danger); }
.auth-help { display: block; margin-top: 20px; color: var(--muted); line-height: 1.4; }

.account-panel { position: absolute; inset: 0; z-index: 40; overflow-y: auto; padding: calc(22px + var(--safe-area-top)) 20px calc(35px + var(--safe-area-bottom)); background: var(--app-bg); }
.account-panel > header { max-width: 680px; display: flex; align-items: center; justify-content: space-between; margin: 0 auto 18px; }
.account-panel > form { max-width: 680px; margin: 0 auto 18px; padding: 19px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); }
.account-panel h3 { margin: 0; font-size: 17px; }
.photo-gate { position: absolute; inset: 0; z-index: 60; display: grid; place-items: center; overflow-y: auto; padding: calc(28px + var(--safe-area-top)) 22px calc(28px + var(--safe-area-bottom)); background: radial-gradient(circle at 50% 10%,color-mix(in srgb,var(--brand) 18%,transparent),transparent 24rem),var(--app-bg); }
.photo-gate-card { width: min(100%,390px); padding: 25px; border: 1px solid var(--line); border-radius: 27px; background: var(--surface); box-shadow: 0 22px 55px var(--shadow); text-align: center; }
.photo-gate-card h2 { margin: 7px 0 9px; font-size: 25px; }
.photo-gate-card > p:not(.eyebrow) { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.photo-gate-card form { display: grid; gap: 12px; margin-top: 20px; }
.photo-preview { position: relative; display: grid; place-items: center; width: 154px; height: 154px; margin: 0 auto 3px; overflow: hidden; border: 3px solid color-mix(in srgb,var(--brand) 55%,var(--line)); border-radius: 50%; color: var(--brand-deep); background: var(--surface-raised); font-size: 38px; font-weight: 700; }
.photo-preview.small { width: 78px; height: 78px; flex: 0 0 78px; margin: 0; border-width: 2px; font-size: 20px; }
.photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.photo-picker { position: relative; display: grid !important; place-items: center; min-height: 49px; overflow: hidden; border: 1px solid color-mix(in srgb,var(--brand) 42%,var(--line)); border-radius: 14px; color: var(--brand-deep) !important; background: color-mix(in srgb,var(--brand) 9%,var(--surface)); font-size: 13px !important; font-weight: 700; cursor: pointer; }
.photo-picker input { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0 !important; padding: 0 !important; border: 0 !important; opacity: 0; cursor: pointer; }
.photo-gate-card form > small { color: var(--muted); font-size: 11px; line-height: 1.4; }
.photo-gate-card form > button,.photo-settings > button { min-height: 50px; padding: 11px 16px; border: 0; border-radius: 14px; color: var(--on-brand); background: var(--brand-deep); font-weight: 700; }
.photo-gate-card output,.photo-settings output { min-height: 18px; color: var(--safe); font-size: 11px; line-height: 1.4; }
.photo-gate-card output.error,.photo-settings output.error { color: var(--danger); }
.photo-logout { margin-top: 2px; padding: 9px; border: 0; color: var(--muted); background: transparent; font-size: 12px; }
.photo-account-row { display: flex; align-items: center; gap: 14px; }
.photo-account-row p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.45; }

.dialog-backdrop { position: fixed; z-index: 20; }
.confirmation-sheet { position: fixed; top: 50%; left: 50%; width: min(calc(100vw - 26px),414px); z-index: 21; max-height: calc(100dvh - 26px - var(--safe-area-top) - var(--safe-area-bottom)); overflow-y: auto; overscroll-behavior: contain; padding: 12px 22px 22px; border-radius: 27px; background: var(--surface); box-shadow: 0 18px 45px var(--shadow); text-align: center; transform: translate(-50%,-50%); animation: dialog-in .22s ease-out; }
.sheet-handle { width: 42px; height: 4px; margin: 0 auto 17px; border-radius: 999px; background: var(--line); }
.confirmation-symbol { display: grid; place-items: center; width: 54px; height: 54px; margin: 0 auto 13px; border-radius: 18px; color: var(--danger); background: var(--danger-soft); }
.confirmation-symbol .app-icon { width: 27px; height: 27px; }
.confirmation-symbol img { width: 30px; height: 30px; object-fit: contain; }
.confirmation-sheet h2 { margin-bottom: 8px; }
.confirmation-sheet p { margin-bottom: 19px; color: var(--muted); font-size: 13px; line-height: 1.45; }
.emergency-delay { display: grid; gap: 7px; margin: -4px 0 17px; text-align: left; }
.emergency-delay[hidden] { display: none; }
.emergency-delay > span { color: var(--ink); font-size: 12px; font-weight: 800; }
.emergency-delay input { width: 100%; min-height: 48px; border: 1px solid var(--line); border-radius: 13px; outline: none; padding: 0 14px; color: var(--ink); background: var(--surface-raised); font: inherit; font-size: 18px; font-weight: 800; }
.emergency-delay input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
.emergency-delay small { color: var(--muted); font-size: 11px; }
.emergency-contributions { display: grid; gap: 9px; margin: -5px 0 13px; text-align: left; }
.emergency-comment { display: grid; gap: 5px; color: var(--muted); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .045em; }
.emergency-comment textarea { width: 100%; min-height: 60px; resize: vertical; padding: 9px 11px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background: var(--surface-raised); font: 12px/1.4 Arial,sans-serif; text-transform: none; letter-spacing: normal; }
.emergency-comment textarea:focus { outline: 2px solid color-mix(in srgb,var(--brand) 32%,transparent); border-color: var(--brand); }
.emergency-media { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 7px; }
.emergency-media label, .emergency-media button { position: relative; min-width: 0; min-height: 47px; display: flex; align-items: center; justify-content: center; gap: 6px; overflow: hidden; border: 1px solid color-mix(in srgb,var(--brand) 28%,var(--line)); border-radius: 12px; color: var(--brand-deep); background: color-mix(in srgb,var(--brand) 8%,var(--surface)); font-size: 10px; font-weight: 700; cursor: pointer; }
.emergency-media label.selected, .emergency-media button.selected { color: var(--on-brand); border-color: var(--brand-deep); background: var(--brand-deep); }
.emergency-media label.processing, .emergency-media button.processing { opacity: .62; cursor: progress; }
.emergency-media .app-icon { width: 17px; height: 17px; }
.emergency-media input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.emergency-contributions > small { color: var(--muted); font-size: 9px; line-height: 1.35; text-align: center; }
.emergency-contributions output { min-height: 15px; color: var(--safe); font-size: 10px; line-height: 1.35; text-align: center; }
.emergency-contributions output.error { color: var(--danger); }
.send-contributions { width: 100%; min-height: 52px; border: 0; border-radius: 17px; color: var(--on-brand); background: var(--brand-deep); font-weight: 700; }
.hold-action { position: relative; width: 100%; min-height: 56px; overflow: hidden; border: 0; border-radius: 17px; color: #fff; background: var(--danger); font-weight: 700; touch-action: none; user-select: none; }
.hold-progress { position: absolute; inset: 0 auto 0 0; width: 0; background: rgba(255,255,255,.22); }
.hold-action.holding .hold-progress { width: 100%; transition: width 1.4s linear; }
.hold-action > span:last-child { position: relative; z-index: 1; }
.cancel-action { width: 100%; margin-top: 7px; padding: 11px; border: 0; color: var(--muted); background: transparent; }

.video-recorder-backdrop { z-index: 40; }
.video-recorder { position: absolute; inset: auto 13px calc(13px + var(--safe-area-bottom)); z-index: 41; padding: 18px 18px 15px; border: 1px solid var(--line); border-radius: 26px; color: var(--ink); background: var(--surface); box-shadow: 0 20px 54px var(--shadow); animation: sheet-in .22s ease-out; }
.video-recorder header { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.video-recorder header h2 { margin: 2px 0 0; font-size: 20px; }
.video-recorder header .eyebrow { margin: 0; }
.video-preview-shell { position: relative; overflow: hidden; aspect-ratio: 16/9; border-radius: 18px; background: #030609; }
.video-preview-shell video { width: 100%; height: 100%; display: block; object-fit: cover; }
.video-recording-state { position: absolute; left: 10px; bottom: 10px; padding: 6px 9px; border-radius: 999px; color: #fff; background: rgba(3,6,9,.68); font-size: 10px; font-weight: 700; }
.video-recording-state.recording::before { content: ''; display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: #ff5d6c; box-shadow: 0 0 0 4px rgba(255,93,108,.18); }
.video-torch-action { position: absolute; top: 10px; right: 10px; min-height: 38px; display: inline-flex; align-items: center; gap: 6px; padding: 7px 11px; border: 1px solid rgba(255,255,255,.32); border-radius: 999px; color: #fff; background: rgba(3,6,9,.68); font-size: 10px; font-weight: 700; }
.video-torch-action .app-icon { width: 16px; height: 16px; }
.video-torch-action.active { color: #141006; border-color: #ffd55f; background: #ffd55f; }
.video-recorder-time { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 12px 2px; }
.video-recorder-time strong { font-size: 19px; font-variant-numeric: tabular-nums; }
.video-recorder-time span { color: var(--muted); font-size: 10px; }
.video-recorder output { min-height: 17px; display: block; margin-bottom: 8px; color: var(--muted); font-size: 10px; text-align: center; }
.video-recorder output.error { color: var(--danger); }
.video-record-action { width: 100%; min-height: 54px; border: 0; border-radius: 17px; color: #fff; background: var(--danger); font-weight: 700; }
.video-record-action.recording { color: var(--danger); border: 1px solid var(--danger); background: var(--danger-soft); }

.audio-recorder-backdrop { z-index: 40; }
.audio-recorder { position: absolute; inset: auto 13px calc(13px + var(--safe-area-bottom)); z-index: 41; padding: 18px 18px 15px; border: 1px solid var(--line); border-radius: 26px; color: var(--ink); background: var(--surface); box-shadow: 0 20px 54px var(--shadow); animation: sheet-in .22s ease-out; }
.audio-recorder header { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.audio-recorder header h2 { margin: 2px 0 0; font-size: 20px; }
.audio-recorder header .eyebrow { margin: 0; }
.audio-recorder-visual { min-height: 150px; display: grid; place-items: center; align-content: center; gap: 13px; border-radius: 20px; color: var(--brand-deep); background: color-mix(in srgb,var(--brand) 10%,var(--surface-raised)); }
.audio-recorder-visual .app-icon { width: 42px; height: 42px; }
.audio-recorder-visual span { color: var(--muted); font-size: 11px; font-weight: 700; }
.audio-recorder-visual.recording .app-icon { color: var(--danger); animation: audio-pulse 1.1s ease-in-out infinite; }
.audio-recorder output { min-height: 17px; display: block; margin-bottom: 8px; color: var(--muted); font-size: 10px; text-align: center; }
.audio-recorder output.error { color: var(--danger); }
@keyframes audio-pulse { 50% { transform: scale(1.14); opacity: .68; } }

.events-backdrop,.municipal-requests-backdrop { position: fixed; z-index: 34; }
.events-panel { position: fixed; top: calc(12px + var(--safe-area-top)); bottom: calc(12px + var(--safe-area-bottom)); left: 50%; width: min(calc(100vw - 24px),416px); min-height: 0; z-index: 35; display: flex; flex-direction: column; padding: 20px 18px 16px; overflow: hidden; border: 1px solid var(--line); border-radius: 27px; color: var(--ink); background: var(--surface); box-shadow: 0 22px 58px var(--shadow); transform: translateX(-50%); animation: panel-in .22s ease-out; }
.events-panel > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 0 2px 14px; border-bottom: 1px solid var(--line); }
.events-panel > header h2 { margin: 2px 0 4px; font-size: 23px; }
.events-panel > header small { color: var(--muted); font-size: 11px; }
.events-list { min-height: 0; flex: 1; display: grid; align-content: start; gap: 11px; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 14px 1px; }
.events-empty { margin: 38px 16px; color: var(--muted); font-size: 12px; line-height: 1.5; text-align: center; }
.event-card { --event-color: var(--brand); padding: 14px; border: 1px solid color-mix(in srgb,var(--event-color) 44%,var(--line)); border-left: 4px solid var(--event-color); border-radius: 17px; background: color-mix(in srgb,var(--event-color) 14%,var(--surface-raised)); }
.event-card header { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.event-card h3 { margin: 0; font-size: 13px; line-height: 1.35; }
.event-card time { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; }
.event-state { flex: 0 0 auto; padding: 5px 7px; border-radius: 999px; color: var(--ink); background: color-mix(in srgb,var(--event-color) 16%,var(--surface)); font-size: 8px; font-weight: 800; letter-spacing: .04em; }
.event-card > p { margin: 10px 0 0; color: var(--muted); font-size: 11px; line-height: 1.45; white-space: pre-line; }
.event-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.event-meta span,.event-meta button { padding: 5px 7px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: transparent; font-size: 9px; }
.event-meta button { color: var(--ink); border-color: color-mix(in srgb,var(--event-color) 58%,var(--line)); background: color-mix(in srgb,var(--event-color) 18%,var(--surface)); font-weight: 800; }
.events-refresh { min-height: 48px; display: flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 15px; color: var(--on-brand); background: var(--brand-deep); font-weight: 700; }

.event-photo-viewer { position: fixed; inset: 0; z-index: 50; width: min(100%,440px); min-height: 0; display: flex; flex-direction: column; margin: 0 auto; padding: calc(12px + var(--safe-area-top)) 12px calc(12px + var(--safe-area-bottom)); color: #fff; background: rgba(15,5,0,.97); }
.event-photo-viewer > header { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 52px; padding: 0 4px 10px; }
.event-photo-viewer > header strong { font-size: 15px; }
.event-photo-viewer > header .icon-button { color: #fff; border-color: rgba(255,255,255,.34); background: rgba(255,255,255,.08); }
.event-photo-viewer > div { min-height: 0; flex: 1; display: grid; place-items: center; overflow: hidden; border-radius: 18px; background: #050505; }
.event-photo-viewer img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; }
.event-photo-viewer video { width:100%; max-height:100%; object-fit:contain; }
.event-photo-viewer audio { width:calc(100% - 24px); }
.event-photo-viewer output { min-height: 28px; display: grid; place-items: center; padding-top: 9px; color: rgba(255,255,255,.78); font-size: 10px; }
.event-photo-viewer output.error { color: #ff9d9d; }

.toast, .offline-status { position: absolute; left: 20px; right: 20px; z-index: 30; display: flex; align-items: center; gap: 11px; padding: 15px 17px; border-radius: 16px; color: var(--on-brand); background: var(--brand-deep); box-shadow: 0 14px 34px var(--shadow); font-size: 13px; }
.toast { bottom: calc(24px + var(--safe-area-bottom)); }
.offline-status { top: calc(78px + var(--safe-area-top)); color: var(--ink); background: var(--surface); border: 1px solid var(--line); }

[hidden] { display: none !important; }
body.locked { overflow: hidden; }

@keyframes sheet-in { from { transform: translateY(24px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes dialog-in { from { transform: translate(-50%,calc(-50% + 24px)); opacity: 0; } to { transform: translate(-50%,-50%); opacity: 1; } }
@keyframes panel-in { from { transform: translate(-50%,24px); opacity: 0; } to { transform: translate(-50%,0); opacity: 1; } }

@media (min-width: 520px) {
  body { padding: 20px 0; }
  .app-shell { min-height: calc(100svh - 40px); border: 1px solid var(--line); border-radius: 32px; }
}

@media (max-width: 360px) {
  .home-content, .topbar { padding-left: 15px; padding-right: 15px; }
  .panic-action { min-height: 112px; padding: 18px; }
  .emergency-action { min-height: 95px; padding: 12px; }
  .service-selector { gap: 6px; }
  .service-button { font-size: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
.municipal-tree>[data-municipal-tree]{width:100%}
.municipal-tree>[data-municipal-tree]>b{margin-left:auto;min-width:24px;padding:2px 7px;border-radius:999px;background:var(--surface-strong);font-size:.72rem;text-align:center}
.municipal-tree>[data-municipal-tree-items]{display:grid;gap:4px;padding:4px 0 8px 22px}
.municipal-tree>[data-municipal-tree-items][hidden],.municipal-home[hidden]{display:none}
.municipal-tree-item{display:grid!important;grid-template-columns:26px 1fr!important;align-items:center!important;gap:9px!important;padding:9px 10px!important;border-radius:12px!important;text-align:left!important}
.municipal-tree-item .app-icon{width:20px;height:20px}
.municipal-tree-item span{display:grid;gap:2px;min-width:0}
.municipal-tree-item strong,.municipal-tree-item small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.municipal-tree-item small{color:var(--muted);font-size:.7rem}
.municipal-tree-item.selected{background:color-mix(in srgb,var(--accent) 16%,transparent)!important;color:var(--accent)!important}
.medical-tree>[data-medical-tree]{width:100%}
.medical-tree>[data-medical-tree]>b{margin-left:auto;min-width:24px;padding:2px 7px;border-radius:999px;background:var(--surface-raised);font-size:.72rem;text-align:center}
.medical-tree>[data-medical-tree]::after{content:'';width:7px;height:7px;margin-left:1px;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:rotate(-45deg);transition:transform .18s ease}
.medical-tree>[data-medical-tree][aria-expanded="true"]::after{transform:rotate(45deg) translateY(-2px)}
.medical-tree>[data-medical-tree-items]{display:grid;gap:4px;padding:4px 0 8px 22px}
.medical-tree>[data-medical-tree-items][hidden]{display:none}
.medical-home .active-account-card{margin-top:18px}
.medical-account-icon{display:grid;place-items:center;width:44px;height:44px;border-radius:14px;color:var(--medical);background:color-mix(in srgb,var(--medical) 12%,transparent)}
.medical-address,.medical-actions-empty{color:var(--muted);font-size:12px;line-height:1.5}
.medical-address:empty{display:none}
.medical-action-list{display:grid;gap:12px;margin-top:16px}
.medical-action-list>button{width:100%;cursor:pointer}
.medical-action-list>button:disabled{opacity:1}
.medical-home .medical-action-list{grid-template-columns:minmax(0,1fr);gap:16px}
.medical-home .medical-action-list>button{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;gap:20px;min-height:124px;padding:22px;border:2px solid rgba(255,255,255,.35);border-radius:20px;color:#fff;text-align:left;background:#146c43;box-shadow:0 5px 12px rgba(0,0,0,.15)}
.medical-home .medical-action-list>button .app-icon{width:56px;height:56px;flex:0 0 56px}
.medical-home .medical-action-list>button span{font-size:clamp(24px,6.5vw,30px);font-weight:800;line-height:1.18;overflow-wrap:anywhere}
.medical-home .medical-action-list>.panic-action{background:#bd1835}
.medical-home .medical-action-list>.fire{background:#a73b08}
.medical-home .medical-action-list>.arrival{background:#1556a0}
.medical-home .medical-action-list>.enroute{background:#6639a5}
.medical-home .medical-action-list>button:focus-visible{outline:4px solid var(--ink);outline-offset:4px}
.medical-use-note{font-size:14px;line-height:1.5;color:var(--muted)}
.medical-delay{display:grid;gap:8px;font-size:18px;color:var(--ink)}
.medical-delay input{min-height:52px;font-size:24px;border:1px solid var(--line);border-radius:12px;color:var(--ink);background:var(--surface);padding:10px}
.medical-progress{position:fixed;inset:0;z-index:65;max-width:440px;margin:auto;padding:calc(24px + var(--safe-area-top)) 22px calc(24px + var(--safe-area-bottom));display:flex;flex-direction:column;gap:18px;overflow-y:auto;background:var(--surface);color:var(--ink)}
.medical-progress h2{font-size:28px;margin:0}.medical-progress p{font-size:21px;line-height:1.45;margin:0}
.medical-progress video{width:100%;max-height:40dvh;object-fit:contain;border-radius:16px;background:#111}
.medical-progress button{min-height:60px;padding:14px;border:2px solid var(--line);border-radius:14px;background:var(--surface-raised);color:var(--ink);font-size:20px;font-weight:700}
.medical-progress button:disabled{opacity:.5}
.medical-tree-item{display:grid!important;grid-template-columns:26px 1fr!important;align-items:center!important;gap:9px!important;padding:9px 10px!important;border-radius:12px!important;text-align:left!important}
.medical-tree-item .app-icon{width:20px;height:20px}
.medical-tree-item span{display:grid;gap:2px;min-width:0}
.medical-tree-item strong,.medical-tree-item small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.medical-tree-item small{color:var(--muted);font-size:.7rem}
.medical-tree-item.selected{background:color-mix(in srgb,var(--medical) 12%,transparent)!important;color:var(--medical)!important}
.municipal-home{display:grid;gap:14px}
.municipal-requests-summary{display:grid;grid-template-columns:38px minmax(0,1fr) auto;align-items:center;gap:10px;width:100%;padding:10px 11px;border:1px solid var(--line);border-radius:14px;color:var(--ink);background:color-mix(in srgb,var(--surface-raised) 72%,transparent);text-align:left}
.municipal-requests-icon{display:grid;place-items:center;width:38px;height:38px;border-radius:12px;color:var(--brand-deep);background:color-mix(in srgb,var(--brand) 13%,transparent)}
.municipal-requests-icon .app-icon{width:20px;height:20px}
.municipal-requests-summary>span:nth-child(2){display:grid;gap:2px;min-width:0}
.municipal-requests-summary strong{font-size:.86rem}
.municipal-requests-summary small{overflow:hidden;color:var(--muted);font-size:.7rem;text-overflow:ellipsis;white-space:nowrap}
.municipal-request-counters{display:grid;justify-items:end;gap:3px}
.municipal-request-counters em{padding:3px 7px;border-radius:999px;background:var(--surface);color:var(--muted);font-size:.62rem;font-style:normal;white-space:nowrap}
.municipal-request-counters em:first-child{color:var(--warning);background:color-mix(in srgb,var(--warning) 10%,transparent)}
.municipal-service-description{margin:0;color:var(--muted);font-size:.88rem;line-height:1.45}
.municipal-action-list{display:grid;gap:11px}
.municipal-service-action{display:grid;grid-template-columns:54px 1fr;align-items:center;gap:13px;min-height:82px;padding:13px;border:2px solid var(--municipal-action-bg);border-radius:18px;background:color-mix(in srgb,var(--municipal-action-bg) 80%,transparent);color:var(--municipal-action-fg);text-align:left;box-shadow:0 9px 22px color-mix(in srgb,var(--municipal-action-bg) 18%,transparent)}
.municipal-service-action>span:first-child{display:grid;place-items:center;width:54px;height:54px;border-radius:15px;background:color-mix(in srgb,var(--municipal-action-fg) 15%,transparent)}
.municipal-service-action img{width:34px;height:34px;object-fit:contain}
.municipal-service-action .app-icon{width:30px;height:30px}
.municipal-service-action>span:last-child{display:grid;gap:4px}
.municipal-service-action strong{font-size:.98rem}
.municipal-service-action small{font-size:.76rem;line-height:1.35;opacity:.88}
.municipal-action-empty{margin:18px 0;padding:22px;border:1px dashed var(--line);border-radius:16px;color:var(--muted);text-align:center}
.municipal-requests-backdrop{z-index:36}
.municipal-requests-panel{z-index:37}
.municipal-requests-list{flex:1;display:grid;align-content:start;gap:10px;overflow-y:auto;padding:14px 1px}
.municipal-request-item{padding:13px;border:1px solid var(--line);border-left:4px solid var(--danger);border-radius:16px;background:var(--surface-raised)}
.municipal-request-item[data-state="PENDIENTE"]{border-left-color:var(--danger)}
.municipal-request-item[data-state="EN_GESTION"]{border-left-color:var(--fire)}
.municipal-request-item[data-state="RESUELTA"]{border-left-color:var(--safe)}
.municipal-request-item[data-state="CANCELADA"]{border-left-color:var(--muted)}
.municipal-request-item>header{display:flex;align-items:center;justify-content:space-between;gap:10px}
.municipal-request-item>header span{color:var(--muted);font-size:.68rem}
.municipal-request-item>header em{padding:4px 7px;border-radius:999px;background:var(--surface);font-size:.62rem;font-style:normal;font-weight:800}
.municipal-request-item[data-state="PENDIENTE"]>header em{color:var(--danger);background:color-mix(in srgb,var(--danger) 12%,transparent)}
.municipal-request-item[data-state="EN_GESTION"]>header em{color:var(--fire);background:color-mix(in srgb,var(--fire) 12%,transparent)}
.municipal-request-item[data-state="RESUELTA"]>header em{color:var(--safe);background:color-mix(in srgb,var(--safe) 12%,transparent)}
.municipal-request-item[data-state="CANCELADA"]>header em{color:var(--muted);background:color-mix(in srgb,var(--muted) 12%,transparent)}
.municipal-request-item h3{margin:9px 0 0;font-size:.88rem}
.municipal-request-item>p,.municipal-request-resolution p{margin:6px 0 0;color:var(--muted);font-size:.72rem;line-height:1.45;white-space:pre-line}
.municipal-request-item>small{display:block;margin-top:8px;color:var(--muted);font-size:.64rem}
.municipal-request-resolution{margin-top:10px;padding:9px 10px;border-radius:11px;background:color-mix(in srgb,var(--safe) 8%,transparent)}
.municipal-request-resolution strong{color:var(--safe);font-size:.68rem}
@media (min-width:560px){.municipal-action-list{grid-template-columns:repeat(2,minmax(0,1fr))}}
