:root {
  --brand-red: #e31f2d;
  --brand-red-dark: #a81420;
  --ink: #1e293b;
  --muted: #64748b;
  --line: #d7dee8;
  --surface: #ffffff;
  --field: #f7f9fc;
  --page: #edf2f7;
  --focus: #008b8f;
  --success: #11845b;
  --warning: #b7791f;
  --shadow: 0 24px 60px rgba(21, 38, 63, 0.18);
  color-scheme: light;
  font-family: "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background:
    linear-gradient(135deg, rgba(227, 31, 45, 0.09), transparent 36%),
    linear-gradient(315deg, rgba(0, 139, 143, 0.11), transparent 34%),
    var(--page);
  color: var(--ink);
}

body[data-view="admin"] {
  background: #f4f7fb;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

.auth-page {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 24px;
}

body[data-view="admin"] .auth-page {
  display: none;
}

.auth-page::before,
.auth-page::after {
  content: "";
  position: fixed;
  inset: auto 0 0;
  height: 42%;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.8), transparent 58%),
    repeating-linear-gradient(
      135deg,
      rgba(30, 41, 59, 0.05) 0,
      rgba(30, 41, 59, 0.05) 1px,
      transparent 1px,
      transparent 16px
    );
}

.auth-page::after {
  inset: 0 0 auto;
  height: 34%;
  transform: rotate(180deg);
  opacity: 0.55;
}

.splash {
  position: fixed;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--surface);
  animation: splash-out 3.2s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.splash__content {
  width: min(560px, 100%);
  display: grid;
  justify-items: center;
  text-align: center;
  animation: splash-glow 2.1s ease-in-out both;
}

.splash__logo {
  width: clamp(116px, 18vw, 180px);
  height: auto;
  margin-bottom: 24px;
  filter: drop-shadow(0 16px 22px rgba(227, 31, 45, 0.16));
}

.splash h1,
.splash p {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0;
}

.splash h1 {
  max-width: 580px;
  font-size: clamp(23px, 4.2vw, 38px);
  line-height: 1.32;
  font-weight: 600;
  color: var(--brand-red-dark);
}

.splash p {
  margin-top: 16px;
  font-size: clamp(17px, 3.1vw, 28px);
  line-height: 1.36;
  font-weight: 500;
  color: #22324a;
}

.splash span {
  margin-top: 26px;
  font-size: clamp(20px, 3.4vw, 32px);
  font-weight: 600;
  color: var(--focus);
}

.auth-greeting--logout {
  display: none;
}

html[data-logout-return="true"] .auth-greeting--welcome {
  display: none;
}

html[data-logout-return="true"] .auth-greeting--logout {
  display: block;
}

body.is-logout-farewell .splash {
  visibility: visible;
  opacity: 1;
  z-index: 9;
  animation: logout-farewell-out 2.2s ease forwards;
}

body.is-logout-farewell .splash__content {
  animation: logout-farewell-glow 1.35s ease both;
}

body.is-logout-complete .splash {
  visibility: hidden;
  opacity: 0;
  animation: none;
}

.flash {
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: #ffffff;
  opacity: 0;
  animation: flash-in 3.2s ease forwards;
}

.login-intro {
  --intro-duration: 1.5s;
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.94) 0 26%, rgba(255, 255, 255, 0.88) 27% 100%),
    var(--surface);
  opacity: 0;
  pointer-events: none;
}

.login-intro.is-active {
  animation: login-intro-fade var(--intro-duration) ease both;
}

.login-intro__stage {
  width: 260px;
  height: 260px;
  position: relative;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 7px;
  text-align: center;
}

.login-intro__logo {
  width: 92px;
  height: auto;
  filter: drop-shadow(0 16px 24px rgba(168, 20, 32, 0.18));
}

.login-intro__stage strong {
  margin-top: 8px;
  color: var(--brand-red-dark);
  font-size: 20px;
  font-weight: 800;
}

.login-intro__stage small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0;
}

.login-intro__orbit {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  animation: login-star-orbit 1.5s linear infinite;
}

.login-intro__orbit span {
  --angle: calc(var(--i) * 22.5deg);
  position: absolute;
  top: 50%;
  left: 50%;
  width: 14px;
  height: 14px;
  background: var(--brand-red);
  clip-path: polygon(
    50% 0%,
    61% 35%,
    98% 35%,
    68% 57%,
    79% 91%,
    50% 70%,
    21% 91%,
    32% 57%,
    2% 35%,
    39% 35%
  );
  transform: translate(-50%, -50%) rotate(var(--angle)) translateY(-112px) rotate(calc(-1 * var(--angle)));
}

.login-panel {
  position: relative;
  z-index: 1;
  width: min(440px, 100%);
  padding: clamp(28px, 5vw, 40px);
  border: 1px solid rgba(215, 222, 232, 0.92);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  opacity: 0;
  transform: translateY(18px) scale(0.98);
  transition:
    opacity 0.65s ease,
    transform 0.65s ease;
}

body.is-ready .login-panel {
  opacity: 1;
  transform: translateY(0) scale(1);
}

body.is-login-transition .login-panel,
body.is-logout-transition .login-panel,
body.is-logout-farewell .login-panel {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(18px) scale(0.98);
}

.login-panel__brand {
  display: grid;
  justify-items: center;
  gap: 14px;
  margin-bottom: 30px;
  text-align: center;
}

.login-panel__logo {
  width: 118px;
  max-width: 34vw;
  height: auto;
}

.login-panel__unit {
  color: var(--focus);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.login-panel__title {
  display: grid;
  gap: 10px;
}

.login-panel__title strong,
.login-panel__title span {
  text-transform: uppercase;
  letter-spacing: 0;
}

.login-panel__title strong {
  color: var(--brand-red-dark);
  font-size: clamp(17px, 4.2vw, 20px);
  line-height: 1.34;
  font-weight: 600;
}

.login-panel__title span {
  color: var(--ink);
  font-size: clamp(14px, 3.5vw, 17px);
  line-height: 1.38;
  font-weight: 500;
}

.login-form {
  display: grid;
  gap: 16px;
}

.field,
.inline-form label {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

.field input,
.inline-form input,
.inline-form select,
.search-input,
.note-form textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--field);
  color: var(--ink);
  padding: 0 14px;
  outline: none;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

.field input {
  min-height: 48px;
}

.note-form textarea {
  min-height: 108px;
  padding: 12px 14px;
  resize: vertical;
}

.field input:focus,
.inline-form input:focus,
.inline-form select:focus,
.search-input:focus,
.note-form textarea:focus {
  border-color: var(--focus);
  background: var(--surface);
  box-shadow: 0 0 0 4px rgba(0, 139, 143, 0.13);
}

.login-form__options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 28px;
  color: var(--muted);
  font-size: 13px;
}

.remember {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.remember input {
  width: 16px;
  height: 16px;
  accent-color: var(--brand-red);
}

.link-button {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--brand-red-dark);
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.link-button:focus-visible,
.primary-button:focus-visible,
.secondary-button:focus-visible,
.nav-item:focus-visible,
.mobile-nav__item:focus-visible,
.table-action:focus-visible,
.map-top-tools button:focus-visible {
  outline: 3px solid rgba(0, 139, 143, 0.28);
  outline-offset: 3px;
}

.primary-button,
.secondary-button,
.table-action {
  min-height: 42px;
  border-radius: 6px;
  font-weight: 800;
}

.primary-button {
  border: 0;
  background: linear-gradient(180deg, var(--brand-red), var(--brand-red-dark));
  color: #ffffff;
  box-shadow: 0 14px 24px rgba(168, 20, 32, 0.24);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

.primary-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 30px rgba(168, 20, 32, 0.28);
}

.primary-button:active {
  transform: translateY(0);
}

.secondary-button,
.table-action {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  padding: 0 14px;
}

.table-action {
  min-height: 34px;
  color: var(--brand-red-dark);
  font-size: 12px;
}

.form-message {
  min-height: 20px;
  margin: 0;
  color: var(--brand-red-dark);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.admin-shell {
  position: relative;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  overflow: hidden;
  isolation: isolate;
}

body[data-view="admin"] .admin-shell {
  animation: shell-reflect-in 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

body[data-view="admin"] .admin-shell::before {
  content: "";
  position: absolute;
  inset: -18%;
  z-index: 3;
  pointer-events: none;
  background: linear-gradient(
    115deg,
    transparent 0%,
    transparent 38%,
    rgba(255, 255, 255, 0.55) 48%,
    rgba(255, 255, 255, 0.18) 54%,
    transparent 66%,
    transparent 100%
  );
  transform: translateX(-125%) skewX(-14deg);
  animation: reflection-sweep 0.78s ease-out 0.12s both;
}

.admin-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 20px;
  padding: 24px 18px;
  border-right: 1px solid var(--line);
  background: #ffffff;
}

.admin-sidebar,
.admin-workspace {
  z-index: 1;
}

.sidebar-brand {
  display: grid;
  grid-template-columns: 56px 1fr;
  align-items: center;
  gap: 12px;
}

.sidebar-brand img {
  width: 56px;
  height: auto;
}

.sidebar-brand strong {
  display: block;
  color: var(--brand-red-dark);
  font-size: 18px;
  line-height: 1.2;
}

.sidebar-brand span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.sidebar-profile {
  display: grid;
  justify-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  padding: 16px 12px;
  text-align: center;
}

.sidebar-profile__photo {
  width: 88px;
  height: 88px;
  border: 3px solid #ffffff;
  border-radius: 50%;
  background: #eef3f8;
  box-shadow: 0 12px 30px rgba(21, 38, 63, 0.16);
  object-fit: cover;
}

.sidebar-profile__name {
  margin-top: 4px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.25;
}

.sidebar-profile__title,
.sidebar-profile__profession {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.25;
}

.sidebar-profile__title {
  color: var(--brand-red-dark);
}

.sidebar-nav {
  display: grid;
  align-content: start;
  gap: 8px;
}

.nav-item,
.mobile-nav__item {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  font-weight: 700;
  text-align: left;
}

.nav-item {
  padding: 0 14px;
}

.nav-item:hover,
.nav-item.is-active,
.mobile-nav__item.is-active {
  border-color: rgba(227, 31, 45, 0.18);
  background: rgba(227, 31, 45, 0.08);
  color: var(--brand-red-dark);
}

.admin-workspace {
  min-width: 0;
  padding: 24px;
}

.admin-topbar,
.panel-heading,
.card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.admin-topbar {
  min-height: 86px;
  margin-bottom: 22px;
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.eyebrow {
  display: block;
  margin-bottom: 6px;
  color: var(--focus);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.admin-topbar h1,
.panel-heading h2,
.card-heading h3 {
  margin: 0;
  color: var(--ink);
  letter-spacing: 0;
}

.admin-topbar h1 {
  font-size: clamp(20px, 2.5vw, 28px);
  line-height: 1.25;
  font-weight: 650;
}

.map-top-tools {
  display: none;
}

.map-top-tools button {
  position: relative;
  isolation: isolate;
  width: 74px;
  height: 100%;
  overflow: hidden;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  padding: 0;
  font-size: 11px;
  font-weight: 850;
  transition:
    color 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease,
    transform 0.3s ease;
}

.map-top-tools button:last-child {
  border-right: 0;
}

.map-top-tools button::before {
  content: "";
  position: absolute;
  inset: 100% 0 0;
  z-index: -1;
  background: linear-gradient(
    0deg,
    rgba(168, 20, 32, 0.42) 0%,
    rgba(227, 31, 45, 0.22) 52%,
    rgba(255, 255, 255, 0.82) 100%
  );
  transition: inset 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}

.map-top-tools button:hover {
  color: #ffffff;
  box-shadow: inset 0 -2px 0 rgba(168, 20, 32, 0.62);
  transform: none;
}

.map-top-tools button:hover::before {
  inset: 0;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.admin-badge,
.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.admin-badge {
  background: rgba(0, 139, 143, 0.12);
  color: #05676b;
}

.mobile-nav {
  display: none;
}

.admin-panel {
  display: none;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.admin-panel.is-active {
  display: grid;
  gap: 18px;
  animation: panel-reflect-in 0.42s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.admin-panel.is-active::before {
  content: "";
  position: absolute;
  inset: -16%;
  z-index: 4;
  pointer-events: none;
  background: linear-gradient(
    112deg,
    transparent 0%,
    transparent 34%,
    rgba(255, 255, 255, 0.72) 47%,
    rgba(255, 255, 255, 0.2) 55%,
    transparent 68%,
    transparent 100%
  );
  transform: translateX(-125%) skewX(-16deg);
  animation: reflection-sweep 0.64s ease-out both;
}

.panel-heading {
  min-height: 66px;
}

.panel-heading h2 {
  font-size: clamp(22px, 2.2vw, 30px);
  line-height: 1.25;
  font-weight: 650;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.metric-card,
.admin-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.metric-card {
  display: grid;
  gap: 10px;
  padding: 18px;
}

.metric-card span,
.metric-card small,
.note-list small,
.activity-list small {
  color: var(--muted);
}

.metric-card span {
  font-size: 13px;
  font-weight: 800;
}

.metric-card strong {
  color: var(--brand-red-dark);
  font-size: clamp(30px, 4vw, 42px);
  line-height: 1;
}

.metric-card small {
  font-size: 12px;
  line-height: 1.45;
}

.module-catalog {
  display: grid;
  gap: 24px;
  align-items: start;
}

.module-category {
  display: grid;
  min-width: 0;
  gap: 12px;
}

.module-category__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.module-category__heading h3 {
  margin: 0;
  color: var(--ink);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.25;
}

.module-category__heading span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.module-tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, 150px);
  gap: 12px;
  align-items: start;
}

.module-tile {
  width: 150px;
  height: 150px;
  display: grid;
  align-content: start;
  gap: 8px;
  overflow: hidden;
  border: 1px solid rgba(215, 222, 232, 0.96);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  padding: 14px;
  text-align: left;
  text-decoration: none;
  box-shadow: 0 10px 22px rgba(21, 38, 63, 0.08);
  transition:
    border-color 0.24s ease,
    box-shadow 0.24s ease,
    transform 0.24s ease,
    background 0.24s ease;
}

.module-tile:hover {
  border-color: rgba(227, 31, 45, 0.34);
  background: linear-gradient(180deg, #ffffff 0%, #fff8f8 100%);
  box-shadow: 0 14px 28px rgba(168, 20, 32, 0.16);
  transform: translateY(-2px);
}

.module-tile:focus-visible {
  outline: 3px solid rgba(0, 139, 143, 0.28);
  outline-offset: 3px;
}

.module-tile strong,
.module-tile span {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
}

.module-tile strong {
  color: var(--brand-red-dark);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.22;
  -webkit-line-clamp: 3;
}

.module-tile span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  line-height: 1.28;
  -webkit-line-clamp: 5;
}

.overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.8fr);
  gap: 14px;
}

.admin-card {
  padding: 18px;
}

.card-heading {
  margin-bottom: 14px;
}

.card-heading h3 {
  font-size: 18px;
  font-weight: 650;
}

.activity-list,
.note-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.activity-list li,
.note-list li,
.announcement-item {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfcfe;
  padding: 12px;
}

.activity-list strong,
.note-list strong {
  display: block;
  margin-bottom: 4px;
  font-size: 14px;
}

.note-form {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.inline-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  align-items: end;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.institution-form {
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
}

.announcement-form {
  grid-template-columns: minmax(220px, 0.65fr) minmax(260px, 1fr) auto;
}

.map-stack {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.map-preview {
  position: relative;
  min-height: calc(100vh - 206px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #dce6ef;
}

.map-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.map-canvas > span {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 1;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  transform: translate(-50%, -50%);
}

.map-canvas .leaflet-control-attribution {
  font-size: 10px;
}

.province-map-label {
  pointer-events: none;
}

.province-map-label span {
  position: absolute;
  left: 0;
  top: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  min-height: 18px;
  padding: 1px 6px 2px;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 4px;
  background: rgba(115, 16, 24, 0.45);
  color: #ffffff;
  font-size: 11px;
  font-weight: 750;
  line-height: 1.2;
  white-space: nowrap;
  text-shadow: 0 1px 2px rgba(15, 23, 42, 0.72);
  box-shadow: 0 5px 14px rgba(15, 23, 42, 0.22);
  transform: translate(-50%, -50%);
}

.district-map-label {
  pointer-events: none;
}

.district-map-label span {
  position: absolute;
  left: 0;
  top: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  min-height: 16px;
  padding: 1px 5px 2px;
  border: 1px solid rgba(255, 255, 255, 0.44);
  border-radius: 4px;
  background: rgba(8, 93, 98, 0.58);
  color: #ffffff;
  font-size: 10px;
  font-weight: 760;
  line-height: 1.2;
  white-space: nowrap;
  text-shadow: 0 1px 2px rgba(15, 23, 42, 0.7);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.18);
  transform: translate(-50%, -50%);
}

.neighborhood-map-label {
  pointer-events: none;
}

.neighborhood-map-label span {
  position: absolute;
  left: 0;
  top: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  min-height: 15px;
  padding: 1px 5px 2px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 4px;
  background: rgba(255, 47, 104, 0.84);
  color: #ffffff;
  font-size: 9px;
  font-weight: 800;
  line-height: 1.15;
  white-space: nowrap;
  text-shadow: 0 1px 2px rgba(15, 23, 42, 0.78);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.2);
  transform: translate(-50%, -50%);
}

.street-road-map-label {
  pointer-events: none;
}

.street-road-map-label span {
  position: absolute;
  left: 0;
  top: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  min-height: 16px;
  padding: 0 5px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--street-label-color, #ffffff);
  font-size: 10px;
  font-weight: 850;
  line-height: 1.2;
  white-space: nowrap;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.98),
    0 0 5px rgba(0, 0, 0, 0.9),
    0 0 1px #ffffff;
  box-shadow: none;
  transform: translate(-50%, -50%) rotate(var(--street-label-angle, 0deg));
  transform-origin: center center;
}

.map-service-bar {
  min-height: 42px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 6px;
}

.map-service-bar div {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  border-radius: 6px;
  background: #fbfcfe;
  padding: 0 10px;
}

.map-service-bar span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.map-service-bar strong {
  color: var(--success);
  font-size: 13px;
  white-space: nowrap;
}

.search-input {
  max-width: 320px;
}

.institution-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.result-count {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}

th,
td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

th {
  background: #f8fafc;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

td {
  color: var(--ink);
  font-size: 14px;
}

tr:last-child td {
  border-bottom: 0;
}

.status-pill.is-active,
.status-pill.is-approved {
  background: rgba(17, 132, 91, 0.12);
  color: var(--success);
}

.status-pill.is-review,
.status-pill.is-pending {
  background: rgba(183, 121, 31, 0.14);
  color: var(--warning);
}

.status-pill.is-passive {
  background: rgba(100, 116, 139, 0.16);
  color: var(--muted);
}

.row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.announcement-list {
  display: grid;
  gap: 12px;
}

.announcement-item h3 {
  margin: 0 0 8px;
  font-size: 17px;
}

.announcement-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

@keyframes splash-glow {
  0% {
    opacity: 0;
    transform: translateY(16px) scale(0.96);
  }
  38%,
  78% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-12px) scale(1.02);
  }
}

@keyframes splash-out {
  0%,
  68% {
    opacity: 1;
    visibility: visible;
  }
  100% {
    opacity: 0;
    visibility: hidden;
  }
}

@keyframes login-intro-fade {
  0% {
    opacity: 0;
    transform: scale(0.98);
  }
  16%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes login-star-orbit {
  to {
    transform: rotate(360deg);
  }
}

@keyframes logout-farewell-glow {
  0% {
    opacity: 0;
    transform: translateY(14px) scale(0.96);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes logout-farewell-out {
  0%,
  70% {
    opacity: 1;
    visibility: visible;
  }
  100% {
    opacity: 0;
    visibility: hidden;
  }
}

@keyframes flash-in {
  0%,
  62% {
    opacity: 0;
  }
  72% {
    opacity: 0.92;
  }
  100% {
    opacity: 0;
  }
}

@keyframes shell-reflect-in {
  0% {
    opacity: 0;
    transform: scale(0.985);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes panel-reflect-in {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes reflection-sweep {
  0% {
    opacity: 0;
    transform: translateX(-125%) skewX(-16deg);
  }
  18% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateX(125%) skewX(-16deg);
  }
}

@media (max-width: 1100px) {
  .admin-shell {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    display: none;
  }

  .mobile-nav {
    display: flex;
    gap: 8px;
    margin-bottom: 18px;
    overflow-x: auto;
  }

  .mobile-nav__item {
    flex: 0 0 auto;
    padding: 0 14px;
  }

  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .admin-workspace {
    padding: 14px;
  }

  .admin-topbar,
  .panel-heading,
  .topbar-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .metric-grid,
  .overview-grid,
  .inline-form,
  .institution-form,
  .announcement-form {
    grid-template-columns: 1fr;
  }

  .search-input {
    max-width: none;
  }

  .institution-tools {
    align-items: stretch;
    flex-direction: column;
    width: 100%;
  }

  .map-preview {
    min-height: 520px;
  }

  .map-service-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .auth-page {
    padding: 18px;
  }

  .login-panel {
    padding: 24px 20px;
  }

  .login-form__options {
    align-items: flex-start;
    flex-direction: column;
  }

  .map-preview {
    min-height: 340px;
  }

  .map-service-bar {
    grid-template-columns: 1fr;
  }
}

body[data-active-section="map-management"] {
  overflow: hidden;
}

body[data-active-section="map-management"] .admin-shell {
  height: 100vh;
  height: 100dvh;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
}

body[data-active-section="map-management"] .admin-workspace {
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

body[data-active-section="map-management"] .admin-topbar,
body[data-active-section="map-management"] .mobile-nav,
body[data-active-section="map-management"] .map-service-bar {
  flex: 0 0 auto;
}

body[data-active-section="map-management"] .admin-topbar {
  min-height: 76px;
  overflow: hidden;
  padding: 0 22px 0 0;
}

body[data-active-section="map-management"] .admin-topbar__identity {
  display: none;
}

body[data-active-section="map-management"] .map-top-tools {
  width: auto;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  align-self: stretch;
  gap: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
}

body[data-active-section="map-management"] .map-top-tools button {
  flex: 0 0 74px;
  min-height: 76px;
}

body[data-active-section="map-management"] .admin-panel[data-panel="map-management"].is-active {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
}

body[data-active-section="map-management"] .map-stack {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

body[data-active-section="map-management"] .map-preview {
  flex: 1 1 auto;
  height: auto;
  min-height: 0;
}

@media (max-width: 760px) {
  body[data-active-section="map-management"] .admin-topbar {
    align-items: flex-start;
    flex-direction: row;
  }

  body[data-active-section="map-management"] .map-top-tools {
    max-width: 100%;
    flex-wrap: wrap;
  }
}

@media (max-width: 480px) {
  body[data-active-section="map-management"] .map-top-tools {
    gap: 0;
  }

  body[data-active-section="map-management"] .map-top-tools button {
    flex-basis: 68px;
    width: 68px;
    height: 100%;
    font-size: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
