:root {
  --bg: #f4f5f6;
  --surface: #ffffff;
  --surface-2: #f8f8f8;
  --ink: #141414;
  --muted: #6b6f76;
  --line: #e1e3e6;
  --black: #111111;
  --red: #b51f2e;
  --red-2: #8f1723;
  --gold: #c79a3b;
  --green: #237a47;
  --yellow: #b67800;
  --orange: #b95c00;
  --blue: #1d5fa7;
  --shadow: 0 10px 30px rgba(0,0,0,.10);
  --radius: 16px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--ink); }
body { min-height: 100vh; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
.hidden { display: none !important; }
.stack { display: flex; flex-direction: column; }
.gap-sm { gap: .5rem; }
.gap-md { gap: .9rem; }
.muted { color: var(--muted); }
.eyebrow { margin: 0 0 .25rem; font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

.login-shell {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: max(20px, env(safe-area-inset-top, 0px)) 18px max(18px, env(safe-area-inset-bottom, 0px));
  color: #fff;
  background:
    radial-gradient(circle at 50% -10%, rgba(55, 177, 226, .27), transparent 39%),
    radial-gradient(circle at 10% 85%, rgba(190, 26, 49, .24), transparent 38%),
    linear-gradient(150deg, #041126 0%, #071b36 50%, #040c1a 100%);
}
.login-shell::before {
  content: "";
  position: absolute;
  z-index: -4;
  width: min(1050px, 115vw);
  aspect-ratio: 1;
  border-radius: 50%;
  background: conic-gradient(from 20deg, transparent 0 23%, rgba(55,177,226,.20) 31%, transparent 43% 68%, rgba(190,26,49,.18) 76%, transparent 88%);
  filter: blur(44px);
  opacity: .92;
  animation: loginSpin 26s linear infinite;
}
.login-shell::after {
  content: "";
  position: absolute;
  z-index: -3;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(2,8,19,.12) 58%, rgba(2,8,19,.62) 100%);
  pointer-events: none;
}
.login-atmosphere, .login-grid, .login-orb, .login-beam { position: absolute; pointer-events: none; }
.login-atmosphere { z-index: -2; inset: 0; overflow: hidden; }
.login-grid {
  inset: -20%;
  opacity: .18;
  background-image:
    linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px);
  background-size: 54px 54px;
  transform: perspective(640px) rotateX(63deg) translateY(35%);
  mask-image: radial-gradient(ellipse at center, #000 0%, transparent 68%);
}
.login-orb { border-radius: 50%; filter: blur(4px); opacity: .72; }
.login-orb-one {
  width: 330px;
  height: 330px;
  top: -110px;
  right: -95px;
  background: radial-gradient(circle at 35% 35%, rgba(92,211,255,.78), rgba(55,177,226,.10) 62%, transparent 72%);
  animation: loginDriftOne 10s ease-in-out infinite alternate;
}
.login-orb-two {
  width: 290px;
  height: 290px;
  bottom: -130px;
  left: -85px;
  background: radial-gradient(circle at 55% 45%, rgba(218,38,65,.72), rgba(181,31,46,.10) 63%, transparent 73%);
  animation: loginDriftTwo 12s ease-in-out infinite alternate;
}
.login-beam {
  width: 42vw;
  height: 2px;
  opacity: .52;
  filter: drop-shadow(0 0 10px currentColor);
  transform-origin: left center;
}
.login-beam-one { top: 17%; left: -8%; color: #37b1e2; background: linear-gradient(90deg, transparent, currentColor, transparent); transform: rotate(-16deg); animation: loginPulse 5s ease-in-out infinite; }
.login-beam-two { right: -12%; bottom: 18%; color: #be1a31; background: linear-gradient(90deg, transparent, currentColor, transparent); transform: rotate(17deg); animation: loginPulse 6.5s ease-in-out infinite reverse; }
.login-stage { width: min(540px, 100%); display: grid; justify-items: center; gap: 14px; animation: loginRise .75s cubic-bezier(.2,.8,.2,1) both; }
.login-card {
  position: relative;
  width: 100%;
  padding: 24px 28px 22px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 30px;
  background: linear-gradient(145deg, rgba(11,31,59,.88), rgba(5,17,36,.76));
  box-shadow: 0 28px 90px rgba(0,0,0,.48), inset 0 1px 0 rgba(255,255,255,.12);
  backdrop-filter: blur(24px) saturate(132%);
  -webkit-backdrop-filter: blur(24px) saturate(132%);
}
.login-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, transparent 3%, #37b1e2 28%, #fff 50%, #be1a31 72%, transparent 97%);
  opacity: .95;
}
.login-card::after {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  top: -120px;
  right: -85px;
  border-radius: 50%;
  background: rgba(55,177,226,.14);
  filter: blur(20px);
}
.login-logo-wrap { position: relative; z-index: 1; display: grid; place-items: center; margin: -4px auto 2px; }
.login-logo {
  display: block;
  width: clamp(218px, 61vw, 338px);
  max-height: 38vh;
  object-fit: contain;
  filter: drop-shadow(0 16px 22px rgba(0,0,0,.34));
  animation: loginFloat 6s ease-in-out infinite;
}
.login-heading { position: relative; z-index: 1; text-align: center; margin-top: -2px; }
.login-kicker { margin: 0 0 8px; color: #7dd8fa; font-size: .7rem; font-weight: 850; letter-spacing: .17em; text-transform: uppercase; }
.login-heading h1 { margin: 0; font-size: clamp(1.55rem, 5.8vw, 2.2rem); line-height: 1.07; letter-spacing: -.025em; text-wrap: balance; }
.login-heading > p:last-child { margin: 8px 0 0; color: rgba(255,255,255,.67); font-size: .88rem; }
.login-form { position: relative; z-index: 1; display: grid; gap: 10px; margin-top: 22px; }
.login-field { display: grid; gap: 8px; }
.login-field > span { color: rgba(255,255,255,.84); font-size: .78rem; font-weight: 780; letter-spacing: .015em; }
.password-control {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 56px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 16px;
  background: rgba(2,10,23,.56);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 8px 24px rgba(0,0,0,.12);
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.password-control:focus-within { border-color: rgba(91,205,247,.92); box-shadow: 0 0 0 4px rgba(55,177,226,.14), inset 0 1px 0 rgba(255,255,255,.06); transform: translateY(-1px); }
.password-lock { flex: 0 0 auto; width: 21px; height: 21px; margin-left: 16px; color: rgba(255,255,255,.52); }
.password-control input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  padding: 16px 10px;
  color: #fff;
  background: transparent;
  font-size: 1rem;
  letter-spacing: .015em;
}
.password-control input::placeholder { color: rgba(255,255,255,.37); }
.password-toggle { flex: 0 0 auto; width: 46px; height: 46px; display: grid; place-items: center; margin-right: 5px; border: 0; border-radius: 12px; color: rgba(255,255,255,.55); background: transparent; }
.password-toggle:hover, .password-toggle:focus-visible { color: #fff; background: rgba(255,255,255,.08); outline: none; }
.password-toggle svg { width: 21px; height: 21px; }
.login-error-message { min-height: 1.15em; margin: 0; color: #ff9eaa; font-size: .78rem; font-weight: 720; }
.login-error-message:empty { min-height: 0; }
.login-submit {
  position: relative;
  isolation: isolate;
  width: 100%;
  min-height: 55px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.20);
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(115deg, #a81129 0%, #c61f39 52%, #971122 100%);
  box-shadow: 0 14px 28px rgba(151,17,34,.34), inset 0 1px 0 rgba(255,255,255,.22);
  font: inherit;
  font-weight: 850;
  letter-spacing: .01em;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
.login-submit::before { content: ""; position: absolute; z-index: -1; inset: 0; background: linear-gradient(110deg, transparent 22%, rgba(255,255,255,.24) 45%, transparent 67%); transform: translateX(-125%); transition: transform .55s ease; }
.login-submit:hover { transform: translateY(-2px); box-shadow: 0 18px 34px rgba(151,17,34,.42), inset 0 1px 0 rgba(255,255,255,.24); filter: saturate(1.08); }
.login-submit:hover::before { transform: translateX(125%); }
.login-submit:active { transform: translateY(0) scale(.99); }
.login-submit:focus-visible { outline: 3px solid rgba(91,205,247,.56); outline-offset: 3px; }
.login-submit span, .login-submit svg { position: relative; z-index: 1; }
.login-submit svg { position: absolute; right: 18px; top: 50%; width: 22px; height: 22px; transform: translateY(-50%); }
.login-meta { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 9px; margin-top: 16px; color: rgba(255,255,255,.50); font-size: .72rem; font-weight: 680; }
.login-meta i { width: 3px; height: 3px; border-radius: 50%; background: #37b1e2; box-shadow: 0 0 8px #37b1e2; }
.login-footnote { margin: 0; color: rgba(255,255,255,.48); font-size: .7rem; font-weight: 650; text-align: center; letter-spacing: .025em; }
.login-card.login-error { animation: loginShake .34s ease; }
.brand-mark { width: 74px; height: 74px; display: grid; place-items: center; border-radius: 18px; color: white; background: linear-gradient(145deg, #c32433, #7e0f19); border: 3px solid var(--gold); font-weight: 900; letter-spacing: .06em; margin-bottom: 20px; box-shadow: inset 0 0 0 2px rgba(255,255,255,.15); }
.brand-mark.small { width: 48px; height: 48px; border-radius: 12px; margin: 0; font-size: .8rem; }
@keyframes loginSpin { to { transform: rotate(360deg); } }
@keyframes loginDriftOne { from { transform: translate3d(0,0,0) scale(1); } to { transform: translate3d(-34px,45px,0) scale(1.08); } }
@keyframes loginDriftTwo { from { transform: translate3d(0,0,0) scale(1); } to { transform: translate3d(44px,-30px,0) scale(1.12); } }
@keyframes loginPulse { 0%,100% { opacity: .18; } 50% { opacity: .62; } }
@keyframes loginRise { from { opacity: 0; transform: translateY(24px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes loginFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@keyframes loginShake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-7px); } 50% { transform: translateX(6px); } 75% { transform: translateX(-3px); } }
.field { display: flex; flex-direction: column; gap: .35rem; font-size: .82rem; font-weight: 700; }
.field input, .field select, .field textarea, .select, .input, textarea.input { width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: .8rem .9rem; background: #fff; color: var(--ink); outline: none; }
.field input:focus, .field select:focus, .field textarea:focus, .select:focus, .input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(199,154,59,.16); }

.shell { min-height: 100vh; padding-bottom: calc(74px + var(--safe-bottom)); }
.topbar { position: sticky; top: 0; z-index: 50; min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 12px; background: rgba(17,17,17,.96); color: white; padding: 10px 14px; backdrop-filter: blur(12px); box-shadow: 0 1px 0 rgba(255,255,255,.08); }
.brand-inline { display: flex; align-items: center; gap: 10px; min-width: 0; }
.top-title { font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-subtitle { color: #c8c8c8; font-size: .75rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 62vw; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn { border: 0; background: transparent; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; color: inherit; font-size: 1.05rem; }
.icon-btn:hover { background: rgba(127,127,127,.12); }

.content { width: min(1100px, 100%); margin: 0 auto; padding: 14px 12px 24px; }
.view { display: none; }
.view.active { display: block; }
.bottom-nav { position: fixed; z-index: 60; left: 0; right: 0; bottom: 0; height: calc(68px + var(--safe-bottom)); padding-bottom: var(--safe-bottom); display: grid; grid-template-columns: repeat(4, 1fr); background: rgba(255,255,255,.97); border-top: 1px solid var(--line); backdrop-filter: blur(14px); }
.nav-btn { border: 0; background: transparent; color: #666; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 1.15rem; }
.nav-btn small { font-size: .68rem; font-weight: 700; }
.nav-btn.active { color: var(--red); }

.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.page-head h1, .page-head h2 { margin: 0; }
.page-head h1 { font-size: 1.4rem; }
.page-head p { margin: .3rem 0 0; }
.section-title { margin: 20px 0 8px; font-size: .88rem; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; color: #444; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 2px 10px rgba(0,0,0,.035); }
.card-pad { padding: 14px; }
.grid { display: grid; gap: 12px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.kpi { background: white; border: 1px solid var(--line); border-radius: 14px; padding: 10px; min-width: 0; }
.kpi strong { display: block; font-size: 1.25rem; line-height: 1; }
.kpi span { display: block; margin-top: 4px; color: var(--muted); font-size: .68rem; font-weight: 700; }

.btn { appearance: none; border: 1px solid transparent; border-radius: 12px; padding: .72rem .95rem; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; gap: .45rem; text-decoration: none; }
.btn-sm { padding: .52rem .7rem; font-size: .8rem; border-radius: 10px; }
.btn-lg { padding: .92rem 1.05rem; }
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-2); }
.btn-secondary { background: #fff; border-color: var(--line); color: var(--ink); }
.btn-dark { background: var(--black); color: white; }
.btn-success { background: var(--green); color: white; }
.btn-warning { background: #fff6d8; color: #7a5400; border-color: #e9ca63; }
.btn-danger { background: #ffe5e7; color: #8c0f1d; border-color: #ef9ca5; }
.btn:disabled { opacity: .45; cursor: default; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }

.status-pill { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: .35rem .58rem; font-size: .68rem; font-weight: 900; white-space: nowrap; }
.status-pill.online { background: #163b26; color: #abefc8; }
.status-pill.offline { background: #4a2b10; color: #ffd49b; }
.status-pill.normal { background: #eef0f2; color: #4b4f55; }
.status-pill.yellow { background: #fff1b8; color: #7a4f00; }
.status-pill.red { background: #ffd7db; color: #8b101c; }
.status-pill.green { background: #dff5e7; color: #1c643a; }
.status-pill.blue { background: #dcecff; color: #174f8a; }
.status-pill.black { background: #222; color: white; }

.coverage-panel { border: 2px solid #e7b84f; background: linear-gradient(180deg, #fffaf0, #fff); border-radius: 18px; overflow: hidden; margin-bottom: 16px; }
.coverage-panel.red-edge { border-color: #df6b77; }
.coverage-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-bottom: 1px solid rgba(0,0,0,.07); background: rgba(255,244,206,.55); }
.coverage-head h2 { font-size: 1.02rem; margin: 0; }
.coverage-list { padding: 8px; display: grid; gap: 8px; }
.empty { padding: 22px; text-align: center; color: var(--muted); }

.party-card { position: relative; background: white; border: 1px solid var(--line); border-radius: 14px; padding: 12px; display: grid; gap: 9px; }
.party-card.priority-yellow { border-left: 5px solid #e0a400; }
.party-card.priority-red { border-left: 5px solid #c31f32; }
.party-card.complete { opacity: .72; }
.party-top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.party-title { font-weight: 850; font-size: .98rem; line-height: 1.22; }
.party-address { color: #42464c; font-size: .83rem; line-height: 1.3; margin-top: 2px; }
.party-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.meta-chip { display: inline-flex; align-items: center; gap: 4px; background: #f1f2f3; border-radius: 999px; padding: .3rem .5rem; font-size: .68rem; font-weight: 750; color: #4c5056; }
.party-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.unit-toggle { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.unit-toggle button { border: 0; padding: .45rem .58rem; font-size: .7rem; font-weight: 800; background: #fff; }
.unit-toggle button.active { background: #202020; color: #fff; }

.station-status { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; margin-bottom: 12px; background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.station-status.oncall { border-color: #dc8b94; background: #fff7f8; }
.station-status strong { display: block; }
.station-status small { color: var(--muted); }

.district-section { margin-bottom: 18px; }
.district-head { position: sticky; top: 68px; z-index: 8; display: flex; justify-content: space-between; align-items: center; padding: 8px 10px; margin: 0 -2px 7px; border-radius: 10px; background: rgba(235,237,239,.96); backdrop-filter: blur(10px); font-weight: 900; }
.district-count { color: var(--muted); font-size: .75rem; }
.party-list { display: grid; gap: 8px; }

#map { height: calc(100vh - 170px); min-height: 500px; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: #e9ecef; }
.map-container { position: relative; }
.map-error { position: absolute; inset: 20px; display: grid; place-items: center; padding: 20px; text-align: center; background: rgba(255,255,255,.94); border-radius: 12px; color: var(--muted); z-index: 2; }
.map-toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.map-fallback { height: 100%; display: grid; place-items: center; padding: 20px; text-align: center; color: var(--muted); }
.maplibregl-popup-content { min-width: 220px; }

.notice { border-radius: 12px; padding: 10px 12px; font-size: .8rem; line-height: 1.4; }
.notice.info { background: #eaf3ff; color: #244f7a; }
.notice.warning { background: #fff4d8; color: #704c00; }
.notice.success { background: #e5f6eb; color: #225e39; }
.notice.danger { background: #ffe8eb; color: #7d1520; }

.admin-group { margin-bottom: 16px; }
.admin-group h3 { margin: 0 0 8px; font-size: .95rem; }
.admin-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 10px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line); }
.admin-row:last-child { border-bottom: 0; }
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; background: white; font-size: .77rem; }
th, td { text-align: left; border-bottom: 1px solid var(--line); padding: 8px 9px; white-space: nowrap; }
th { position: sticky; top: 0; background: #f1f2f3; z-index: 2; font-size: .68rem; text-transform: uppercase; letter-spacing: .03em; }

.sheet-dialog { border: 0; padding: 0; background: transparent; width: min(760px, calc(100vw - 18px)); max-height: 92vh; }
.sheet-dialog::backdrop { background: rgba(0,0,0,.48); backdrop-filter: blur(3px); }
.dialog-card { background: #fff; border-radius: 20px; padding: 16px; box-shadow: var(--shadow); max-height: 90vh; overflow: auto; }
.dialog-card.wide { width: min(760px, 100%); }
.dialog-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; border-bottom: 1px solid var(--line); padding-bottom: 10px; margin-bottom: 12px; }
.dialog-head h2 { margin: 0; font-size: 1.2rem; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 0 0; margin: 0; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.check-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 7px; }
.check-item { display: flex; gap: 8px; align-items: flex-start; padding: 8px; border: 1px solid var(--line); border-radius: 10px; font-size: .78rem; }
.photo-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 7px; margin-top: 8px; }
.photo-thumb { aspect-ratio: 1; border-radius: 10px; object-fit: cover; width: 100%; background: #eee; }

.toast { position: fixed; z-index: 100; left: 50%; bottom: calc(82px + var(--safe-bottom)); transform: translateX(-50%); background: #1d1d1d; color: white; border-radius: 999px; padding: .65rem .85rem; box-shadow: var(--shadow); font-size: .78rem; max-width: calc(100vw - 24px); display: flex; align-items: center; gap: 8px; }
.toast button { border: 0; color: #ffd470; background: transparent; font-weight: 900; }

.progress { height: 7px; background: #eceef0; border-radius: 999px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--green); border-radius: inherit; }
.route-summary { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
hr.sep { border: 0; border-top: 1px solid var(--line); margin: 14px 0; }

@media (max-width: 560px) {
  .login-shell { padding-inline: 12px; }
  .login-card { padding: 18px 18px 18px; border-radius: 25px; }
  .login-logo { width: min(70vw, 270px); max-height: 34vh; }
  .login-form { margin-top: 18px; }
  .login-heading > p:last-child { font-size: .8rem; }
}

@media (max-height: 720px) {
  .login-card { padding-top: 14px; padding-bottom: 14px; }
  .login-logo { width: min(51vw, 238px); max-height: 31vh; }
  .login-heading h1 { font-size: clamp(1.35rem, 4.7vw, 1.8rem); }
  .login-heading > p:last-child { margin-top: 5px; }
  .login-form { margin-top: 14px; }
  .password-control, .login-submit { min-height: 50px; }
  .login-meta { margin-top: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  .login-shell::before, .login-orb, .login-beam, .login-stage, .login-logo, .login-card.login-error { animation: none !important; }
  .login-submit, .password-control { transition: none; }
}

@media (min-width: 760px) {
  .content { padding: 20px 18px 100px; }
  .bottom-nav { width: 440px; left: 50%; transform: translateX(-50%); bottom: 12px; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; box-shadow: 0 8px 30px rgba(0,0,0,.12); height: 64px; padding-bottom: 0; }
  .shell { padding-bottom: 95px; }
  .kpi-grid { grid-template-columns: repeat(4, 1fr); }
  .coverage-list, .party-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .party-dialog .dialog-card { padding: 20px; }
}

@media (max-width: 560px) {
  .grid-2, .grid-3, .form-grid, .check-grid { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .photo-grid { grid-template-columns: repeat(2, 1fr); }
  .status-pill.top-status { display: none; }
}

.login-role-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.login-role-row .btn { min-height: 44px; }
#resetPasswordBtn { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.3); }
#logoutBtn { white-space: nowrap; }

#syncPanel { padding: 10px max(16px,calc((100vw - 850px)/2)); background: #fff2d6; color: #493500; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: .8rem; }
#syncPanel button { margin-left: auto; }
