:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  background: #f3f7fc;
  color: #0a2342;
  --brand-navy: #031a38;
  --brand-blue: #1687ff;
  --brand-blue-deep: #0753b6;
  --brand-blue-soft: #eaf3ff;
  --brand-orange: #ff6500;
  --brand-orange-soft: #fff0e6;
  --ink: #0a2342;
  --muted: #5a6b7d;
  --forest: var(--brand-navy);
  --forest-soft: var(--brand-blue-soft);
  --paper: #ffffff;
  --line: #cfdae8;
  --shadow: 0 10px 30px rgb(3 26 56 / 8%);
  --green: #27703d;
  --green-soft: #e1f2e6;
  --yellow: #8a6500;
  --yellow-soft: #fff1bd;
  --red: #a3231b;
  --red-soft: #ffe0dc;
  --focus: var(--brand-orange);
}

.safety-watch-boundary,
.safety-watch-privacy {
  border: 1px solid #b8d6c9;
  border-radius: 16px;
  background: #eaf5ef;
  padding: 16px 18px;
  margin-bottom: 18px;
}

.support-boundary,
.support-privacy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid #b8d6c9;
  border-radius: 16px;
  background: #eaf5ef;
  padding: 16px 18px;
  margin-bottom: 18px;
}

.support-boundary span,
.support-privacy p { margin: 0; color: #425d54; }

.support-step-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}

.support-step-grid article {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
}

.support-step-grid article > span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--forest);
  color: white;
  font-weight: 900;
}

.support-step-grid strong { display: block; }
.support-step-grid p { margin: 4px 0 0; color: var(--muted); line-height: 1.4; }
.support-advanced { margin-top: 14px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: white; }
.support-advanced summary { cursor: pointer; font-weight: 800; }
.support-advanced label { display: block; margin-top: 12px; color: var(--muted); font-weight: 750; }
.support-advanced select { width: 100%; min-height: 44px; margin-top: 5px; padding: 8px 10px; border: 1px solid #95a69f; border-radius: 9px; background: white; }
.support-consent-panel { margin-top: 20px; padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: var(--paper); }
.support-consent-panel h3 { margin-top: 0; }
.support-consent-panel > p { color: var(--muted); }
.support-privacy { margin-top: 20px; border-color: #c3d2ca; background: #f7faf8; }

.safety-watch-boundary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.safety-watch-boundary span,
.safety-watch-privacy p {
  color: #425d54;
  margin: 0;
}

.safety-watch-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: 20px;
}

.safety-watch-list {
  display: grid;
  gap: 14px;
}

.safety-watch-card {
  background: #fff;
  border: 1px solid #d8ddd9;
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 8px 22px rgb(23 63 53 / 7%);
}

.safety-watch-card[data-priority="yellow"] {
  border-left: 6px solid #d99a11;
  background: #fff8e8;
}

.safety-watch-card[data-priority="red"] {
  border-left: 6px solid #c94a3d;
  background: #fff0ed;
}

.safety-watch-card h4,
.safety-watch-card p {
  margin: 0 0 8px;
}

.safety-watch-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0;
}

.safety-watch-meta span {
  border-radius: 999px;
  background: rgb(255 255 255 / 72%);
  border: 1px solid #d6ddd8;
  padding: 5px 9px;
  font-size: 0.85rem;
}

.safety-watch-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.safety-watch-privacy {
  margin-top: 20px;
  border-color: #e5b3a7;
  background: #fff0ed;
}

.remote-support-panel {
  margin-top: 20px;
  padding: 20px;
  border: 1px solid #a9c9bb;
  border-radius: 18px;
  background: #f4faf6;
}

.remote-support-panel > p { color: #425d54; line-height: 1.55; }
.remote-support-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px; align-items: end; }
.remote-support-form label { color: var(--muted); font-weight: 750; }
.remote-support-form select {
  display: block; width: 100%; min-height: 44px; margin-top: 5px; padding: 8px 10px;
  border: 1px solid #95a69f; border-radius: 9px; background: white;
}
.remote-support-session {
  display: flex; justify-content: space-between; gap: 18px; align-items: center;
  margin-top: 16px; padding: 16px; border: 1px solid #91b9a7;
  border-radius: 14px; background: white;
}
.remote-support-session p { margin: 5px 0 0; color: var(--muted); }
.remote-support-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.button-link { display: inline-flex; align-items: center; text-decoration: none; }
.danger-button {
  min-height: 44px; padding: 9px 14px; border: 1px solid var(--red);
  border-radius: 10px; background: var(--red); color: white; font-weight: 800;
}
.remote-support-boundaries { margin: 12px 0 0; padding-left: 20px; color: #425d54; }
.remote-support-boundaries li + li { margin-top: 5px; }

@media (max-width: 900px) {
  .support-step-grid { grid-template-columns: 1fr; }
  .support-boundary, .support-privacy { align-items: flex-start; flex-direction: column; }
  .safety-watch-layout {
    grid-template-columns: 1fr;
  }

  .safety-watch-boundary {
    align-items: flex-start;
    flex-direction: column;
  }

  .remote-support-form { grid-template-columns: 1fr; }
  .remote-support-session { align-items: flex-start; flex-direction: column; }
  .remote-support-actions { justify-content: flex-start; }
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: #f3f7fc; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .48; }
#geofence-editor[aria-disabled="true"] { cursor: not-allowed; filter: saturate(.68); }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
.skip-link {
  position: fixed; left: 16px; top: -80px; z-index: 20; padding: 12px;
  background: var(--forest); color: white; border-radius: 8px;
}
.skip-link:focus { top: 16px; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 240px minmax(0, 1fr); }
.sidebar {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column;
  padding: 24px 16px;
  background: linear-gradient(180deg, var(--brand-navy) 0%, #062b59 64%, #0b4f9c 100%);
  color: white;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 26px; }
.brand-mark {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px;
  background: var(--brand-orange); color: var(--brand-navy); font-weight: 900;
}
.brand-mark-image { object-fit: cover; background: #031a38; box-shadow: 0 0 0 1px #1687ff80; }
.brand strong, .brand small { display: block; }
.brand small { color: #9dcbff; }
.account-entry {
  min-height: 100vh; display: grid; grid-template-columns: minmax(320px, 620px) minmax(360px, 520px);
  place-content: center; align-items: center; gap: 34px; padding: 28px;
  background:
    radial-gradient(circle at 12% 16%, #dbeadf 0 14%, transparent 15%),
    linear-gradient(145deg, #f5f2e9, #e3ece5);
}
.brand-showcase {
  overflow: hidden; border-radius: 28px; background: #031a38;
  box-shadow: 0 26px 70px #001a3a35;
}
.brand-showcase img { display: block; width: 100%; height: auto; }
.account-card {
  width: min(520px, 100%); padding: 34px; border: 1px solid var(--line);
  border-radius: 22px; background: #fffefbf5; box-shadow: 0 24px 70px #17312b1f;
}
.account-brand { padding: 0 0 28px; color: var(--forest); }
.account-brand small { color: var(--muted); }
.account-card h1 { margin: 4px 0 8px; font-size: clamp(2rem, 6vw, 2.8rem); }
.account-intro, .privacy-note { color: var(--muted); line-height: 1.55; }
.account-modes {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px;
  margin: 24px 0; padding: 5px; border-radius: 12px; background: var(--forest-soft);
}
.account-mode {
  min-height: 44px; padding: 7px; border: 0; border-radius: 9px;
  background: transparent; color: var(--forest); font-weight: 750;
}
.account-mode.active { background: white; box-shadow: 0 2px 8px #17312b1a; }
.account-form, .registration-fields, .provider-buttons { display: grid; gap: 13px; }
.account-divider {
  display: flex; align-items: center; gap: 12px; margin: 18px 0; color: var(--muted);
}
.account-divider::before, .account-divider::after {
  content: ""; flex: 1; height: 1px; background: var(--line);
}
.provider-buttons { grid-template-columns: 1fr 1fr; }
.provider-button {
  min-height: 46px; border: 1px solid #8c9991; border-radius: 10px;
  background: white; color: var(--ink); font-weight: 750;
}
.privacy-note { margin: 18px 0 8px; font-size: .88rem; }
.privacy-page { max-width: 1180px; margin: 0 auto; padding: 40px 24px; }
.privacy-hero { background: #fff; border: 1px solid var(--line); border-radius: 24px;
  padding: 28px; box-shadow: var(--shadow); }
.privacy-lead { max-width: 780px; color: var(--muted); line-height: 1.65; }
.privacy-status { background: #fff1bd; border-left: 5px solid #d08a00;
  border-radius: 10px; padding: 12px 16px; font-weight: 700; }
.privacy-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px; margin-top: 20px; }
.privacy-card { background: #fff; border: 1px solid var(--line); border-radius: 18px;
  padding: 22px; box-shadow: var(--shadow); }
.privacy-card h2 { color: var(--green); margin-top: 0; }
.privacy-card p { color: var(--muted); line-height: 1.6; }
.privacy-footer { display: flex; justify-content: space-between; gap: 20px;
  padding: 24px 4px; color: var(--muted); }
@media (max-width: 760px) {
  .privacy-grid { grid-template-columns: 1fr; }
  .privacy-footer { display: block; }
}
@media (max-width: 980px) {
  .account-entry { grid-template-columns: minmax(0, 560px); }
  .brand-showcase { width: min(100%, 440px); justify-self: center; }
}
.demo-link { display: block; margin: 16px auto 0; }
.sidebar nav { display: grid; gap: 5px; }
.nav-section-label {
  margin: 17px 12px 4px; color: #8dc4ff; letter-spacing: .11em;
  font-size: .65rem; font-weight: 850; text-transform: uppercase;
}
.sidebar nav .nav-section-label:first-child { margin-top: 0; }
.nav-item {
  display: flex; align-items: center; gap: 11px; min-height: 46px; width: 100%;
  padding: 10px 12px; border: 0; border-radius: 11px; background: transparent;
  color: #eaf4ff; text-align: left; font-weight: 700;
}
.nav-item:hover { background: #1687ff26; color: white; }
.nav-item.active { background: #1687ff38; color: white; box-shadow: inset 4px 0 var(--brand-orange); }
.nav-item > span:first-child { width: 22px; text-align: center; font-size: 1.05rem; }
.nav-count {
  margin-left: auto; min-width: 24px; padding: 2px 7px; border-radius: 999px;
  background: var(--red-soft); color: var(--red); text-align: center;
}
.sidebar-foot {
  display: flex; gap: 9px; align-items: center; margin-top: auto; padding: 16px 8px 0;
  color: #d9ebff; font-size: .84rem;
}
.connection-dot, .ok-dot {
  display: inline-block; width: 10px; height: 10px; flex: 0 0 10px;
  border-radius: 50%; background: #67c783; box-shadow: 0 0 0 4px #67c78322;
}
.app-content { min-width: 0; }
.pitch-demo-bar {
  display: flex; justify-content: space-between; align-items: center; gap: 18px;
  padding: 12px clamp(20px, 4vw, 48px); background: var(--brand-navy); color: white;
  box-shadow: 0 7px 20px rgb(3 26 56 / 18%);
}
.pitch-demo-bar > div, .pitch-bar-actions {
  display: flex; align-items: center; gap: 11px;
}
.pitch-demo-bar strong, .pitch-demo-bar small { display: block; }
.pitch-demo-bar small { margin-top: 2px; color: #b8d9ff; }
.pitch-live-dot {
  width: 11px; height: 11px; flex: 0 0 11px; border-radius: 50%;
  background: var(--brand-orange); box-shadow: 0 0 0 5px #ff65002c;
}
.pitch-clock {
  min-width: 62px; padding: 7px 10px; border: 1px solid #ffffff52;
  border-radius: 999px; text-align: center; font-variant-numeric: tabular-nums;
  font-weight: 900;
}
.pitch-light-button, .pitch-quiet-button {
  min-height: 40px; padding: 8px 12px; border-radius: 9px; font-weight: 800;
}
.pitch-light-button { border: 1px solid white; background: white; color: var(--forest); }
.pitch-quiet-button { border: 1px solid #ffffff70; background: transparent; color: white; }
.pitch-guide {
  display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(270px, .7fr);
  gap: 22px; align-items: center; margin: 18px clamp(20px, 4vw, 48px) 0;
  padding: 22px; border: 1px solid #b9d8fb; border-radius: 18px;
  background: linear-gradient(135deg, #ffffff 0 68%, var(--brand-blue-soft) 100%);
  box-shadow: var(--shadow);
}
.pitch-guide h2 { margin-bottom: 8px; font-size: clamp(1.2rem, 2vw, 1.55rem); }
.pitch-guide-copy > p:not(.eyebrow) { margin-bottom: 10px; line-height: 1.55; }
.pitch-presenter-note {
  margin: 0; padding: 10px 12px; border-left: 4px solid var(--brand-orange);
  border-radius: 0 9px 9px 0; background: var(--brand-orange-soft); color: #4d3424;
  font-size: .9rem; font-weight: 700;
}
.pitch-auto-note { margin: 8px 0 0; color: var(--muted); font-size: .8rem; font-weight: 700; }
.pitch-guide-controls { display: grid; gap: 14px; }
.pitch-progress { display: flex; gap: 7px; justify-content: flex-end; }
.pitch-progress button {
  width: 30px; height: 7px; padding: 0; border: 0; border-radius: 999px;
  background: #c7d5cd;
}
.pitch-progress button.active { width: 48px; background: var(--brand-blue); }
.pitch-guide-buttons { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.topbar {
  min-height: 94px; display: flex; justify-content: space-between; align-items: center;
  gap: 20px; padding: 20px clamp(20px, 4vw, 48px); border-bottom: 1px solid var(--line);
  border-top: 4px solid var(--brand-orange);
  background: #f8fbffef; backdrop-filter: blur(12px);
}
.billing-banner {
  margin: 0; padding: 11px clamp(20px, 4vw, 48px); border-bottom: 1px solid #b8d7c2;
  background: var(--green-soft); color: var(--green); font-weight: 800;
}
.billing-banner[data-state="attention"] {
  border-color: #e0c26c; background: var(--yellow-soft); color: var(--yellow);
}
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: clamp(1.65rem, 3vw, 2.15rem); }
h2 { margin-bottom: 8px; font-size: 1.2rem; }
h3 { font-size: 1rem; }
.eyebrow {
  margin-bottom: 6px; color: var(--muted); letter-spacing: .13em;
  font-size: .7rem; font-weight: 850;
}
.farm-context-heading { display: grid; justify-items: start; }
.farm-context-heading .eyebrow { margin-bottom: 3px; }
.farm-context-heading select {
  min-width: min(320px, 70vw); margin: 0 0 4px; padding: 7px 34px 7px 10px;
  border: 2px solid var(--brand-blue); border-radius: 9px; background: var(--paper);
  color: var(--ink); font-weight: 800;
}
.farm-context-name { margin: 0; color: var(--brand-blue-deep); font-weight: 850; }
.farm-context-heading small { margin-bottom: 3px; color: var(--muted); }
.topbar-actions, .actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.local-demo-session {
  display: inline-flex; align-items: center; gap: 8px; padding-left: 10px;
  border-left: 1px solid var(--line); color: var(--muted); font-size: .78rem; font-weight: 750;
}
.local-demo-session button.secondary { min-height: 36px; padding: 6px 10px; }
.mode-pill, .location-pill, #priority-badge, .status-label {
  display: inline-flex; align-items: center; width: fit-content; padding: 7px 11px;
  border-radius: 999px; background: var(--forest-soft); color: var(--forest);
  font-size: .78rem; font-weight: 800;
}
main { padding: 28px clamp(20px, 4vw, 48px) 48px; }
.view { max-width: 1320px; margin: 0 auto; }
[hidden] { display: none !important; }
.hub-priority {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 18px;
  align-items: center; margin-bottom: 16px; padding: 22px 24px;
  border: 1px solid #c8d2cc; border-left: 7px solid #7d8d86;
  border-radius: 18px; background: var(--paper); box-shadow: var(--shadow);
}
.hub-priority[data-state="red"] {
  border-color: #e7aaa5; border-left-color: var(--red); background: #fff9f8;
}
.hub-priority[data-state="yellow"] {
  border-color: #e7cf84; border-left-color: var(--yellow); background: #fffcf2;
}
.hub-priority[data-state="green"] {
  border-color: #acd6b9; border-left-color: var(--green); background: #f7fcf8;
}
.hub-priority-icon {
  display: grid; place-items: center; width: 58px; height: 58px;
  border-radius: 17px; background: #e8eeea; color: var(--forest);
  font-size: 1.55rem; font-weight: 950;
}
.hub-priority[data-state="red"] .hub-priority-icon {
  background: var(--red-soft); color: var(--red);
}
.hub-priority[data-state="yellow"] .hub-priority-icon {
  background: var(--yellow-soft); color: var(--yellow);
}
.hub-priority[data-state="green"] .hub-priority-icon {
  background: var(--green-soft); color: var(--green);
}
.hub-priority-copy h2 { margin-bottom: 5px; font-size: clamp(1.25rem, 2.2vw, 1.65rem); }
.hub-priority-copy > p:not(.eyebrow) { margin-bottom: 6px; color: #354a42; line-height: 1.5; }
.hub-priority-copy small { color: var(--muted); }
.quick-actions {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px;
  margin-bottom: 16px;
}
.quick-action {
  display: flex; align-items: center; gap: 12px; min-height: 76px; padding: 13px 15px;
  border: 1px solid var(--line); border-radius: 14px; background: var(--paper);
  color: var(--ink); text-align: left; box-shadow: 0 5px 18px rgb(3 26 56 / 6%);
}
.quick-action:hover { border-color: var(--brand-blue); transform: translateY(-1px); }
.quick-action > span:first-child {
  display: grid; place-items: center; width: 38px; height: 38px; flex: 0 0 38px;
  border-radius: 12px; background: var(--forest-soft); color: var(--forest);
  font-size: 1.05rem; font-weight: 900;
}
.quick-action strong, .quick-action small { display: block; }
.quick-action > span:last-child { min-width: 0; }
.quick-action strong { overflow-wrap: anywhere; }
.quick-action small { margin-top: 3px; color: var(--muted); font-size: .75rem; }
.summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.summary-card {
  display: flex; gap: 14px; align-items: center; min-height: 102px; padding: 20px;
  border: 1px solid var(--line); border-radius: 16px; background: var(--paper);
}
.summary-card strong, .summary-card span { display: block; }
.summary-card strong { font-size: 1.8rem; }
.summary-card span:last-child { color: var(--muted); }
.summary-icon {
  display: grid !important; place-items: center; width: 44px; height: 44px;
  border-radius: 14px; font-size: 1.2rem; font-weight: 900;
}
.urgent .summary-icon { background: var(--red-soft); color: var(--red); }
.attention .summary-icon { background: var(--yellow-soft); color: var(--yellow); }
.calm .summary-icon { background: var(--green-soft); color: var(--green); }
.dashboard-grid {
  display: grid; grid-template-columns: minmax(300px, .8fr) minmax(0, 1.35fr);
  gap: 18px; margin-top: 18px;
}
.current-panel { grid-column: 1; }
.map-panel { grid-column: 2; }
.panel {
  padding: 20px; border: 1px solid var(--line); border-radius: 16px;
  background: var(--paper); box-shadow: 0 8px 26px #17312b0b;
}
.panel-heading, .page-intro {
  display: flex; justify-content: space-between; gap: 18px; align-items: start;
}
.page-intro { margin-bottom: 20px; }
.page-intro > p { max-width: 520px; color: var(--muted); }
button.primary, button.secondary, .text-button {
  min-height: 44px; padding: 9px 14px; border-radius: 10px; font-weight: 750;
}
button.primary { border: 1px solid var(--brand-blue); background: var(--brand-blue); color: white; }
button.primary:hover { border-color: var(--brand-blue-deep); background: var(--brand-blue-deep); }
button.secondary { border: 1px solid #84a8ce; background: var(--paper); color: var(--brand-navy); }
button.secondary:hover { border-color: var(--brand-blue); background: var(--brand-blue-soft); }
.text-button { border: 0; background: transparent; color: var(--brand-blue-deep); }
.deviation-list { display: grid; gap: 12px; }
.deviation-card {
  display: grid; grid-template-columns: auto 1fr auto; gap: 13px; align-items: center;
  width: 100%; padding: 15px; border: 1px solid var(--line); border-radius: 13px;
  background: white; color: var(--ink); text-align: left;
}
.deviation-card:hover { border-color: #789188; }
.deviation-level {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px;
  font-weight: 900;
}
.level-red { background: var(--red-soft); color: var(--red); }
.level-yellow { background: var(--yellow-soft); color: var(--yellow); }
.deviation-card strong, .deviation-card small { display: block; }
.deviation-card small { margin-top: 4px; color: var(--muted); }
.deviation-card time { color: var(--muted); font-size: .82rem; }
.empty-state { margin: 0; padding: 28px 10px; color: var(--muted); text-align: center; }
.farm-map-shell { position: relative; min-height: 390px; overflow: hidden; border-radius: 14px; }
.farm-map {
  position: absolute; inset: 0; min-height: 390px; overflow: hidden;
  background: linear-gradient(145deg, #dfeada, #c8ddc3);
}
.demo-map-status {
  position: absolute; z-index: 700; top: 12px; left: 12px; display: flex;
  align-items: center; gap: 9px; max-width: calc(100% - 24px); padding: 9px 10px;
  border: 1px solid #ffffffc7; border-radius: 12px; background: #ffffffed;
  color: var(--forest); box-shadow: 0 7px 20px #17312b26;
}
.demo-map-status span:nth-child(2) { display: grid; line-height: 1.15; }
.demo-map-status small { margin-top: 3px; color: var(--muted); font-size: .72rem; }
.demo-motion-dot {
  width: 9px; height: 9px; flex: 0 0 9px; border-radius: 50%;
  background: #2f8f58; box-shadow: 0 0 0 5px #2f8f5824;
  animation: demo-motion-pulse 1.8s ease-in-out infinite;
}
.demo-map-status[data-paused="true"] .demo-motion-dot { animation: none; background: #8a7650; }
.map-control-button {
  min-height: 34px; margin-left: 5px; padding: 6px 9px; border: 1px solid #789188;
  border-radius: 8px; background: white; color: var(--forest); font-weight: 800;
}
@keyframes demo-motion-pulse {
  0%, 100% { transform: scale(.85); opacity: .68; }
  50% { transform: scale(1.1); opacity: 1; }
}
.position-marker-shell { transition: transform 1.35s linear; }
.position-fallback {
  position: absolute; inset: 0; overflow: hidden;
  background: #dce9d5;
}
.position-fallback svg { display: block; width: 100%; height: 100%; }
.position-fallback-marker {
  position: absolute; z-index: 5; transform: translate(-50%, -50%);
  min-height: 0; padding: 0; border: 0; background: transparent; cursor: pointer;
  transition: left 1.35s linear, top 1.35s linear;
}
.fallback-map-note {
  position: absolute; right: 10px; bottom: 28px; z-index: 4; margin: 0;
  padding: 5px 7px; border-radius: 7px; background: #ffffffd9; color: #40534c;
  font-size: .68rem; font-weight: 750;
}
.map-empty {
  margin: 10px 0 0; padding: 10px 12px; border-radius: 9px;
  background: var(--yellow-soft); color: #574000; font-weight: 700;
}
.position-marker {
  display: grid; place-items: center; width: 38px; height: 38px;
  border: 3px solid white; border-radius: 50%; color: white; font-size: .7rem;
  font-weight: 900; box-shadow: 0 5px 15px #17312b55;
}
.position-marker.current { background: var(--green); }
.position-marker.stale { background: var(--yellow); }
.position-marker.alert-yellow { background: var(--yellow); }
.position-marker.alert-red {
  background: var(--red); animation: demo-alert-pulse 1.7s ease-out infinite;
}
@keyframes demo-alert-pulse {
  0%, 100% { box-shadow: 0 5px 15px #17312b55, 0 0 0 0 #a3231b55; }
  50% { box-shadow: 0 5px 15px #17312b55, 0 0 0 10px #a3231b00; }
}
.indoor-position-summary {
  display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 0; padding: 0; list-style: none;
}
.indoor-position-summary li {
  padding: 7px 10px; border-radius: 999px; background: var(--forest-soft);
  color: var(--forest); font-size: .78rem; font-weight: 750;
}
.map-field {
  position: absolute; display: grid; place-items: center; border: 2px solid #ffffff99;
  color: #3e584a; font-weight: 750; font-size: .8rem;
}
.field-a { inset: 8% 7% 43% 35%; border-radius: 42% 20% 33% 18%; }
.field-b { left: 8%; bottom: 10%; width: 32%; height: 34%; border-radius: 8px; background: #f7f3e8aa; }
.pig-marker {
  position: absolute; display: grid; place-items: center; width: 38px; height: 38px;
  border: 3px solid white; border-radius: 50%; color: white; font-size: .75rem;
  font-weight: 900; box-shadow: 0 5px 15px #17312b33;
}
button.pig-marker { padding: 0; }
.red-marker { left: 67%; top: 24%; background: var(--red); }
.yellow-marker { left: 49%; top: 58%; background: var(--yellow); }
.green-marker { left: 19%; top: 64%; background: var(--green); }
.map-help { margin: 10px 0 0; color: var(--muted); font-size: .85rem; }
.system-strip {
  grid-column: 1 / -1; display: grid; grid-template-columns: minmax(190px, 1fr) 2fr auto;
  gap: 20px; align-items: center;
}
.health-list { display: flex; flex-wrap: wrap; gap: 14px 20px; margin: 0; padding: 0; list-style: none; }
.health-list li { display: flex; gap: 8px; align-items: center; }
.health-list li[data-state="neutral"] .ok-dot {
  background: #8b9891; box-shadow: 0 0 0 4px #8b989122;
}
.health-list li[data-state="attention"] .ok-dot {
  background: var(--yellow); box-shadow: 0 0 0 4px #d6a31522;
}
.health-list li[data-state="blocked"] .ok-dot {
  background: var(--red); box-shadow: 0 0 0 4px #b4231822;
}
.detail-panel { margin-top: 18px; border-left: 5px solid var(--forest); }
.inspection-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.inspection-deferral {
  display: grid; gap: 12px; margin-top: 16px; padding: 16px;
  border: 1px solid #d6bd78; border-radius: 12px; background: var(--yellow-soft);
}
.inspection-deferral textarea {
  width: 100%; min-height: 92px; resize: vertical; padding: 10px 12px;
  border: 1px solid #8c9991; border-radius: 9px; background: white; color: var(--ink);
}
.inspection-deferral p { margin: 0; color: #5d4a13; }
.inspection-deferral .inspection-actions { margin-top: 0; }
#priority-badge.priority-green { background: var(--green-soft); color: var(--green); }
#priority-badge.priority-yellow { background: var(--yellow-soft); color: var(--yellow); }
#priority-badge.priority-red { background: var(--red-soft); color: var(--red); }
.evidence-placeholder {
  display: flex; gap: 12px; align-items: center; margin: 18px 0; padding: 16px;
  border: 1px dashed #9ba9a1; border-radius: 12px; background: #f7faf7;
}
.evidence-placeholder span { font-size: 1.6rem; }
.evidence-placeholder strong, .evidence-placeholder small { display: block; }
.evidence-placeholder small { color: var(--muted); }
.support-note {
  padding: 12px 14px; border-left: 4px solid var(--focus); border-radius: 0 8px 8px 0;
  background: #fff7e8; font-weight: 650;
}
.timeline { display: grid; gap: 0; }
.timeline article { display: grid; grid-template-columns: 130px 1fr; gap: 18px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.timeline time, .timeline p { color: var(--muted); }
.animal-grid { display: grid; gap: 12px; }
.animal-registration {
  margin-bottom: 18px; padding: 16px; border: 1px solid var(--line);
  border-radius: 14px; background: var(--paper);
}
.animal-registration summary { cursor: pointer; font-weight: 850; }
.animal-registration > p { color: var(--muted); line-height: 1.5; }
.animal-registration form {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px; align-items: end;
}
.animal-registration form button { min-height: 44px; }
#animal-registration-status:not(:empty) {
  margin: 12px 0 0; padding: 11px 13px; border-left: 4px solid var(--yellow);
  border-radius: 8px; background: var(--yellow-soft); font-weight: 700;
}
#animal-registration-status[data-state="ready"] {
  border-color: var(--green); background: var(--green-soft);
}
#animal-registration-status[data-state="failed"] {
  border-color: var(--red); background: var(--red-soft);
}
.animal-card {
  display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center;
  width: 100%; padding: 16px; border: 1px solid var(--line); border-radius: 13px;
  background: var(--paper); color: var(--ink); text-align: left; cursor: pointer;
}
.animal-card:hover { border-color: var(--brand-blue); background: var(--brand-blue-soft); }
.animal-card:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.animal-card p { margin: 4px 0 0; color: var(--muted); }
.animal-avatar {
  display: grid; place-items: center; width: 46px; height: 46px; border-radius: 15px;
  background: var(--brand-blue-soft); color: var(--brand-blue-deep); font-weight: 900;
}
.red-label { background: var(--red-soft); color: var(--red); }
.yellow-label { background: var(--yellow-soft); color: var(--yellow); }
.green-label { background: var(--green-soft); color: var(--green); }
.search-field { min-width: min(320px, 100%); }
label { display: grid; gap: 6px; font-weight: 650; color: var(--ink); }
input, select {
  width: 100%; min-height: 44px; padding: 9px 11px; border: 1px solid #8c9991;
  border-radius: 9px; background: white; color: var(--ink);
}
.map-search {
  display: grid; gap: 8px; margin: 18px 0 12px; padding: 16px;
  border: 1px solid #b9c6c0; border-radius: 14px; background: var(--paper);
}
.farm-map-switch-status {
  margin: 10px 0 14px; padding: 11px 13px; border-left: 4px solid var(--brand-blue);
  border-radius: 8px; background: var(--brand-blue-soft); color: var(--brand-navy); font-weight: 800;
}
.farm-map-switch-status[data-state="loading"] { color: var(--muted); background: #f1f4f2; }
.farm-map-switch-status[data-state="empty"] { color: #755300; background: var(--yellow-soft); }
.map-search-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
.map-search-row button { min-width: 140px; }
.map-search-help, #map-search-status { margin: 0; color: var(--muted); font-size: .88rem; }
#map-search-status[data-state="failed"] { color: var(--red); font-weight: 750; }
#map-search-status[data-state="ready"] { color: var(--green); font-weight: 750; }
.map-search-results { display: grid; gap: 8px; }
.map-search-result {
  display: grid; gap: 3px; width: 100%; padding: 11px 13px; text-align: left;
  border: 1px solid #9fb1a9; border-radius: 10px; background: #f7faf7; color: var(--ink);
}
.map-search-result:hover, .map-search-result:focus-visible { border-color: var(--focus); background: #eef7f1; }
.map-search-result span { color: var(--muted); font-size: .82rem; }
.map-mode-switch {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 12px 0;
}
.map-mode-switch button.active { border-color: var(--brand-blue); background: var(--brand-blue); color: white; }
#map-mode-help { color: var(--muted); font-size: .88rem; }
.geofence-map-shell {
  position: relative; width: 100%; min-height: 430px; overflow: hidden;
  border: 2px solid #789188; border-radius: 14px;
  background: linear-gradient(145deg, #e7efe1, #d2e3cd);
}
#geofence-base-map, #geofence-editor { position: absolute; inset: 0; width: 100%; height: 100%; }
#geofence-base-map { z-index: 1; background: linear-gradient(145deg, #e7efe1, #d2e3cd); }
.geofence-focused-pig {
  position: absolute; z-index: 5; transform: translate(-50%, -50%); pointer-events: none;
}
.focused-pig-marker {
  width: 46px; height: 46px; border-width: 4px;
  outline: 4px solid var(--brand-orange); outline-offset: 3px;
  box-shadow: 0 0 0 8px #ff650033, 0 7px 20px #031a3866;
}
#geofence-base-map[data-map-status="fallback"] {
  background:
    linear-gradient(30deg, transparent 49.4%, #f7f1df 49.5% 54%, transparent 54.1%),
    linear-gradient(120deg, transparent 46%, #bfd2b6 46.2% 47%, transparent 47.2%),
    repeating-linear-gradient(0deg, #dce9d5 0 52px, #d4e4cd 52px 54px);
}
#geofence-base-map[data-map-status="fallback"]::before,
#geofence-base-map[data-map-status="fallback"]::after {
  content: ""; position: absolute; border: 2px dashed #7da071; border-radius: 22px;
}
#geofence-base-map[data-map-status="fallback"]::before { inset: 9% 48% 48% 7%; }
#geofence-base-map[data-map-status="fallback"]::after { inset: 44% 8% 8% 34%; }
.geofence-local-map-label {
  position: absolute; top: 12px; right: 12px; z-index: 1; padding: 7px 9px;
  border: 1px solid #8daf82; border-radius: 8px; background: #ffffffeb;
  color: var(--forest); font-size: .75rem; font-weight: 800;
}
#geofence-editor { z-index: 2; min-height: 430px; touch-action: none; }
#geofence-editor[data-mode="pan"] { pointer-events: none; }
#geofence-editor[data-mode="draw"] { pointer-events: auto; cursor: crosshair; }
#geofence-editor polygon { filter: drop-shadow(0 2px 2px #173f3555); }
.map-attribution {
  position: absolute; right: 7px; bottom: 5px; z-index: 3; margin: 0;
  padding: 3px 6px; border-radius: 5px; background: #ffffffdd; color: #40534c;
  font-size: .68rem; pointer-events: none;
}
.leaflet-control-container { position: relative; z-index: 4; }
.system-checks { display: grid; gap: 12px; padding: 0; list-style: none; }
.system-checks li {
  display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center;
  padding: 18px; border: 1px solid var(--line); border-radius: 13px;
  background: var(--paper);
}
.system-checks li[data-status="ok"] { background: var(--green-soft); border-color: #9fcbae; }
.system-checks li[data-status="attention"] { background: var(--yellow-soft); border-color: #d7ad33; }
.system-checks li[data-status="blocked"] { background: var(--red-soft); border-color: #d88b84; }
.system-checks li[data-status="neutral"],
.system-checks li[data-status="checking"] { background: #f1f4f2; border-color: #b9c6c0; }
.system-checks p { margin: 4px 0 0; color: var(--muted); }
.system-status {
  min-width: 48px; padding: 6px 10px; border-radius: 999px;
  background: var(--green); color: white; text-align: center; font-size: .78rem; font-weight: 900;
}
.system-checks li[data-status="attention"] .system-status { background: #8a6300; }
.system-checks li[data-status="blocked"] .system-status { background: var(--red); }
.system-checks li[data-status="neutral"] .system-status,
.system-checks li[data-status="checking"] .system-status { background: #52645d; }
#system-check-status { background: #f1f4f2; border-left-color: #70847b; }
#system-check-status[data-status="ok"] { background: var(--green-soft); border-left-color: var(--green); }
#system-check-status[data-status="attention"] { background: var(--yellow-soft); border-left-color: #8a6300; }
#system-check-status[data-status="blocked"] { background: var(--red-soft); border-left-color: var(--red); }
.diagnostic-panel {
  margin-top: 20px; padding: 20px; border: 1px solid #b9c6c0; border-radius: 16px;
  background: var(--paper);
}
.diagnostic-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.diagnostic-heading h3 { margin: 0; }
#diagnostic-overall {
  padding: 7px 11px; border-radius: 999px; background: #52645d; color: white;
  font-size: .78rem; font-weight: 900; white-space: nowrap;
}
#diagnostic-overall[data-status="passed"] { background: var(--green); }
#diagnostic-overall[data-status="attention"] { background: #8a6300; }
#diagnostic-overall[data-status="failed"] { background: var(--red); }
.diagnostic-results { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.diagnostic-result { padding: 13px; border: 1px solid var(--line); border-radius: 12px; background: #f7f9f7; }
.diagnostic-result[data-status="passed"] { border-color: #9fcbae; background: var(--green-soft); }
.diagnostic-result[data-status="attention"] { border-color: #d7ad33; background: var(--yellow-soft); }
.diagnostic-result[data-status="failed"] { border-color: #d88b84; background: var(--red-soft); }
.diagnostic-result h4, .diagnostic-result p { margin: 0 0 5px; }
.diagnostic-result code { font-size: .72rem; color: #40534c; }
.diagnostic-actions { margin-top: 14px; display: flex; gap: 10px; }
.diagnostic-privacy { padding: 10px 12px; border-radius: 9px; background: var(--forest-soft); color: #40534c; }
.feed-status {
  margin: 0 0 14px; padding: 12px 14px; border-left: 4px solid var(--yellow);
  border-radius: 8px; background: var(--yellow-soft); color: var(--ink); font-weight: 700;
}
.feed-status[data-state="ready"] { border-color: var(--green); background: var(--green-soft); }
.feed-status[data-state="offline"] { border-color: #9a6b00; background: #fff1bd; }
.feed-status[data-state="failed"] { border-color: var(--red); background: var(--red-soft); }
.admin-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.admin-grid form { display: grid; gap: 14px; align-content: start; }
.account-management { display: grid; gap: 14px; align-content: start; }
.account-management p { margin: 0; color: var(--muted); line-height: 1.5; }
.account-deletion { display: grid; gap: 14px; align-content: start; }
.account-deletion p { margin: 0; color: var(--muted); line-height: 1.5; }
.account-deletion form { padding-top: 12px; border-top: 1px solid var(--line); }
.deletion-impact { margin: 0; padding-left: 20px; color: var(--ink); }
.check-row { grid-template-columns: auto 1fr; align-items: start; font-weight: 600; }
.check-row input { width: 20px; min-height: 20px; margin-top: 1px; }
.danger-button { background: var(--red); color: white; border-color: var(--red); }
.danger-button:disabled { opacity: .55; cursor: not-allowed; }
.danger-outline {
  min-height: 44px; padding: 9px 14px; border: 1px solid var(--red);
  border-radius: 10px; background: white; color: var(--red); font-weight: 800;
}
.geofence-archive {
  display: grid; gap: 12px; margin-top: 16px; padding: 16px;
  border: 1px solid #dcaaa4; border-radius: 12px; background: var(--red-soft);
}
.geofence-archive p { margin: 0; color: #6f2b25; line-height: 1.5; }
.geofence-archive .actions { margin-top: 0; }
.public-deletion-card { display: grid; gap: 16px; }
.public-deletion-card .support-note { margin: 0; }
.public-deletion-card .support-note p { margin: 6px 0 0; font-weight: 500; }
.retained-data-note { background: var(--green-soft); border-left-color: var(--green); }
.public-deletion-link { display: block; text-align: center; text-decoration: none; }
#account-deletion-status:not(:empty) {
  padding: 12px; border-left: 4px solid var(--yellow); border-radius: 8px;
  background: var(--yellow-soft); color: var(--ink); font-weight: 700;
}
#account-deletion-status[data-state="failed"] {
  border-color: var(--red); background: var(--red-soft);
}
#account-deletion-status[data-state="complete"] {
  border-color: var(--green); background: var(--green-soft);
}
.billing-panel { display: grid; gap: 10px; align-content: start; }
.billing-panel p { margin: 0; line-height: 1.5; }
#billing-status { color: var(--green); font-weight: 850; }
#billing-status[data-state="attention"] { color: var(--yellow); }
#billing-safety-note { padding: 10px 12px; border-radius: 10px; background: var(--green-soft); }
.member-invite-panel { display: grid; gap: 14px; align-content: start; }
.member-invite-panel p { margin: 0; color: var(--muted); line-height: 1.5; }
.membership-overview { grid-column: 1 / -1; display: grid; gap: 14px; }
.panel-heading-row { display: flex; gap: 16px; justify-content: space-between; align-items: start; }
.panel-heading-row h3, .panel-heading-row p { margin: 0; }
.panel-heading-row p { margin-top: 6px; color: var(--muted); line-height: 1.45; }
.membership-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.membership-columns h4 { margin: 0 0 8px; }
.membership-list { display: grid; gap: 8px; padding: 0; margin: 0; list-style: none; }
.membership-list li {
  display: flex; gap: 12px; justify-content: space-between; align-items: center;
  padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper);
}
.membership-list li > div { min-width: 0; }
.membership-list strong, .membership-list small { display: block; overflow-wrap: anywhere; }
.membership-list small { margin-top: 3px; color: var(--muted); }
.membership-list button { flex: 0 0 auto; }
#membership-overview-status:not(:empty) {
  margin: 0; padding: 12px; border-left: 4px solid var(--yellow);
  border-radius: 8px; background: var(--yellow-soft); font-weight: 700;
}
#membership-overview-status[data-state="ready"] {
  border-color: var(--green); background: var(--green-soft);
}
#membership-overview-status[data-state="failed"] {
  border-color: var(--red); background: var(--red-soft);
}
.member-accept-panel { display: grid; gap: 14px; align-content: start; }
.member-accept-panel p { margin: 0; color: var(--muted); line-height: 1.5; }
#membership-accept-status:not(:empty) {
  padding: 12px; border-left: 4px solid var(--yellow); border-radius: 8px;
  background: var(--yellow-soft); color: var(--ink); font-weight: 700;
}
#membership-accept-status[data-state="accepted"] {
  border-color: var(--green); background: var(--green-soft);
}
#membership-accept-status[data-state="failed"] {
  border-color: var(--red); background: var(--red-soft);
}
#member-invite-status:not(:empty) {
  padding: 12px; border-left: 4px solid var(--yellow); border-radius: 8px;
  background: var(--yellow-soft); color: var(--ink); font-weight: 700;
}
#member-invite-status[data-state="delivered"] {
  border-color: var(--green); background: var(--green-soft);
}
#member-invite-status[data-state="failed"] {
  border-color: var(--red); background: var(--red-soft);
}
@media (max-width: 980px) {
  .app-shell { grid-template-columns: 210px minmax(0, 1fr); }
  .quick-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .current-panel, .map-panel { grid-column: auto; }
  .system-strip { grid-column: auto; grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .diagnostic-results { grid-template-columns: 1fr; }
  .diagnostic-heading { flex-direction: column; }
  .membership-columns { grid-template-columns: 1fr; }
  .panel-heading-row { align-items: stretch; flex-direction: column; }
  body { padding-bottom: 72px; }
  .app-shell { display: block; }
  .sidebar {
    position: fixed; inset: auto 0 0; z-index: 10; width: 100%; height: 72px;
    padding: 8px 10px; box-shadow: 0 -6px 20px #17312b22;
  }
  .brand, .sidebar-foot { display: none; }
  .nav-section-label { display: none; }
  .sidebar nav { display: grid; grid-template-columns: repeat(5, 1fr); }
  .nav-item { display: none; min-height: 56px; padding: 6px; font-size: .7rem; }
  .nav-item[data-view="overview"], .nav-item[data-view="deviations"],
  .nav-item[data-view="geofence"], .nav-item[data-view="support"],
  .nav-item[data-view="admin"] {
    display: flex; flex-direction: column; gap: 2px; font-size: .68rem;
  }
  .nav-item > span:first-child { width: auto; font-size: 1.05rem; }
  .nav-count { position: absolute; margin: -26px 0 0 24px; font-size: .66rem; }
  .topbar { min-height: 78px; padding: 14px 16px; }
  .pitch-demo-bar { align-items: stretch; flex-direction: column; padding: 12px 16px; }
  .pitch-bar-actions { flex-wrap: wrap; }
  .pitch-guide {
    grid-template-columns: 1fr; margin: 12px 14px 0; padding: 16px;
  }
  .pitch-progress, .pitch-guide-buttons { justify-content: flex-start; }
  .topbar-actions .secondary, .topbar-actions .mode-pill { display: none; }
  main { padding: 18px 14px 28px; }
  .hub-priority { grid-template-columns: auto 1fr; padding: 18px; }
  .hub-priority > button { grid-column: 1 / -1; width: 100%; }
  .quick-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quick-action { min-width: 0; align-items: flex-start; padding: 12px; }
  .quick-action > span:first-child { width: 34px; height: 34px; flex-basis: 34px; }
  .summary-grid { grid-template-columns: 1fr 1fr; }
  .summary-card { min-height: 88px; padding: 14px; }
  .summary-card:last-child { grid-column: 1 / -1; }
  .panel-heading, .page-intro { align-items: stretch; flex-direction: column; }
  .deviation-card, .animal-card { grid-template-columns: auto 1fr; }
  .animal-registration form { grid-template-columns: 1fr; }
  .deviation-card time, .animal-card .status-label { grid-column: 2; }
  .admin-grid { grid-template-columns: 1fr; }
  .geofence-map-shell, #geofence-editor { min-height: 330px; }
  .map-search-row { grid-template-columns: 1fr; }
  .map-search-row button { width: 100%; }
  .demo-map-status { right: 10px; left: 10px; }
  .demo-map-status small { display: none; }
  .system-checks li { grid-template-columns: auto 1fr; }
  .system-status { grid-column: 2; justify-self: start; }
  .account-entry { padding: 14px; }
  .account-card { padding: 24px 18px; }
  .account-modes { grid-template-columns: 1fr; }
  .provider-buttons { grid-template-columns: 1fr; }
}
