/* ==========================================================================
   GroveIQ — Design System — "Field Notes" (Genspark Design handoff, global retheme)
   Warm cream/forest palette. Token NAMES kept stable (--navy-900 etc.) so every
   existing page restyles automatically; only the underlying hex values changed.
   ========================================================================== */

:root {
  /* Legacy token names retained, remapped to Field Notes hues */
  --navy-950: #1A241E;   /* darkest — nav bg, deepest headings */
  --navy-900: #1F2A24;   /* primary text / dark surfaces */
  --navy-800: #283A2E;
  --navy-700: #33453A;
  --navy-600: #3F5548;
  --teal-500: #2F5D3A;   /* primary accent (forest green) */
  --teal-400: #3D7A4B;
  --teal-300: #6FA07B;
  --blue-500: #3D6B7A;   /* secondary "info" accent (steel) */
  --blue-teal-gradient: linear-gradient(135deg, #2F5D3A 0%, #3D7A4B 100%);

  /* Field Notes semantic names (used by new Overview panels + map) */
  --fn-bg: #F5EFE3;
  --fn-card: #FBF6EA;
  --fn-border: #E3D9C2;
  --fn-map-bg: #EDE3CE;
  --fn-text: #1F2A24;
  --fn-text-dim: #6B6553;
  --fn-accent: #2F5D3A;
  --fn-accent-2: #C45B3D;   /* terracotta — backgrounds/icons only, NOT body text (WCAG AA fail on cream) */
  --fn-success: #4E7A3E;
  --fn-warn: #C8892F;
  --fn-danger: #B7402B;
  --fn-track-dim: #E3D9C2;
  --fn-nav-bg: #1F2A24;
  --fn-nav-text: #F5EFE3;
  --fn-nav-accent: #D9C88F;
  --fn-zone-1: #7A9B6E;
  --fn-zone-2: #52734A;
  --fn-zone-3: #8B9B7A;
  --fn-zone-4: #B79A5E;
  --fn-zone-5: #A8724F;
  --fn-chart-1: #52734A;
  --fn-chart-2: #6B8F6B;
  --fn-chart-3: #C45B3D;

  --bg-app: #F5EFE3;
  --bg-card: #FBF6EA;
  --bg-card-hover: #F3ECDC;
  --border-light: #E3D9C2;
  --border-medium: #D8CBA8;

  --text-primary: #1F2A24;
  --text-secondary: #4B5346;
  --text-muted: #6B6553;
  --text-inverse: #F5EFE3;

  --status-ok: #4E7A3E;
  --status-ok-bg: #E7EFE0;
  --status-warning: #C8892F;
  --status-warning-bg: #F5E6CC;
  --status-critical: #B7402B;
  --status-critical-bg: #F3DCD5;
  --status-info: #3D6B7A;
  --status-info-bg: #DCE7EA;

  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;
  --shadow-card: 0 1px 2px rgba(31, 42, 36, 0.06), 0 1px 6px rgba(31, 42, 36, 0.07);
  --shadow-card-hover: 0 4px 14px rgba(31, 42, 36, 0.14);
  --sidebar-width: 260px;

  --font-display: 'Geist', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, 'SF Mono', 'JetBrains Mono', monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-display);
  background: var(--bg-app);
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 14px; }

/* ---------------- Layout: top nav (no sidebar) ---------------- */
body { background: var(--bg-app); }

.topbar-nav {
  display: flex; align-items: center; gap: 18px;
  padding: 12px 24px; background: linear-gradient(180deg, var(--navy-900) 0%, var(--navy-950) 100%);
  position: sticky; top: 0; z-index: 50;
  box-shadow: 0 2px 14px rgba(26,36,30,0.28);
}
.topbar-brand { display: flex; align-items: center; gap: 9px; flex-shrink: 0; }
.brand-mark { width: 30px; height: 30px; object-fit: contain; border-radius: 8px; }
.brand-name { font-weight: 800; font-size: 16.5px; letter-spacing: 0.2px; color: #fff; }
.topbar-spacer { flex: 1; }

.tile-strip-home {
  flex-shrink: 0; width: 38px; height: 38px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.75);
  font-size: 15px; transition: background 0.15s, color 0.15s;
}
.tile-strip-home:hover { background: rgba(255,255,255,0.16); color: #fff; }

.tile-strip {
  display: flex; align-items: center; gap: 6px; overflow-x: auto;
  flex: 1; min-width: 0; padding: 4px 2px; scrollbar-width: thin;
}
.tile-strip::-webkit-scrollbar { height: 4px; }
.tile-strip::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 4px; }
.tile-chip {
  flex-shrink: 0; display: flex; align-items: center; gap: 8px;
  padding: 5px 12px 5px 5px; border-radius: 30px;
  background: rgba(255,255,255,0.05); color: rgba(255,255,255,0.65);
  font-size: 12.5px; font-weight: 600; white-space: nowrap;
  transition: background 0.15s, color 0.15s; border: 1px solid transparent;
}
.tile-chip img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; background: var(--navy-800); }
.tile-chip:hover { background: rgba(255,255,255,0.1); color: #fff; }
.tile-chip.active {
  background: linear-gradient(135deg, rgba(217,200,143,0.32), rgba(63,122,75,0.32));
  color: #fff; border-color: rgba(217,200,143,0.4);
}

.topbar-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.role-switcher { display: flex; align-items: center; gap: 6px; }
.role-switcher label { display: none; }
.role-switcher select {
  background: rgba(255,255,255,0.08); color: #fff; border: 1px solid rgba(255,255,255,0.14);
  border-radius: 30px; padding: 7px 12px; outline: none; font-size: 12.5px; font-weight: 600;
}
.role-switcher select option { color: #111; }

.sim-badge, .data-mode-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px; font-weight: 600; padding: 6px 12px; border-radius: 20px;
  white-space: nowrap;
}
.sim-badge { background: rgba(217,200,143,0.2); color: #D9C88F; }
.data-mode-badge { background: rgba(200,137,47,0.2); color: #E0AE5E; border: 1px dashed rgba(200,137,47,0.45); }
.data-mode-badge-compact { display: none; }

.page-header-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 18px 28px 6px;
}
.page-title { font-size: 21px; display: flex; align-items: center; gap: 10px; color: var(--navy-900); }
.page-title i { color: var(--teal-500); font-size: 18px; }
.powered-by-inline { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--text-muted); }
.powered-by-inline strong { color: var(--text-secondary); font-size: 11.5px; }

.content { padding: 16px 28px 60px; }
.loading-placeholder { padding: 60px 0; text-align: center; color: var(--text-muted); font-size: 14px; }

/* ---------------- Launcher home page ---------------- */
.launcher-page { max-width: 1280px; margin: 0 auto; padding: 28px 28px 60px; }
.launcher-hero {
  position: relative; border-radius: var(--radius-xl); overflow: hidden;
  min-height: 300px; background-size: cover; background-position: center 30%;
  display: flex; align-items: flex-end; margin-bottom: 34px;
  box-shadow: var(--shadow-card-hover);
}
.launcher-hero-overlay {
  position: relative; width: 100%; padding: 32px 34px;
  background: linear-gradient(180deg, rgba(26,36,30,0) 0%, rgba(20,28,22,0.86) 78%);
  color: #fff;
}
.launcher-hero-overlay h1 { font-size: 28px; margin: 8px 0 8px; }
.launcher-hero-overlay p { max-width: 620px; font-size: 14px; color: rgba(255,255,255,0.82); margin: 0; }
.launcher-hero-overlay .data-mode-badge { margin-bottom: 6px; }

.tile-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
@media (max-width: 980px) { .tile-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .tile-grid { grid-template-columns: 1fr; } }

.tile-card {
  display: flex; flex-direction: column;
  background: var(--bg-card); border-radius: var(--radius-xl);
  border: 1px solid var(--border-light); box-shadow: var(--shadow-card);
  overflow: hidden; transition: transform 0.18s, box-shadow 0.18s;
}
.tile-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card-hover); }
.tile-card-img {
  background: linear-gradient(160deg, var(--navy-900), var(--navy-950));
  aspect-ratio: 16/10; display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.tile-card-img img { width: 78%; height: 78%; object-fit: contain; transition: transform 0.25s; }
.tile-card:hover .tile-card-img img { transform: scale(1.06); }
.tile-card-body { padding: 16px 18px 4px; flex: 1; }
.tile-card-body h3 { font-size: 15.5px; display: flex; align-items: center; gap: 8px; color: var(--navy-900); margin-bottom: 6px; }
.tile-card-body h3 i { color: var(--teal-500); font-size: 13px; }
.tile-card-body p { font-size: 12.5px; color: var(--text-muted); margin: 0; line-height: 1.5; }
.tile-card-cta {
  display: flex; align-items: center; gap: 6px; justify-content: flex-end;
  padding: 12px 18px 16px; font-size: 12.5px; font-weight: 700; color: var(--teal-500);
}

.launcher-footer {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  margin-top: 40px; font-size: 11.5px; color: var(--text-muted);
}
.launcher-footer strong { color: var(--text-secondary); }

/* ---------------- Cards & grid ---------------- */
.card {
  background: var(--bg-card); border-radius: var(--radius-lg);
  border: 1px solid var(--border-light); box-shadow: var(--shadow-card);
  padding: 18px 20px;
}
.card-title { font-size: 13px; font-weight: 700; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.3px; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.grid { display: grid; gap: 16px; }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
.grid-cols-6 { grid-template-columns: repeat(6, 1fr); }
@media (max-width: 1200px) { .grid-cols-4 { grid-template-columns: repeat(2, 1fr); } .grid-cols-6 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 720px) { .grid-cols-2, .grid-cols-3, .grid-cols-4, .grid-cols-6 { grid-template-columns: 1fr; } }

.stat-card { display: flex; flex-direction: column; gap: 6px; }
.stat-card .stat-label { font-size: 12px; color: var(--text-muted); font-weight: 600; display:flex; align-items:center; gap:6px;}
.stat-card .stat-value { font-size: 26px; font-weight: 800; color: var(--navy-900); }
.stat-card .stat-sub { font-size: 12px; color: var(--text-muted); }
.stat-icon { width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: var(--blue-teal-gradient); color: #fff; font-size: 14px; }

/* ---------------- Badges / status ---------------- */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 20px; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.3px; }
.badge-ok, .badge-online { background: var(--status-ok-bg); color: var(--status-ok); }
.badge-warning { background: var(--status-warning-bg); color: var(--status-warning); }
.badge-critical, .badge-offline { background: var(--status-critical-bg); color: var(--status-critical); }
.badge-info { background: var(--status-info-bg); color: var(--status-info); }
.badge-experimental { background: #F3DCD5; color: #B7402B; border: 1px dashed #DDA893; }
.badge-simulated { background: #F5E6CC; color: #8A5E1F; }
.badge-measured { background: #E7EFE0; color: #3D5F32; }

.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot-ok { background: var(--status-ok); }
.dot-warning { background: var(--status-warning); }
.dot-critical { background: var(--status-critical); }

/* ---------------- Buttons ---------------- */
.btn { display: inline-flex; align-items: center; gap: 7px; padding: 9px 16px; border-radius: var(--radius-md); font-weight: 600; font-size: 13.5px; border: 1px solid transparent; transition: all 0.15s; }
.btn-primary { background: var(--blue-teal-gradient); color: #fff; }
.btn-primary:hover { filter: brightness(1.08); }
.btn-secondary { background: #fff; color: var(--navy-800); border-color: var(--border-medium); }
.btn-secondary:hover { background: var(--bg-card-hover); }
.btn-ghost { background: transparent; color: var(--text-secondary); }
.btn-ghost:hover { background: var(--bg-card-hover); }
.btn-danger { background: var(--status-critical-bg); color: var(--status-critical); }
.btn-sm { padding: 6px 11px; font-size: 12.5px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---------------- Tables ---------------- */
.table-wrap { overflow-x: auto; }
table.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data-table th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.3px; color: var(--text-muted); font-weight: 700; padding: 10px 12px; border-bottom: 1px solid var(--border-light); white-space: nowrap; }
table.data-table td { padding: 11px 12px; border-bottom: 1px solid var(--border-light); color: var(--text-primary); }
table.data-table tr:last-child td { border-bottom: none; }
table.data-table tr:hover td { background: var(--bg-card-hover); }

/* ---------------- Forms ---------------- */
.form-row { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.form-row label { font-size: 12.5px; font-weight: 600; color: var(--text-secondary); }
.form-row input, .form-row select, .form-row textarea {
  padding: 9px 11px; border: 1px solid var(--border-medium); border-radius: var(--radius-md);
  background: #fff; color: var(--text-primary); outline: none;
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus { border-color: var(--teal-500); box-shadow: 0 0 0 3px rgba(47,93,58,0.14); }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 16px; }
@media (max-width: 720px) { .form-grid { grid-template-columns: 1fr; } }

.modal-overlay { position: fixed; inset: 0; background: rgba(15,25,45,0.55); display: flex; align-items: center; justify-content: center; z-index: 100; padding: 20px; }
.modal-box { background: #fff; border-radius: var(--radius-xl); width: 100%; max-width: 560px; max-height: 88vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,0.25); }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--border-light); }
.modal-header h3 { font-size: 16px; }
.modal-body { padding: 20px 22px; }
.modal-footer { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 22px; border-top: 1px solid var(--border-light); }
.modal-close-btn { background: none; border: none; font-size: 16px; color: var(--text-muted); }

/* ---------------- Notice / callout ---------------- */
.notice { padding: 12px 14px; border-radius: var(--radius-md); font-size: 13px; display: flex; gap: 10px; align-items: flex-start; }
.notice i { margin-top: 1px; }
.notice-experimental { background: #F3DCD5; color: #8C3220; border: 1px dashed #DDA893; }
.notice-info { background: var(--status-info-bg); color: #2A4A54; }
.notice-simulated { background: #F5E6CC; color: #8A5E1F; border: 1px dashed #D8B876; }

/* ---------------- Hero (landing use, if needed) ---------------- */
.hero-illustration { width: 100%; border-radius: var(--radius-xl); display: block; }

/* ---------------- Farm map ---------------- */
/* ---------------- Farm Map — "Data-viz Cartogram" (Genspark Design handoff) ---------------- */
.map-wrap { display: flex; gap: 20px; align-items: flex-start; }
.map-svg-holder {
  position: relative; flex: 1; min-width: 0;
  background: #F4F6F9; border-radius: var(--radius-lg);
  border: 1px solid var(--border-light); padding: 10px;
}
.map-svg-holder svg { width: 100%; height: auto; display: block; }

.map-zone {
  cursor: pointer;
  transition: stroke-width 160ms cubic-bezier(0.4, 0, 0.2, 1), fill 160ms cubic-bezier(0.4, 0, 0.2, 1), opacity 160ms cubic-bezier(0.4, 0, 0.2, 1);
}
.map-zone:focus, .map-zone-building:focus { outline: none; }
.map-zone-building { cursor: pointer; }
.map-zone-building-hover {
  opacity: 0; transition: opacity 160ms cubic-bezier(0.4, 0, 0.2, 1);
}
.map-zone-group { cursor: pointer; }
.map-point { cursor: pointer; }
.map-point:focus circle, .map-zone:focus { outline: none; }
.map-point circle { transition: stroke-width 160ms cubic-bezier(0.4, 0, 0.2, 1); }

.map-chrome-legend, .map-chrome-scale { pointer-events: none; }

/* Floating tooltip — anchored top-right of the map wrapper per the handoff spec */
.map-tooltip {
  position: absolute; top: 12px; right: 12px;
  background: #FFFFFF; border: 1px solid #E5E9EF; border-radius: 12px;
  padding: 12px 14px; min-width: 200px;
  box-shadow: 0 12px 24px -6px rgba(16, 24, 40, 0.12), 0 4px 8px -2px rgba(16, 24, 40, 0.04);
  pointer-events: none; z-index: 5;
}
.map-tooltip[hidden] { display: none; }
.tt-status {
  display: flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em;
  color: #6B7684;
}
.tt-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.tt-name { margin-top: 4px; font-size: 15px; font-weight: 600; color: #0B1F3A; }
.tt-crop { margin-top: 2px; font-size: 12px; font-weight: 400; color: #475467; }
.tt-metrics {
  display: flex; gap: 20px; margin-top: 8px; padding-top: 8px;
  border-top: 1px solid #E5E9EF;
}
.tt-metric-label {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em; color: #6B7684;
}
.tt-metric-value {
  font-family: 'JetBrains Mono', monospace; font-variant-numeric: tabular-nums;
  font-size: 13px; font-weight: 600; color: #0B1F3A; margin-top: 2px;
}

.map-detail-panel { width: 320px; flex-shrink: 0; }

@media (max-width: 720px) {
  .map-wrap { flex-direction: column; }
  .map-detail-panel { width: 100%; }
}
@media (max-width: 480px) {
  .map-chrome-legend, .map-chrome-scale { display: none; }
}
@media (max-width: 360px) {
  .map-label-pill { display: none; }
}

/* ---------------- Utility ---------------- */
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; } .gap-10 { gap: 10px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; }
.mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-20 { margin-top: 20px; }
.mb-8 { margin-bottom: 8px; } .mb-12 { margin-bottom: 12px; } .mb-16 { margin-bottom: 16px; }
.text-muted { color: var(--text-muted); } .text-sm { font-size: 12.5px; } .text-xs { font-size: 11px; }
.section-title { font-size: 15px; font-weight: 700; color: var(--navy-900); margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.section-title i { color: var(--teal-500); }
.empty-state { text-align: center; padding: 40px 20px; color: var(--text-muted); }
.empty-state i { font-size: 26px; margin-bottom: 10px; display: block; color: var(--border-medium); }

/* ---------------- Responsive: top nav ---------------- */
@media (max-width: 900px) {
  .topbar-nav { flex-wrap: wrap; padding: 10px 14px; gap: 10px; }
  .tile-strip { order: 3; width: 100%; }
  .topbar-spacer { display: none; }
  .role-switcher select { padding: 6px 9px; font-size: 12px; }
  .sim-badge { display: none; }
  .data-mode-badge { display: none; }
  .page-header-bar { padding: 14px 16px 4px; flex-direction: column; align-items: flex-start; gap: 4px; }
  .powered-by-inline { display: none; }
  .content { padding: 16px; }
  .launcher-page { padding: 18px 16px 40px; }
  .launcher-hero-overlay h1 { font-size: 22px; }
}

/* ---------------- Visual Overview: gauges, sparklines, livestock, map thumb, alerts ---------------- */
.gauge-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 900px) { .gauge-grid { grid-template-columns: 1fr; } }

.gauge-card { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.gauge-card .gauge-title { font-size: 12px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.3px; display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.gauge-card .gauge-canvas-wrap { width: 120px; height: 120px; position: relative; }
.gauge-card .gauge-status { font-size: 12.5px; font-weight: 700; }
.gauge-card .gauge-status.status-good { color: var(--status-ok); }
.gauge-card .gauge-status.status-fair { color: var(--status-warning); }
.gauge-card .gauge-status.status-low { color: var(--status-critical); }
/* Temperature card: filled area curve — wide/short, not a square dial */
.gauge-card.gauge-card-curve { justify-content: flex-start; }
.gauge-card .curve-canvas-wrap { width: 100%; height: 110px; position: relative; }
/* NPK card: horizontal 3-bar comparison — wide/short with room for N/P/K labels */
.gauge-card.gauge-card-bars { justify-content: flex-start; }
.gauge-card .bars-canvas-wrap { width: 100%; height: 110px; position: relative; }

.livestock-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 720px) { .livestock-grid { grid-template-columns: 1fr; } }
.livestock-block { display: flex; flex-direction: column; border-radius: var(--radius-md); background: var(--bg-card-hover); border: 1px solid var(--border-light); overflow: hidden; }
.livestock-block .livestock-photo { width: 100%; height: 90px; object-fit: cover; display: block; }
.livestock-block .livestock-info { display: flex; flex-direction: column; gap: 5px; padding: 10px 12px; }
.livestock-block .livestock-name { font-size: 11px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.3px; }
.livestock-block .livestock-value { font-size: 19px; font-weight: 800; color: var(--navy-900); }
.livestock-block .livestock-unit { font-size: 11.5px; font-weight: 600; color: var(--text-muted); }
.livestock-block .livestock-sub { font-size: 11px; font-weight: 600; color: var(--text-muted); }
.livestock-block .livestock-health { font-size: 11.5px; font-weight: 700; display: flex; align-items: center; gap: 5px; }
.livestock-block .livestock-health.health-good { color: var(--status-ok); }
.livestock-block .livestock-health.health-monitor { color: var(--status-warning); }
.livestock-block .livestock-health.health-attention { color: var(--status-critical); }

.map-thumb-card { position: relative; }
.map-thumb { position: relative; width: 100%; aspect-ratio: 1 / 1.3; background: linear-gradient(180deg, #eef4ff 0%, #e7f6f1 100%); border-radius: var(--radius-md); overflow: hidden; border: 1px solid var(--border-light); }
.map-thumb svg { width: 100%; height: 100%; display: block; }
.map-thumb .zone-live { fill: var(--navy-700); stroke: var(--navy-900); stroke-width: 0.5; }
.map-thumb .zone-live.has-alert { fill: var(--status-critical); }
.map-thumb .zone-dim { fill: var(--border-medium); stroke: #fff; stroke-width: 0.5; }
.map-legend { display: flex; flex-wrap: wrap; gap: 10px 16px; margin-top: 12px; font-size: 11.5px; color: var(--text-secondary); }
.map-legend span { display: inline-flex; align-items: center; gap: 6px; }
.map-legend i.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }

.alert-feed { display: flex; flex-direction: column; gap: 2px; }
.alert-row { display: flex; align-items: flex-start; gap: 12px; padding: 10px 4px; border-bottom: 1px solid var(--border-light); }
.alert-row:last-child { border-bottom: none; }
.alert-row .alert-icon { width: 30px; height: 30px; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 13px; }
.alert-row .alert-icon.sev-critical { background: var(--status-critical-bg); color: var(--status-critical); }
.alert-row .alert-icon.sev-warning { background: var(--status-warning-bg); color: var(--status-warning); }
.alert-row .alert-icon.sev-info { background: var(--status-info-bg); color: var(--status-info); }
.alert-row .alert-icon.sev-success { background: var(--status-ok-bg); color: var(--status-ok); }
.alert-row .alert-body { flex: 1; min-width: 0; }
.alert-row .alert-msg { font-size: 13px; color: var(--text-primary); font-weight: 600; line-height: 1.35; }
.alert-row .alert-msg .alert-zone { color: var(--text-muted); font-weight: 500; }
.alert-row .alert-time { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

.overview-brand-logo { height: 26px; width: auto; display: block; }
