:root {
  color-scheme: light;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #1d2c24;
  background: #f3f6f2;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
}

a {
  color: #176b45;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem max(1rem, calc((100% - 1180px) / 2));
  color: #fff;
  background: #174b35;
}

.brand {
  color: #fff;
  font-size: 1.1rem;
  font-weight: 750;
  text-decoration: none;
}

nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

nav a,
.link-button {
  color: #fff;
  text-decoration: none;
}

.container {
  width: min(1180px, calc(100% - 2rem));
  min-height: calc(100vh - 130px);
  margin: 1.5rem auto;
}

.hero,
.card,
.auth-card {
  margin-bottom: 1.25rem;
  padding: 1.35rem;
  border: 1px solid #dce5dc;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 2px 8px rgb(21 55 38 / 5%);
}

.hero {
  color: #fff;
  background: linear-gradient(120deg, #174b35, #33734d);
}

.hero h1,
.card h1,
.auth-card h1 {
  margin-top: 0;
}

.eyebrow,
.muted,
small {
  color: #627268;
}

.hero .eyebrow,
.hero p {
  color: #e1eee5;
}

.stats,
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
  gap: 1rem;
}

.stats .card {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  margin: 0;
}

.stat {
  color: #176b45;
  font-size: 2rem;
  font-weight: 750;
}

.form-card {
  margin: 0;
}

.auth-card {
  width: min(460px, 100%);
  margin: 4rem auto;
}

form {
  display: grid;
  gap: 1rem;
}

.form-card form {
  gap: .8rem;
}

label {
  display: grid;
  gap: .35rem;
  font-weight: 650;
}

input,
select,
button,
.button {
  min-height: 42px;
  padding: .6rem .75rem;
  border: 1px solid #b9c9bd;
  border-radius: 7px;
  font: inherit;
}

input,
select {
  width: 100%;
  background: #fff;
}

button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  color: #fff;
  border-color: #176b45;
  background: #176b45;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

button:hover,
.button:hover {
  background: #105639;
}

.button-danger {
  min-height: 34px;
  padding: .35rem .6rem;
  border-color: #a53d33;
  background: #a53d33;
}

.link-button {
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  font-weight: 500;
}

.inline-form {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
}

.form-actions {
  align-self: end;
}

.notice {
  margin: 0 0 1rem;
  padding: .85rem 1rem;
  border-radius: 8px;
}

.notice-success {
  color: #174b35;
  background: #e1f3e7;
}

.notice-error {
  color: #7a211b;
  background: #ffebe8;
}

.cascade-error {
  grid-column: 1 / -1;
  margin: 0;
  color: #7a211b;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: .7rem;
  border-bottom: 1px solid #e0e8e1;
  text-align: left;
  vertical-align: top;
}

th {
  background: #f4f7f4;
}

.link-list {
  padding-left: 1.2rem;
  line-height: 2;
}

.footer {
  padding: 1rem;
  color: #627268;
  text-align: center;
}

@media (max-width: 700px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  nav {
    gap: .75rem;
  }

  .container {
    width: min(100% - 1rem, 1180px);
    margin: .75rem auto;
  }

  .card,
  .hero,
  .auth-card {
    padding: 1rem;
  }
}

body:not(.login-page) {
  background: #f3f6f2;
}

.app-layout {
  display: grid;
  grid-template-columns: 258px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  height: 100vh;
  flex-direction: column;
  padding: 1.15rem .9rem;
  color: #e6f0e9;
  background: #133b2d;
}

.sidebar .brand,
.login-topbar .brand {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .5rem .55rem 1.4rem;
  color: #fff;
  font-size: 1rem;
  line-height: 1.25;
}

.brand small {
  display: block;
  margin-top: .2rem;
  color: #afc8b7;
  font-size: .72rem;
  font-weight: 450;
}

.brand-mark {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  place-items: center;
  border: 1px solid rgb(255 255 255 / 24%);
  border-radius: 12px;
  color: #fff;
  background: #438d5e;
  font-size: 1.25rem;
  font-weight: 800;
}

.side-nav {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: .25rem;
  margin-top: .5rem;
}

.side-nav .nav-link {
  display: flex;
  align-items: center;
  gap: .75rem;
  min-height: 43px;
  padding: .65rem .75rem;
  border-radius: 8px;
  color: #d3e2d8;
  font-size: .9rem;
  text-decoration: none;
}

.side-nav .nav-link:hover,
.side-nav .nav-link.active {
  color: #fff;
  background: #285741;
}

.side-nav .nav-link.active {
  box-shadow: inset 3px 0 #9cdda9;
}

.nav-icon {
  display: inline-grid;
  width: 1.2rem;
  place-items: center;
  color: #b7d7c1;
  font-size: 1.1rem;
}

.nav-group {
  margin-top: .75rem;
}

.nav-group summary {
  padding: .45rem .75rem;
  color: #9eb9a7;
  font-size: .7rem;
  font-weight: 750;
  letter-spacing: .1em;
  list-style: none;
  text-transform: uppercase;
  cursor: pointer;
}

.nav-group summary::-webkit-details-marker {
  display: none;
}

.nav-group summary::after {
  float: right;
  content: "⌄";
}

.nav-group:not([open]) summary::after {
  content: "›";
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .8rem .35rem .2rem;
  border-top: 1px solid rgb(255 255 255 / 14%);
}

.user-avatar {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  place-items: center;
  border-radius: 50%;
  color: #184a32;
  background: #d5efdc;
}

.user-details {
  display: grid;
  min-width: 0;
  flex: 1;
  gap: .18rem;
  font-size: .8rem;
}

.user-details strong,
.user-details small {
  overflow: hidden;
  color: #fff;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-details small {
  color: #afc8b7;
}

.icon-button,
.menu-toggle {
  width: 38px;
  min-height: 38px;
  padding: .35rem;
  border: 0;
  color: #d6e8dc;
  background: transparent;
  font-size: 1.25rem;
}

.icon-button:hover,
.menu-toggle:hover {
  background: rgb(255 255 255 / 12%);
}
.icon-button.logout-button {
  color: #ffe5e5;
  background: rgb(220 38 38 / 30%);
  border: 1px solid rgb(255 135 135 / 55%);
}
.icon-button.logout-button:hover {
  background: rgb(220 38 38 / 48%);
}

.app-main {
  display: flex;
  min-width: 0;
  min-height: 100vh;
  flex-direction: column;
}

.app-main .topbar {
  position: sticky;
  z-index: 4;
  top: 0;
  min-height: 72px;
  justify-content: flex-start;
  padding: .75rem 1.5rem;
  border-bottom: 1px solid #e1e9e2;
  color: #1d2c24;
  background: rgb(255 255 255 / 94%);
  backdrop-filter: blur(12px);
}

.page-heading {
  display: grid;
  gap: .15rem;
  font-size: .95rem;
}

.page-heading .eyebrow {
  font-size: .67rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.topbar-role {
  margin-left: auto;
  padding: .35rem .65rem;
  border-radius: 999px;
  color: #286343;
  background: #e4f2e7;
  font-size: .75rem;
  font-weight: 700;
}

.menu-toggle,
.sidebar-backdrop {
  display: none;
}

.app-main .container {
  width: min(1320px, calc(100% - 3rem));
  flex: 1;
  margin: 1.5rem auto;
}

.app-main .footer {
  border-top: 1px solid #e1e9e2;
}

.login-page {
  min-height: 100vh;
  color: #20372a;
  background:
    radial-gradient(ellipse at 18% 22%, rgb(91 153 94 / 20%), transparent 34%),
    linear-gradient(135deg, #123b2c 0%, #1f5a3b 52%, #e8f0e7 52%, #f5f7f3 100%);
}

.login-topbar {
  padding: 1.25rem clamp(1rem, 5vw, 5rem);
}

.login-topbar .brand {
  display: inline-flex;
  padding: 0;
}

.login-page .container {
  display: grid;
  width: min(1120px, calc(100% - 2rem));
  min-height: calc(100vh - 100px);
  place-items: center;
  margin: 0 auto;
}

.login-layout {
  display: grid;
  width: 100%;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 430px);
  align-items: center;
  gap: clamp(2rem, 7vw, 6rem);
  padding: 2rem 0 4rem;
}

.login-intro {
  max-width: 580px;
  color: #fff;
}

.login-kicker {
  display: inline-block;
  margin-bottom: 1.1rem;
  padding: .45rem .75rem;
  border: 1px solid rgb(255 255 255 / 28%);
  border-radius: 999px;
  color: #d9efdf;
  background: rgb(255 255 255 / 8%);
  font-size: .78rem;
}

.login-intro h1 {
  margin: 0;
  font-size: clamp(2.4rem, 5.2vw, 4.5rem);
  letter-spacing: -.055em;
  line-height: 1.04;
}

.login-intro h1 span {
  color: #a9e3b1;
}

.login-intro > p {
  max-width: 420px;
  color: #d7e8da;
  font-size: 1.05rem;
  line-height: 1.7;
}

.login-stats {
  display: flex;
  gap: 2rem;
  margin-top: 2.5rem;
}

.login-stats span {
  display: grid;
  gap: .2rem;
}

.login-stats strong {
  color: #d1f1d7;
  font-size: 1.3rem;
}

.login-stats small {
  color: #bfd5c4;
}

.login-page .auth-card {
  width: 100%;
  margin: 0;
  padding: clamp(1.5rem, 4vw, 2.3rem);
  border: 1px solid rgb(255 255 255 / 80%);
  border-radius: 18px;
  box-shadow: 0 24px 70px rgb(11 49 30 / 16%);
}

.login-card-heading {
  display: flex;
  align-items: center;
  gap: .7rem;
}

.login-card-icon {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 12px;
  color: #176b45;
  background: #e5f3e7;
  font-size: 1.3rem;
}

.login-page .auth-card h2 {
  margin: .85rem 0 .4rem;
  font-size: 1.65rem;
}

.login-page .auth-card > p {
  margin-top: 0;
  margin-bottom: 1.4rem;
}

.login-submit {
  display: flex;
  width: 100%;
  justify-content: space-between;
  margin-top: .35rem;
  padding-inline: 1rem;
}

.login-page .footer {
  color: #738178;
}

.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin: .4rem 1rem .4rem 0;
}

.checkbox-label input {
  width: 18px;
  min-height: 18px;
  accent-color: #176b45;
}

.role-options {
  padding: .8rem;
  border: 1px solid #dce5dc;
  border-radius: 8px;
}

.role-options legend {
  padding: 0 .35rem;
  font-weight: 650;
}

.setting-row {
  display: grid;
  grid-template-columns: minmax(210px, .7fr) minmax(0, 1.3fr);
  align-items: center;
  gap: 1rem;
  padding: .8rem 0;
  border-bottom: 1px solid #e8eee8;
}

.setting-label {
  font-weight: 650;
}

.setting-label small {
  display: block;
  margin-top: .25rem;
  font-size: .78rem;
  font-weight: 400;
}

.setting-row > select,
.setting-row > input {
  max-width: 520px;
}

.setting-row .role-options {
  margin: 0;
}

.subnav {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  margin: 1rem 0 0;
  padding: .35rem;
  border: 1px solid #e1e9e2;
  border-radius: 9px;
  background: #f7f9f6;
}

.subnav a {
  padding: .55rem .8rem;
  border-radius: 7px;
  color: #245c3d;
  font-size: .88rem;
  font-weight: 650;
  text-decoration: none;
}

.subnav a:hover,
.subnav a.active {
  background: #e5f1e7;
}

.subnav a.active {
  color: #174b35;
  box-shadow: inset 0 -2px #39845b;
}

.dashboard {
  --dash-ink: #173c2d;
  color: var(--dash-ink);
}

.dashboard-hero {
  position: relative;
  display: flex;
  min-height: 270px;
  overflow: hidden;
  align-items: center;
  justify-content: space-between;
  padding: clamp(1.5rem, 3.5vw, 3rem);
  border-radius: 20px;
  color: #fff;
  background: linear-gradient(115deg, #123f30 0%, #226545 65%, #498764 100%);
  box-shadow: 0 14px 32px rgb(22 77 48 / 14%);
}

.dashboard-hero-content {
  position: relative;
  z-index: 1;
  max-width: 650px;
}

.dashboard-kicker,
.dashboard-overline {
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .14em;
}

.dashboard-kicker {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  color: #c9e8cf;
}

.dashboard-kicker span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #a7df9d;
}

.dashboard-hero h1 {
  margin: 1rem 0 .65rem;
  font-size: clamp(1.8rem, 3.2vw, 2.8rem);
  letter-spacing: -.04em;
  line-height: 1.15;
}

.dashboard-hero h1 span {
  color: #c8efc7;
  overflow-wrap: anywhere;
}

.dashboard-hero p {
  max-width: 440px;
  margin: 0;
  color: #d5e9db;
  line-height: 1.6;
}

.dashboard-badges {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: 1.4rem;
}

.dashboard-badges span {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .4rem .65rem;
  border: 1px solid rgb(255 255 255 / 20%);
  border-radius: 7px;
  background: rgb(255 255 255 / 8%);
  font-size: .75rem;
}

.dashboard-hero svg,
.dashboard-stat-icon svg,
.dashboard-shortcut-icon svg,
.dashboard-arrow svg {
  display: block;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
}

.dashboard-badges svg {
  width: 15px;
  height: 15px;
}

.dashboard-illustration {
  position: relative;
  display: grid;
  width: 260px;
  height: 210px;
  flex: 0 0 260px;
  place-items: center;
  color: #d8f3d9;
}

.dashboard-illustration svg {
  position: relative;
  width: 240px;
  height: 200px;
}

.dashboard-orbit {
  position: absolute;
  width: 195px;
  height: 195px;
  border: 1px solid rgb(222 255 227 / 18%);
  border-radius: 50%;
  background: rgb(255 255 255 / 4%);
}

.dashboard-orbit.orbit-two {
  width: 245px;
  height: 245px;
  background: transparent;
}

.dashboard-section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin: 2rem 0 .9rem;
}

.dashboard-overline {
  color: #769482;
}

.dashboard-section-heading h2 {
  margin: .25rem 0 0;
  font-size: 1.2rem;
  letter-spacing: -.025em;
}

.dashboard-context {
  color: #778a7e;
  font-size: .78rem;
}

.dashboard-stats,
.dashboard-shortcuts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.dashboard-stat,
.dashboard-shortcut {
  border: 1px solid #e1ebe2;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 3px 14px rgb(27 68 42 / 4%);
}

.dashboard-stat {
  display: flex;
  flex-direction: column;
  gap: .3rem;
  padding: 1.3rem;
}

.dashboard-stat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .65rem;
}

.dashboard-stat-icon,
.dashboard-shortcut-icon {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  place-items: center;
  border-radius: 12px;
  color: #2f8153;
  background: #e8f4eb;
}

.dashboard-stat-icon-gold {
  color: #a4772f;
  background: #fbf3e2;
}

.dashboard-stat-tag {
  color: #97a79d;
  font-size: .65rem;
  font-weight: 750;
  letter-spacing: .09em;
}

.dashboard-stat > strong {
  font-size: 2rem;
  line-height: 1.1;
}

.dashboard-stat > span {
  font-size: .9rem;
  font-weight: 700;
}

.dashboard-stat small,
.dashboard-shortcut small {
  color: #7b8d80;
  font-size: .78rem;
  line-height: 1.5;
}

.dashboard-shortcut {
  display: flex;
  align-items: center;
  gap: .9rem;
  min-width: 0;
  padding: 1.1rem;
  color: var(--dash-ink);
  text-decoration: none;
  transition: border-color .2s, transform .2s, box-shadow .2s;
}

.dashboard-shortcut:hover {
  transform: translateY(-2px);
  border-color: #aacfb3;
  box-shadow: 0 8px 20px rgb(27 68 42 / 9%);
}

.dashboard-shortcut-copy {
  display: grid;
  min-width: 0;
  flex: 1;
  gap: .25rem;
}

.dashboard-shortcut-copy strong {
  font-size: .9rem;
}

.dashboard-arrow {
  color: #8ca494;
}

.dashboard-arrow svg {
  width: 18px;
  height: 18px;
}

.dashboard-note {
  display: flex;
  align-items: center;
  gap: .8rem;
  margin-top: 1.5rem;
  padding: 1rem;
  border: 1px solid #dfece0;
  border-radius: 12px;
  color: #59715e;
  background: #edf5ed;
  font-size: .8rem;
  line-height: 1.5;
}

.dashboard-note strong {
  display: block;
  color: #315b3d;
}

.search-form {
  display: grid;
  grid-template-columns: auto minmax(180px, 1fr) auto;
  align-items: end;
  gap: .65rem;
  max-width: 760px;
  margin: 1rem 0;
}

.search-form label {
  padding-bottom: .65rem;
  white-space: nowrap;
}

.search-form input {
  min-width: 0;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1rem;
  color: #627268;
  font-size: .83rem;
}

.pagination nav {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem;
}

.pagination nav a {
  display: inline-grid;
  min-width: 36px;
  min-height: 36px;
  place-items: center;
  border: 1px solid #d5e0d7;
  border-radius: 7px;
  color: #245c3d;
  background: #fff;
  text-decoration: none;
}

.pagination nav a.current {
  color: #fff;
  border-color: #176b45;
  background: #176b45;
}

.button-small {
  min-height: 34px;
  padding: .35rem .6rem;
  font-size: .82rem;
  white-space: nowrap;
}

.spacing-add,
.spacing-year {
  margin-top: .8rem;
  border: 1px solid #dce5dc;
  border-radius: 10px;
  background: #fff;
}

.spacing-add > summary,
.spacing-year > summary {
  padding: .9rem 1rem;
  color: #174b35;
  cursor: pointer;
}

.spacing-add > summary {
  font-weight: 700;
}

.spacing-add > form,
.spacing-year-content {
  padding: 0 1rem 1rem;
}

.spacing-year > summary span:first-child {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .6rem;
}

.spacing-count {
  float: right;
  color: #627268;
  font-size: .85rem;
}

.spacing-actions {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: .5rem;
  min-width: 150px;
}

.spacing-edit > summary {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  padding: .35rem .6rem;
  border: 1px solid #176b45;
  border-radius: 7px;
  color: #176b45;
  font-size: .82rem;
  font-weight: 700;
  cursor: pointer;
}

.spacing-edit-form {
  width: min(320px, 100%);
  min-width: 210px;
  margin-top: .7rem;
  padding: .8rem;
  border: 1px solid #dce5dc;
  border-radius: 7px;
  background: #f7faf7;
}

.spacing-edit-form p {
  margin: 0;
  font-size: .85rem;
}

.action-cell {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .45rem;
}

.inline-edit-form {
  display: flex;
  align-items: center;
  gap: .45rem;
  min-width: 260px;
}

.inline-edit-form input {
  min-width: 140px;
}

.order-field {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 100px;
  align-items: center;
  gap: .75rem;
  max-width: 420px;
  margin: .5rem 0;
}

.sr-only {
  position: absolute;
  overflow: hidden;
  width: 1px;
  height: 1px;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

@media (max-width: 900px) {
  .app-layout {
    display: block;
  }

  .sidebar {
    position: fixed;
    z-index: 12;
    inset: 0 auto 0 0;
    width: min(290px, 84vw);
    height: 100dvh;
    transform: translateX(-105%);
    transition: transform .22s ease;
  }

  .sidebar-open .sidebar {
    transform: translateX(0);
  }

  .sidebar-backdrop {
    position: fixed;
    z-index: 11;
    inset: 0;
    border: 0;
    border-radius: 0;
    background: rgb(9 28 18 / 48%);
  }

  .sidebar-open .sidebar-backdrop {
    display: block;
  }

  .menu-toggle {
    display: inline-grid;
    flex: 0 0 38px;
    place-items: center;
    color: #245c3d;
  }

  .app-main .topbar {
    padding-inline: 1rem;
  }
}

@media (max-width: 700px) {
  .dashboard-hero {
    min-height: 0;
    padding: 1.5rem;
  }

  .dashboard-illustration {
    position: absolute;
    right: -85px;
    bottom: -55px;
    opacity: .25;
  }

  .dashboard-section-heading {
    align-items: start;
    flex-direction: column;
    gap: .35rem;
    margin-top: 1.6rem;
  }

  .dashboard-stats,
  .dashboard-shortcuts {
    grid-template-columns: 1fr;
    gap: .7rem;
  }

  .app-main .container {
    width: min(100% - 1rem, 1320px);
    margin: .75rem auto;
  }

  .login-page {
    background: linear-gradient(160deg, #123b2c 0%, #1f5a3b 36%, #eef3ec 36%, #f5f7f3 100%);
  }

  .login-page .container {
    min-height: auto;
  }

  .login-layout {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: .75rem 0 2rem;
  }

  .login-intro h1 {
    font-size: clamp(2rem, 10vw, 3rem);
  }

  .login-intro > p {
    margin-bottom: .75rem;
    font-size: .9rem;
  }

  .login-stats {
    gap: 1.25rem;
    margin-top: 1rem;
  }

  .login-page .auth-card {
    padding: 1.25rem;
  }

  .search-form {
    grid-template-columns: 1fr auto;
  }

  .search-form label {
    grid-column: 1 / -1;
    padding-bottom: 0;
  }

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

  .setting-row {
    grid-template-columns: 1fr;
    gap: .55rem;
  }
}
.monitor-map{height:clamp(320px,60vh,650px);width:100%;border-radius:8px;overflow:hidden}
.monitor-map-container{background:#fff}
.monitor-map-actions{display:flex;flex-wrap:wrap;gap:.5rem;padding:.5rem}
.monitor-map-container:fullscreen,.monitor-map-container.monitor-expanded{width:100%;height:100%;display:flex;flex-direction:column}
.monitor-map-container.monitor-expanded{position:fixed;inset:0;z-index:10000}
.monitor-map-container:fullscreen .monitor-map,.monitor-map-container.monitor-expanded .monitor-map{flex:1;height:auto}
.plot-label-icon{background:transparent;border:0}
.plot-name-label{width:112px;height:112px;border:3px solid #0a2a66;border-radius:50%;background:transparent;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;color:white;font-size:11px;font-weight:700;line-height:1.2;text-shadow:0 1px 3px #000,0 0 4px #000;overflow-wrap:anywhere}
#plot-map-dialog{width:min(90vw,800px);max-width:90vw;border:0;border-radius:12px;padding:1rem}
#plot-map-dialog::backdrop{background:rgba(0,0,0,.6)}
.plot-map-header{display:flex;align-items:center;justify-content:space-between;gap:1rem}
.plot-map-header h2{margin:0}
#plot-map{height:clamp(260px,55vh,550px);width:100%;margin-top:1rem}
.plot-map-button{display:inline-flex;align-items:center;justify-content:center}
.monitor-marker span{display:block;width:100%;height:100%;border:2px solid white;border-radius:50%;box-shadow:0 1px 4px #0009}.monitor-marker.dead span{border-style:dashed}.monitor-popup-record+.monitor-popup-record{border-top:1px solid #d5e5d9;margin-top:.5rem;padding-top:.5rem}.monitor-popup-record img{display:block;max-width:220px;max-height:180px;margin-top:.5rem}
