/* =============================================
   AgriFlood Dashboard - Main Stylesheet
   ============================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --nav-bg: #0d2b1d;
  --nav-hover: rgba(255,255,255,0.08);
  --nav-active: rgba(34,197,94,0.18);
  --nav-active-text: #86efac;
  --green: #166534;
  --green-mid: #16a34a;
  --green-light: #dcfce7;
  --green-pale: #f0fdf4;
  --teal: #0f766e;
  --teal-light: #ccfbf1;
  --blue: #1d4ed8;
  --blue-light: #dbeafe;
  --amber: #92400e;
  --amber-light: #fef3c7;
  --red: #991b1b;
  --red-light: #fee2e2;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-400: #94a3b8;
  --gray-600: #475569;
  --gray-800: #1e293b;
  --white: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --card-bg: #ffffff;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,.08), 0 2px 4px -1px rgba(0,0,0,.05);
}

html, body { height: 100%; font-family: 'DM Sans', sans-serif; background: var(--gray-50); color: var(--text); font-size: 14px; line-height: 1.5; }
body { position: relative; }


/* ── Layout ── */
.layout  { display: flex; height: 100vh; overflow: hidden; }
.sidebar { width: 228px; min-width: 228px; background: var(--nav-bg); display: flex; flex-direction: column; overflow-y: auto; }
.main    { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.content { flex: 1; overflow-y: auto; padding: 24px; background: var(--gray-50); }



/* ── Sidebar ── */
.brand { padding: 20px 18px 16px; border-bottom: 1px solid rgba(255,255,255,.08); }
.brand-icon { width: 38px; height: 38px; background: var(--green-mid); border-radius: 9px; display: flex; align-items: center; justify-content: center; margin-bottom: 10px; }
.brand-name  { color: #fff; font-weight: 600; font-size: 15px; letter-spacing: -.3px; line-height: 1.2; }
.brand-sub   { color: rgba(255,255,255,.4); font-size: 11px; margin-top: 2px; }

.nav { flex: 1; padding: 8px 0; }
.nav-section  { padding: 12px 12px 4px; }
.nav-label    { color: rgba(255,255,255,.3); font-size: 10px; font-weight: 500; letter-spacing: .8px; text-transform: uppercase; padding: 0 6px; margin-bottom: 4px; }
.nav-item     { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; color: rgba(255,255,255,.6); font-size: 13px; text-decoration: none; transition: all .15s; margin-bottom: 1px; }
.nav-item:hover  { background: var(--nav-hover); color: rgba(255,255,255,.9); }
.nav-item.active { background: var(--nav-active); color: var(--nav-active-text); font-weight: 500; }
.nav-item svg    { width: 16px; height: 16px; flex-shrink: 0; opacity: .7; }
.nav-item.active svg { opacity: 1; }

.sidebar-footer  { margin-top: auto; padding: 14px; border-top: 1px solid rgba(255,255,255,.08); }
.live-badge      { display: flex; align-items: center; gap: 6px; padding: 8px 10px; background: rgba(34,197,94,.1); border-radius: 8px; color: #86efac; font-size: 11px; margin-bottom: 6px; }
.live-dot        { width: 6px; height: 6px; background: #22c55e; border-radius: 50%; flex-shrink: 0; animation: pulse 2s infinite; }
.sidebar-version { font-size: 10px; color: rgba(255,255,255,.2); text-align: center; }

@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.35} }

/* ── Topbar ── */
.topbar { background: var(--white); border-bottom: 1px solid var(--border); padding: 0 24px; height: 60px; display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; box-shadow: var(--shadow); }
.topbar-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.page-title { font-weight: 600; font-size: 16px; color: var(--text); }
.page-sub   { font-size: 12px; color: var(--muted); margin-top: 1px; }
.topbar-right { display: flex; align-items: center; gap: 12px; }

/* ── Mobile menu toggle (hidden on desktop) ── */
.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--white);
  color: var(--text);
  cursor: pointer;
}
.menu-toggle svg { width: 18px; height: 18px; }
.menu-toggle:hover { background: var(--gray-50); }

/* ── Off-canvas sidebar backdrop (hidden on desktop) ── */
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,.5);
  z-index: 1000;
}
.location-badge { display: flex; align-items: center; gap: 5px; padding: 5px 11px; background: var(--green-pale); border: 1px solid #bbf7d0; border-radius: 20px; font-size: 12px; color: var(--green); font-weight: 500; }
.date-badge { font-size: 12px; color: var(--muted); font-family: 'DM Mono', monospace; }

/* ── Cards ── */
.card { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.card-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 16px; }
.card-title { font-size: 13px; font-weight: 600; color: var(--text); letter-spacing: -.1px; }
.card-sub   { font-size: 11px; color: var(--muted); margin-top: 2px; }

/* ── Stat Cards ── */
.stats-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; margin-bottom: 24px; }
.stat-card  { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.stat-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; border-radius: var(--radius) var(--radius) 0 0; }
.stat-card.green::before { background: linear-gradient(90deg,#16a34a,#22c55e); }
.stat-card.blue::before  { background: linear-gradient(90deg,#1d4ed8,#3b82f6); }
.stat-card.amber::before { background: linear-gradient(90deg,#d97706,#f59e0b); }
.stat-card.red::before   { background: linear-gradient(90deg,#dc2626,#ef4444); }
.stat-label { font-size: 11px; font-weight: 500; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 6px; }
.stat-value { font-size: 26px; font-weight: 600; color: var(--text); line-height: 1; letter-spacing: -1px; font-family: 'DM Mono', monospace; }
.stat-sub   { font-size: 11px; color: var(--muted); margin-top: 5px; }
.stat-trend { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; font-weight: 500; padding: 2px 7px; border-radius: 20px; margin-top: 4px; }
.stat-trend.up   { background: var(--green-light); color: #15803d; }
.stat-trend.down { background: var(--red-light);   color: #dc2626; }
.stat-trend.info { background: var(--blue-light);  color: #1e40af; }

/* ── Grid Layouts ── */
.grid-2   { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.grid-3   { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.grid-2-1 { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; margin-bottom: 20px; }
.grid-1-2 { display: grid; grid-template-columns: 1fr 2fr; gap: 20px; margin-bottom: 20px; }
.mb20 { margin-bottom: 20px; }
.chart-wrap { position: relative; width: 100%; }
.agri-overview { background:linear-gradient(135deg,#f0fdf4,#eff6ff); border:1px solid #bbf7d0; border-radius:14px; padding:22px; box-shadow:var(--shadow); }
.agri-overview-copy h2 { margin:5px 0 7px; color:var(--text); font-size:21px; letter-spacing:-.35px; }
.agri-overview-copy p { margin:0; max-width:850px; color:var(--gray-600); font-size:12px; line-height:1.65; }
.integration-flow { display:grid; grid-template-columns:1fr auto 1fr auto 1fr auto 1fr; align-items:stretch; gap:10px; margin-top:18px; }
.flow-step { display:flex; min-width:0; flex-direction:column; padding:13px; border:1px solid var(--border); border-radius:10px; background:#fff; color:var(--text); text-decoration:none; transition:.15s ease; }
.flow-step:hover { transform:translateY(-2px); box-shadow:var(--shadow-md); }
.flow-step span { width:24px; height:24px; display:grid; place-items:center; margin-bottom:8px; border-radius:50%; color:#fff; font:700 11px 'DM Mono',monospace; }
.flow-step strong { font-size:12px; }
.flow-step small { margin-top:3px; color:var(--muted); font-size:10px; line-height:1.4; }
.flow-step.blue span{background:#2563eb}.flow-step.red span{background:#dc2626}.flow-step.amber span{background:#d97706}.flow-step.green span{background:#16803b}
.flow-arrow { align-self:center; color:#94a3b8; font-size:20px; }
.source-chip { display:inline-flex; margin-top:8px; padding:3px 7px; border-radius:20px; background:var(--gray-100); color:var(--gray-600); font-size:9px; font-weight:600; }
.stat-value.stat-text { padding-top:2px; font:700 19px/1.15 'DM Sans',sans-serif; letter-spacing:-.3px; }
.chart-explainer { margin-top:12px; padding:9px 11px; border-radius:8px; background:var(--gray-50); color:var(--gray-600); font-size:10.5px; line-height:1.55; }
.chart-explainer strong { color:var(--text); }
.decision-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:12px; }
.decision-grid>div { padding:13px; border:1px solid var(--border); border-radius:9px; background:var(--gray-50); }
.decision-grid strong { color:var(--green); font-size:12px; }
.decision-grid p { margin:5px 0 0; color:var(--gray-600); font-size:11px; line-height:1.55; }

/* ── Badges ── */
.badge { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 20px; font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .4px; }
.badge-high   { background: var(--red-light);   color: #dc2626; }
.badge-medium { background: var(--amber-light);  color: #d97706; }
.badge-low    { background: var(--green-light);  color: #15803d; }
.badge-info   { background: var(--blue-light);   color: #1e40af; }

/* ── Tables ── */
.data-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.data-table th { padding: 10px 14px; text-align: left; font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; border-bottom: 2px solid var(--border); white-space: nowrap; }
.data-table td { padding: 11px 14px; border-bottom: 1px solid var(--gray-100); color: var(--text); vertical-align: middle; }
.data-table tr:hover td { background: var(--gray-50); }
.data-table tr:last-child td { border-bottom: none; }
.mono { font-family: 'DM Mono', monospace; }

/* ── Progress Bars ── */
.progress-row   { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.progress-label { font-size: 12px; color: var(--text); min-width: 130px; flex-shrink: 0; }
.progress-bg    { flex: 1; height: 7px; background: var(--gray-200); border-radius: 4px; overflow: hidden; }
.progress-fill  { height: 100%; border-radius: 4px; }
.progress-val   { font-size: 11px; font-weight: 600; font-family: 'DM Mono', monospace; min-width: 44px; text-align: right; color: var(--muted); }

/* ── Municipality Risk Cards ── */
.muni-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; margin-bottom: 24px; }
.muni-card { border-radius: 8px; padding: 14px; cursor: pointer; transition: all .15s; border: 1.5px solid transparent; }
.muni-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.muni-card.high   { background: #fff1f2; border-color: #fca5a5; }
.muni-card.medium { background: #fffbeb; border-color: #fcd34d; }
.muni-card.low    { background: #f0fdf4; border-color: #86efac; }
.muni-name  { font-size: 12px; font-weight: 600; color: var(--text); margin-bottom: 6px; display: flex; justify-content: space-between; align-items: center; }
.risk-bar-wrap { height: 5px; background: var(--gray-200); border-radius: 3px; overflow: hidden; margin-bottom: 6px; }
.risk-bar-fill { height: 100%; border-radius: 3px; }
.muni-stats  { display: flex; justify-content: space-between; font-size: 10px; color: var(--muted); }

/* ── Filter Bar ── */
.filter-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.filter-btn { padding: 6px 14px; border-radius: 20px; font-size: 12px; font-weight: 500; cursor: pointer; border: 1px solid var(--border); background: var(--white); color: var(--muted); font-family: 'DM Sans', sans-serif; transition: all .15s; }
.filter-btn.active  { background: var(--green); border-color: var(--green); color: #fff; }
.filter-btn:hover:not(.active) { background: var(--gray-100); color: var(--text); }
.scope-switch { display:flex; align-items:center; justify-content:space-between; gap:18px; margin-bottom:18px; padding:13px 15px; border:1px solid var(--border); border-radius:10px; background:#fff; }
.scope-switch strong { display:block; color:var(--text); font-size:12px; }
.scope-switch span { display:block; margin-top:3px; color:var(--muted); font-size:10.5px; line-height:1.45; }

/* ── Awareness Cards ── */
.awareness-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; margin-bottom: 20px; }
.a-card { border-radius: var(--radius); padding: 18px; border: 1px solid var(--border); }
.a-card.danger  { background: linear-gradient(135deg,#fff1f2,#ffe4e6); border-color: #fca5a5; }
.a-card.warning { background: linear-gradient(135deg,#fffbeb,#fef9c3); border-color: #fde047; }
.a-card.success { background: linear-gradient(135deg,#f0fdf4,#dcfce7); border-color: #86efac; }
.a-icon  { font-size: 24px; margin-bottom: 10px; }
.a-title { font-size: 13px; font-weight: 700; margin-bottom: 8px; }
.a-text  { font-size: 12px; color: var(--gray-600); line-height: 1.6; }
.a-list  { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.a-item  { display: flex; align-items: flex-start; gap: 7px; font-size: 12px; color: var(--gray-600); line-height: 1.5; }
.a-dot   { width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0; margin-top: 5px; }

/* ── ML Metrics ── */
.metrics-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; margin-bottom: 20px; }
.metric-card  { background: var(--gray-50); border: 1px solid var(--border); border-radius: 8px; padding: 14px; text-align: center; }
.metric-name  { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 6px; }
.metric-val   { font-size: 22px; font-weight: 700; font-family: 'DM Mono', monospace; letter-spacing: -.5px; line-height: 1.1; }
.metric-val.good { color: var(--green); }
.metric-val.ok   { color: #d97706; }
.metric-model    { font-size: 11px; color: var(--muted); margin-top: 3px; }

/* ── Confusion Matrix ── */
.conf-matrix { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; width: 170px; }
.conf-cell   { border-radius: 6px; padding: 12px 8px; text-align: center; }
.conf-cell .big { font-size: 22px; font-weight: 700; font-family: 'DM Mono', monospace; line-height: 1; }
.conf-cell .lbl { font-size: 10px; margin-top: 3px; }
.confusion-model-row { display:grid; grid-template-columns:repeat(3,minmax(180px,1fr)); gap:24px; align-items:start; }
.confusion-model-panel { padding:14px; border:1px solid var(--border); border-radius:10px; background:var(--gray-50); }
.confusion-model-title { color:var(--text); font-size:12px; font-weight:700; text-align:center; }
.confusion-model-score { margin:4px 0 10px; color:var(--muted); font-size:10px; text-align:center; }
.confusion-model-panel .conf-matrix { width:100%; min-width:0; }
.conf-correct { background:#1e40af; color:#fff; }
.conf-correct .lbl { color:rgba(255,255,255,.75); }
.conf-error { background:#dbeafe; color:#1e40af; }
.conf-error .lbl { color:#1e40af; }
.validation-matrix-wrap.matrix-only { justify-content:center; }
.conf-matrix.large { width:min(100%,260px); }

/* ── Simulator ── */
.sim-grid   { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label { font-size: 12px; font-weight: 500; color: var(--gray-600); }
.form-select, .form-input {
  padding: 9px 12px; border: 1px solid var(--border); border-radius: 8px;
  font-size: 13px; font-family: 'DM Sans', sans-serif; color: var(--text);
  background: var(--white); outline: none; transition: border-color .15s;
}
.form-select:focus, .form-input:focus { border-color: var(--green-mid); box-shadow: 0 0 0 3px rgba(34,197,94,.1); }
.sim-btn {
  width: 100%; padding: 11px; background: var(--green); color: #fff;
  border: none; border-radius: 8px; font-size: 13px; font-weight: 600;
  cursor: pointer; font-family: 'DM Sans', sans-serif; transition: all .15s;
}
.sim-btn:hover { background: #166534; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.sim-results { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.sim-result  { padding: 14px; border-radius: 8px; border: 1px solid var(--border); }
.sim-result.agri  { background: var(--green-pale); border-color: #bbf7d0; }
.sim-result.total { background: var(--blue-light);  border-color: #bfdbfe; }
.sim-result-label { font-size: 11px; font-weight: 500; color: var(--muted); margin-bottom: 4px; }
.sim-result-value { font-size: 20px; font-weight: 700; font-family: 'DM Mono', monospace; }
.sim-result.agri  .sim-result-value { color: var(--green); }
.sim-result.total .sim-result-value { color: var(--blue); }
.risk-level-row { display: flex; align-items: center; gap: 10px; margin-top: 12px; font-size: 12px; color: var(--muted); }
.scenario-result {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding: 18px; border: 1px solid var(--border); border-radius: 12px;
}
.scenario-result.is-low { background: #f0fdf4; border-color: #86efac; }
.scenario-result.is-high { background: #fff1f2; border-color: #fda4af; }
.scenario-kicker { color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .7px; text-transform: uppercase; }
.scenario-label { margin-top: 5px; color: var(--text); font-size: 23px; font-weight: 750; }
.scenario-flag { margin-top: 5px; color: var(--muted); font-size: 12px; }
.scenario-probability { min-width: 130px; text-align: right; }
.scenario-probability strong { display: block; color: var(--red); font: 700 30px/1 'DM Mono', monospace; }
.scenario-probability span { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; text-transform: uppercase; }
.scenario-empty {
  display: flex; min-height: 170px; flex-direction: column; align-items: center; justify-content: center;
  gap: 7px; padding: 24px; border: 1px dashed var(--border); border-radius: 12px;
  color: var(--muted); text-align: center;
}
.scenario-empty strong { color: var(--text); font-size: 18px; }
.scenario-warning, .scenario-note { margin-top: 14px; padding: 11px 13px; border-radius: 8px; font-size: 12px; line-height: 1.55; }
.scenario-warning { color: #92400e; background: #fffbeb; border: 1px solid #fde68a; }
.scenario-note { color: #166534; background: #f0fdf4; border: 1px solid #bbf7d0; }

/* ── Reports ── */
.report-item { display: flex; align-items: center; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--gray-100); }
.report-item:last-child { border-bottom: none; }
.report-icon { width: 38px; height: 38px; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-size: 17px; flex-shrink: 0; }
.report-title { font-size: 13px; font-weight: 600; color: var(--text); }
.report-sub   { font-size: 11px; color: var(--muted); margin-top: 2px; }
.report-btn   { margin-left: auto; padding: 7px 14px; border-radius: 6px; font-size: 11px; font-weight: 600; cursor: pointer; border: none; background: var(--green-light); color: var(--green); text-decoration: none; white-space: nowrap; transition: all .15s; display: inline-flex; align-items: center; gap: 5px; font-family: 'DM Sans', sans-serif; }
.report-btn:hover { background: var(--green); color: #fff; }

/* ── Heatmap ── */
.heatmap-wrap { font-size: 10px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.heatmap-grid { display: grid; grid-template-columns: 38px repeat(12,1fr); gap: 2px; }
.hm-header { text-align: center; color: var(--muted); padding: 2px 0; font-size: 10px; }
.hm-year { color: var(--muted); font-family: 'DM Mono', monospace; font-size: 10px; display: flex; align-items: center; }
.hm-cell { border-radius: 3px; padding: 4px 1px; text-align: center; cursor: default; font-family: 'DM Mono', monospace; font-size: 9px; transition: transform .1s; }
.hm-cell:hover { transform: scale(1.1); }

/* ── ML Tabs ── */
.ml-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--border); margin-bottom: 20px; background: var(--white); padding: 0 20px; border-radius: var(--radius) var(--radius) 0 0; }
.ml-tab  { padding: 11px 16px; font-size: 13px; font-weight: 500; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; transition: all .15s; white-space: nowrap; border: none; background: none; font-family: 'DM Sans', sans-serif; }
.ml-tab:hover  { color: var(--text); }
.ml-tab.active { color: var(--green); border-bottom-color: var(--green-mid); font-weight: 600; }
.ml-panel { display: none; }
.ml-panel.active { display: block; }

/* Analytics explanations and progressive detail */
.insight-banner { margin-bottom: 20px; padding: 13px 15px; border: 1px solid #bfdbfe; border-left: 4px solid #2563eb; border-radius: 9px; background: #eff6ff; color: var(--gray-600); font-size: 12px; line-height: 1.65; }
.insight-banner strong { color: var(--text); }
.insight-banner.warning { background: #fff7ed; border-color: #fed7aa; border-left-color: #d97706; }
.details-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.details-card summary { cursor: pointer; padding: 14px 18px; color: var(--text); font-size: 12px; font-weight: 600; list-style-position: inside; }
.details-card summary:hover { background: var(--gray-50); }
.details-content { padding: 0 18px 16px; color: var(--gray-600); font-size: 12px; line-height: 1.7; }
.mini-stat-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; margin-bottom: 12px; }
.mini-stat-grid > div { padding: 11px; border-radius: 8px; background: var(--gray-50); border: 1px solid var(--border); }
.mini-stat-grid span { display: block; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .4px; }
.mini-stat-grid strong { display: block; margin-top: 4px; color: var(--text); font-family: 'DM Mono', monospace; }
.table-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.table-search { width: 190px; padding: 7px 10px; border: 1px solid var(--border); border-radius: 8px; font: 12px 'DM Sans', sans-serif; color: var(--text); background: var(--white); outline: none; }
.table-search:focus { border-color: var(--green-mid); box-shadow: 0 0 0 3px rgba(34,197,94,.1); }
.filter-bar.compact { margin: 0; gap: 5px; }
.filter-bar.compact .filter-btn { padding: 5px 10px; font-size: 11px; text-decoration: none; }
.table-scroll { width: 100%; overflow-x: auto; }
.table-footnote { padding-top: 11px; margin-top: 8px; border-top: 1px solid var(--gray-100); color: var(--muted); font-size: 10px; line-height: 1.5; }
.cell-note { margin-top: 2px; color: var(--muted); font-size: 10px; font-weight: 400; }
.metrics-grid-4 { grid-template-columns: repeat(4,1fr); }
.compact-metrics .metric-card { padding: 11px; }
.compact-metrics .metric-val { font-size: 18px; }
.matrix-grid { display: grid; grid-template-columns: repeat(3,minmax(170px,1fr)) minmax(220px,1.3fr); gap: 18px; align-items: start; }
.matrix-panel { padding: 12px; border: 1px solid var(--border); border-radius: 9px; background: var(--gray-50); }
.matrix-title { margin-bottom: 9px; color: var(--text); font-size: 11px; font-weight: 600; text-align: center; }
.matrix-panel .conf-matrix { width: 100%; }
.true-cell { background: #14532d; color: #fff; }
.true-cell .lbl { color: rgba(255,255,255,.75); }
.false-cell { background: #fee2e2; color: #991b1b; }
.false-cell .lbl { color: #991b1b; }
.explain-card { padding: 15px; border: 1px solid #bbf7d0; border-radius: 9px; background: #f0fdf4; color: var(--gray-600); font-size: 12px; line-height: 1.6; }
.explain-card strong { color: var(--text); }
.explain-card p { margin: 6px 0 10px; }
.method-tag { display: inline-flex; padding: 4px 8px; border-radius: 20px; background: var(--blue-light); color: #1e40af; font-size: 10px; font-weight: 600; }
.validation-matrix-wrap { display: flex; gap: 20px; align-items: center; }
.conf-matrix.large { width: 220px; flex: 0 0 220px; }
.validation-copy { color: var(--gray-600); font-size: 12px; line-height: 1.65; }
.validation-copy strong { color: var(--text); }
.validation-copy p { margin-top: 5px; }
.parameter-list { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.parameter-list > div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--gray-50); font-size: 11px; }
.parameter-list span { color: var(--muted); }
.parameter-list strong { color: var(--text); font-family: 'DM Mono', monospace; }
.method-note { margin-top: 11px; padding: 10px 12px; border-radius: 8px; background: #ecfdf5; color: #166534; font-size: 11px; line-height: 1.55; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 28px 0 14px; }
.section-heading h3 { margin: 2px 0; color: var(--text); font-size: 17px; }
.section-heading p { color: var(--muted); font-size: 11px; }
.eyebrow { color: var(--green); font-size: 10px; font-weight: 700; letter-spacing: .7px; text-transform: uppercase; }
.action-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; }
.action-card { padding: 13px; border: 1px solid var(--border); border-radius: 9px; font-size: 12px; line-height: 1.6; color: var(--gray-600); }
.action-card strong { color: var(--text); }
.action-card p { margin-top: 5px; }
.action-card.green { background: #f0fdf4; border-color: #bbf7d0; }
.action-card.amber { background: #fffbeb; border-color: #fde68a; }
.action-card.blue { background: #eff6ff; border-color: #bfdbfe; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--gray-200); border-radius: 10px; }

/* ── Off-canvas sidebar drawer (mobile) ── */
@media (max-width: 900px) {
  .menu-toggle { display: inline-flex; }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1001;
    height: 100%;
    transform: translateX(-100%);
    transition: transform .25s ease;
    box-shadow: none;
  }
  .sidebar.is-open {
    transform: translateX(0);
    box-shadow: 0 0 32px rgba(0,0,0,.35);
  }

  .sidebar-backdrop {
    display: block;
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s ease, visibility 0s linear .2s;
  }
  .sidebar-backdrop.is-open {
    opacity: 1;
    visibility: visible;
    transition: opacity .2s ease;
  }

  body.sidebar-drawer-open { overflow: hidden; }
}

/* ── Responsive ── */
@media (max-width: 1100px) {
  .stats-grid { grid-template-columns: repeat(2,1fr); }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .muni-grid { grid-template-columns: repeat(2,1fr); }
  .awareness-grid { grid-template-columns: 1fr 1fr; }
  .metrics-grid-4, .mini-stat-grid { grid-template-columns: repeat(2,1fr); }
  .integration-flow { grid-template-columns:1fr 1fr; }
  .flow-arrow { display:none; }
  .decision-grid { grid-template-columns:1fr 1fr; }
  .scope-switch { align-items:flex-start; flex-direction:column; }
  .matrix-grid { grid-template-columns: repeat(2,1fr); }
  .confusion-model-row { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 780px) {
  .sidebar { width: 200px; min-width: 200px; }
  .sim-grid { grid-template-columns: 1fr; }
  .grid-2, .grid-2-1, .grid-1-2 { grid-template-columns: 1fr; }
  .muni-grid { grid-template-columns: 1fr; }
  .metrics-grid, .metrics-grid-4, .mini-stat-grid, .matrix-grid, .action-grid, .confusion-model-row { grid-template-columns: 1fr; }
  .responsive-header, .section-heading { flex-direction: column; align-items: stretch; }
  .table-tools { align-items: stretch; flex-direction: column; }
  .table-search { width: 100%; }
  .validation-matrix-wrap { align-items: flex-start; flex-direction: column; }
  .scenario-result { align-items: flex-start; flex-direction: column; }
  .scenario-probability { text-align: left; }
  .heatmap-grid { min-width: 640px; }
}

.insights-kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 24px; }
.insights-audience-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 24px; }
.insights-checklist-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 24px; }
.insights-pipeline-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; padding: 8px 0; }
.insights-recommend-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 20px; }
@media (max-width: 1100px) {
  .insights-kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .insights-audience-grid, .insights-checklist-grid, .insights-recommend-grid { grid-template-columns: 1fr; }
  .insights-pipeline-grid { grid-template-columns: 1fr; gap: 18px; }
  .insights-pipeline-connector { display: none; }
}
@media (max-width: 780px) {
  .insights-kpi-grid { grid-template-columns: 1fr; }
}
@media (hover: none) and (pointer: coarse) {
  .report-btn { min-height: 44px; padding: 11px 16px; }
}

/* ── Insights page highlight ── */
.nav-item.insights-active {
  background: rgba(34,197,94,0.22);
  color: #86efac;
  font-weight: 500;
  box-shadow: inset 2px 0 0 #22c55e;
}

/* ── Mission banner responsive ── */
@media (max-width: 900px) {
  .awareness-grid { grid-template-columns: 1fr; }
}

/* ── Pipeline steps ── */
.pipeline-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 10px;
  position: relative;
}

/* Authentication */
.auth-page { min-height: 100vh; margin: 0; display: grid; place-items: center; padding: 24px; background: #071510; color: #e8f5ee; font-family: "DM Sans", Arial, sans-serif; }
.auth-card { width: min(420px, 100%); padding: 32px; border: 1px solid rgba(134,239,172,.2); border-radius: 18px; background: #0d2119; box-shadow: 0 24px 70px rgba(0,0,0,.35); }
.auth-logo { width: 72px; height: 72px; object-fit: contain; }
.auth-card h1 { margin: 12px 0 6px; font-size: 25px; }
.auth-card p { color: #a7c7b7; }
.auth-card form { display: grid; gap: 16px; margin: 24px 0; }
.auth-card label { display: grid; gap: 7px; color: #cce5d7; font-size: 14px; }
.auth-card input { box-sizing: border-box; width: 100%; padding: 12px 14px; border: 1px solid #2b5542; border-radius: 9px; background: #081812; color: #fff; }
.auth-card button { padding: 12px 16px; border: 0; border-radius: 9px; background: #22c55e; color: #04140a; font-weight: 700; cursor: pointer; }
.auth-card a { color: #86efac; }
.auth-error, .auth-success { margin-top: 16px; padding: 12px; border-radius: 8px; }
.auth-error { background: rgba(239,68,68,.14); color: #fecaca; }
.auth-success { background: rgba(34,197,94,.14); color: #bbf7d0; }

/* Import and AutoML technical workspace */
.automl-notice { display:flex; justify-content:space-between; gap:24px; align-items:flex-start; padding:24px; border:1px solid rgba(34,197,94,.28); border-radius:14px; background:linear-gradient(135deg,rgba(34,197,94,.10),rgba(14,165,233,.05)); }
.automl-notice h2 { margin:5px 0 8px; }
.automl-notice p { max-width:760px; margin:0; color:var(--text-muted,#64748b); line-height:1.6; }
.eyebrow { color:#16a34a; font-size:11px; font-weight:700; letter-spacing:.12em; }
.status-pill { flex:none; padding:8px 12px; border-radius:999px; font-size:12px; font-weight:700; }
.status-pill.ready { color:#166534; background:#dcfce7; }
.status-pill.attention { color:#92400e; background:#fef3c7; }
.readiness-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:16px; margin-top:18px; }
.readiness-card,.pipeline-roadmap { padding:20px; border:1px solid var(--border,#e2e8f0); border-radius:12px; background:var(--card-bg,#fff); }
.readiness-card h3 { margin:12px 0 6px; }
.readiness-card p { margin:0; color:var(--text-muted,#64748b); line-height:1.5; }
.readiness-card small { display:block; margin-top:10px; color:#b45309; }
.readiness-icon { display:grid; place-items:center; width:38px; height:38px; border-radius:9px; background:#dcfce7; color:#166534; font:700 12px "DM Mono",monospace; }
.pipeline-roadmap { margin-top:18px; }
.pipeline-roadmap h3 { margin-top:0; }
.roadmap-list { display:grid; grid-template-columns:repeat(9,minmax(90px,1fr)); gap:8px; overflow-x:auto; }
.roadmap-item { min-width:90px; padding:12px 8px; border-radius:9px; background:#f1f5f9; color:#64748b; text-align:center; font-size:12px; }
.roadmap-item b { display:grid; place-items:center; width:24px; height:24px; margin:0 auto 7px; border-radius:50%; background:#cbd5e1; color:#fff; }
.roadmap-item.current { color:#166534; background:#dcfce7; }
.roadmap-item.current b { background:#22c55e; }
@media (max-width:900px){.readiness-grid{grid-template-columns:1fr}.automl-notice{flex-direction:column}}

/* Verified Model Performance and Scenario Simulator layouts */
.page-mlmodels .confusion-model-row { grid-template-columns: repeat(3, minmax(190px, 1fr)); gap: 18px; }
.page-mlmodels .confusion-model-panel { padding: 16px; }
.page-mlmodels .confusion-model-title { text-align: center; font-weight: 700; }
.page-mlmodels .confusion-model-score { min-height: 15px; text-align: center; }
.page-mlmodels .confusion-model-panel .conf-cell { min-height: 82px; display: grid; place-content: center; }
.page-mlmodels .validation-matrix-wrap.matrix-only { min-height: 230px; }
.page-simulator .insight-banner { margin-bottom: 20px; }
.page-simulator .grid-1-2 { align-items: stretch; }
.page-simulator .grid-1-2 > .card { height: 100%; }
.page-simulator .scenario-empty { min-height: 170px; }
.page-simulator .parameter-list > div { align-items: center; min-height: 39px; }
@media (max-width: 1000px) { .page-mlmodels .confusion-model-row { grid-template-columns: 1fr; } }

/* Step 2: secure source dataset import */
.import-layout { display:grid; grid-template-columns:minmax(0,1.35fr) minmax(280px,.65fr); gap:20px; margin:20px 0; }
.import-form { display:grid; gap:16px; }
.upload-dropzone { display:grid; place-items:center; min-height:150px; padding:24px; border:2px dashed #86efac; border-radius:12px; background:#f0fdf4; color:#166534; cursor:pointer; text-align:center; }
.upload-dropzone:hover { border-color:#16a34a; background:#dcfce7; }
.upload-dropzone strong { font-size:15px; }.upload-dropzone span { margin-top:7px; color:#4b715e; font-size:12px; }.upload-dropzone input { position:absolute; width:1px; height:1px; opacity:0; }
.selected-file { padding:9px 12px; border-radius:8px; background:var(--gray-50); color:var(--muted); font:11px 'DM Mono',monospace; }
.check-list { display:grid; gap:12px; margin:0; padding:0; list-style:none; }.check-list li { position:relative; padding-left:24px; color:var(--gray-600); font-size:12px; line-height:1.5; }.check-list li::before { content:'✓'; position:absolute; left:0; top:0; display:grid; place-items:center; width:17px; height:17px; border-radius:50%; background:#dcfce7; color:#15803d; font-weight:800; }
.import-alert { display:flex; gap:12px; align-items:center; margin-top:18px; padding:13px 15px; border-radius:9px; font-size:12px; }.import-alert strong { flex:none; }.import-alert.error { border:1px solid #fecaca; background:#fff1f2; color:#991b1b; }.import-alert.success { border:1px solid #bbf7d0; background:#f0fdf4; color:#166534; }
.validation-findings { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; }.validation-findings > div { padding:11px 13px; border:1px solid #fde68a; border-radius:8px; background:#fffbeb; color:#92400e; font-size:11px; line-height:1.5; }
.type-badge,.import-status { display:inline-flex; padding:4px 8px; border-radius:999px; font-size:10px; font-weight:700; text-transform:capitalize; }.type-badge { background:#e0f2fe; color:#075985; }.import-status.validated,.import-status.completed { background:#dcfce7; color:#166534; }.import-status.failed { background:#fee2e2; color:#991b1b; }.import-status.uploaded,.import-status.validating,.import-status.processing { background:#fef3c7; color:#92400e; }
.import-preview { min-width:max-content; }.import-preview td { max-width:240px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
@media(max-width:900px){.import-layout{grid-template-columns:1fr}.validation-findings{grid-template-columns:1fr}}

/* Step 3: automated cleaning and processed table views */
.clean-action { display:flex; align-items:center; justify-content:space-between; gap:20px; padding:18px 20px; border:1px solid #86efac; border-radius:12px; background:#f0fdf4; }.clean-action div { display:grid; gap:4px; }.clean-action strong { color:#166534; }.clean-action span { color:#4b715e; font-size:12px; }.clean-action .sim-btn { width:auto; min-width:230px; }
.transformation-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; }.transformation-grid>div { display:flex; justify-content:space-between; gap:12px; padding:12px; border:1px solid var(--border); border-radius:8px; background:var(--gray-50); font-size:11px; }.transformation-grid span { color:var(--muted); }.transformation-grid strong { color:var(--green); font-family:'DM Mono',monospace; }
.type-badge.cleaned { background:#dcfce7; color:#166534; }.table-note { margin-top:4px; color:var(--muted); font-size:10px; }.table-action { display:inline-flex; padding:6px 10px; border:1px solid #86efac; border-radius:7px; background:#f0fdf4; color:#166534; font:600 10px 'DM Sans',sans-serif; text-decoration:none; white-space:nowrap; }.table-action.button { cursor:pointer; }.table-action:hover { background:#dcfce7; }
.import-row-actions { display:flex; align-items:flex-start; gap:7px; flex-wrap:wrap; min-width:190px; }.import-row-actions form { margin:0; }.import-row-actions .table-note { align-self:center; margin:0; white-space:nowrap; }
.protected-delete-control { width:100%; }.protected-delete-control summary { cursor:pointer; color:#b91c1c; white-space:nowrap; }.protected-delete-form { display:grid; gap:7px; margin-top:8px !important; min-width:210px; padding:9px; border:1px solid #fecaca; border-radius:8px; background:#fff7f7; }.protected-delete-form label { display:grid; gap:4px; color:#991b1b; font-size:11px; font-weight:700; }.protected-delete-form .form-input { min-width:0; padding:7px 8px; font-size:11px; }.protected-delete-form small { color:#7f1d1d; font-size:10px; line-height:1.35; }
.empty-module-state { display:flex; align-items:center; gap:18px; max-width:760px; margin:34px auto; padding:28px; }.empty-module-state h2 { margin:3px 0 8px; font-size:22px; }.empty-module-state p { margin:0 0 16px; color:var(--muted); }.empty-module-icon { display:grid; place-items:center; flex:0 0 54px; width:54px; height:54px; border:1px solid #86efac; border-radius:16px; background:#f0fdf4; color:#15803d; font-size:30px; font-weight:800; }
@media(max-width:1000px){.transformation-grid{grid-template-columns:repeat(2,1fr)}}@media(max-width:700px){.clean-action{align-items:stretch;flex-direction:column}.clean-action .sim-btn{width:100%}.transformation-grid{grid-template-columns:1fr}}

/* Step 4: Dropbox cloud storage */
.cloud-metrics { margin-top:20px; }.cloud-setup-grid { align-items:stretch; }.cloud-setup-grid>.card { height:100%; }
.storage-architecture { display:grid; grid-template-columns:repeat(3,1fr); gap:14px; margin:20px 0; }.storage-architecture>div { display:grid; grid-template-columns:auto 1fr; column-gap:12px; align-items:center; padding:16px; border:1px solid var(--border); border-radius:12px; background:var(--white); box-shadow:var(--shadow); }.storage-architecture .readiness-icon { grid-row:1/3; }.storage-architecture b { color:var(--text); font-size:12px; }.storage-architecture p { margin:4px 0 0; color:var(--muted); font-size:11px; line-height:1.45; }
.setup-steps { display:grid; gap:12px; margin:0; padding-left:22px; color:var(--gray-600); font-size:12px; line-height:1.55; }.setup-steps strong { color:var(--text); }.setup-steps a { color:var(--blue); }.setup-steps code { display:block; margin-top:6px; padding:9px 11px; border:1px solid var(--border); border-radius:7px; background:var(--gray-50); color:var(--green); font:11px 'DM Mono',monospace; word-break:break-all; }
.cloud-scope-note,.credential-saved,.storage-hint { margin-top:14px; padding:10px 12px; border-radius:8px; background:#eff6ff; color:#1e40af; font-size:11px; line-height:1.5; }.credential-saved { background:#f0fdf4; color:#166534; }.storage-hint { margin-top:-5px; background:#fffbeb; color:#92400e; }.storage-hint a { color:inherit; font-weight:700; }
.cloud-actions-card { display:flex; align-items:center; justify-content:space-between; gap:22px; }.cloud-action-buttons { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }.cloud-button { display:inline-flex; align-items:center; justify-content:center; width:auto; min-width:170px; text-decoration:none; }.table-action.danger { border-color:#fecaca; background:#fff1f2; color:#991b1b; }
.cloud-path { max-width:320px; white-space:normal; word-break:break-word; }.sync-error { max-width:330px; margin-top:5px; color:#b91c1c; font-size:10px; line-height:1.4; }.sync-status,.storage-choice { display:inline-flex; padding:4px 8px; border-radius:999px; font-size:10px; font-weight:700; text-transform:capitalize; white-space:nowrap; }.sync-status.synced,.storage-choice.local_dropbox { background:#dcfce7; color:#166534; }.sync-status.failed { background:#fee2e2; color:#991b1b; }.sync-status.queued,.sync-status.syncing { background:#fef3c7; color:#92400e; }.storage-choice.local { background:#e2e8f0; color:#475569; }
@media(max-width:850px){.storage-architecture{grid-template-columns:1fr}.cloud-actions-card{align-items:stretch;flex-direction:column}.cloud-action-buttons{align-items:stretch;flex-direction:column}.cloud-action-buttons>*{width:100%}.cloud-button{width:100%}}

/* Step 5: automated exploratory data analysis */
.eda-action { border-color:#93c5fd; background:#eff6ff; }
.eda-action strong { color:#1e40af; }
.eda-action span { color:#475569; }
.eda-graph-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
.eda-graph { overflow:hidden; border:1px solid var(--border); border-radius:10px; background:var(--gray-50); }
.eda-graph img { display:block; width:100%; height:360px; object-fit:contain; background:#fff; }
.eda-graph figcaption { padding:10px 13px; border-top:1px solid var(--border); color:var(--text); font-size:11px; font-weight:700; }
.eda-category-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.eda-category { padding:13px; border:1px solid var(--border); border-radius:9px; background:var(--gray-50); }
.eda-category>strong { display:block; margin-bottom:9px; color:var(--text); font:700 11px 'DM Mono',monospace; }
.eda-category>div { display:flex; justify-content:space-between; gap:12px; padding:6px 0; border-top:1px solid var(--gray-200); color:var(--gray-600); font-size:11px; }
.eda-category b { color:var(--green); font-family:'DM Mono',monospace; }
.correlation-list { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:9px; }
.correlation-list>div { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:11px 12px; border:1px solid var(--border); border-radius:8px; background:var(--gray-50); font-size:11px; }
.correlation-list span { overflow:hidden; color:var(--gray-600); text-overflow:ellipsis; white-space:nowrap; }
.correlation-list strong { color:var(--blue); font-family:'DM Mono',monospace; }
.correlation-list strong.strong { color:var(--green); }
.eda-next-step { display:flex; align-items:center; gap:14px; padding:14px 16px; border:1px solid #86efac; border-radius:10px; background:#f0fdf4; }
.eda-next-step strong { flex:none; color:#166534; }
.eda-next-step span { color:#4b715e; font-size:11px; }
@media(max-width:1000px){.eda-category-grid,.correlation-list{grid-template-columns:repeat(2,1fr)}}
@media(max-width:760px){.eda-graph-grid,.eda-category-grid,.correlation-list{grid-template-columns:1fr}.eda-graph img{height:auto}.eda-next-step{align-items:flex-start;flex-direction:column}}

/* Step 6: preprocessing and feature engineering */
.feature-action { display:grid; grid-template-columns:minmax(260px,1fr) minmax(280px,.8fr) 230px; gap:18px; align-items:end; padding:18px 20px; border:1px solid #93c5fd; border-radius:12px; background:#eff6ff; }
.feature-action-copy { display:grid; gap:5px; align-self:center; }.feature-action-copy strong { color:#1e40af; }.feature-action-copy span,.feature-action small { color:#475569; font-size:11px; line-height:1.5; }
.feature-action .sim-btn { width:230px; }
.metric-val.feature-target { overflow:hidden; color:#1d4ed8; font-size:15px; text-overflow:ellipsis; text-transform:capitalize; white-space:nowrap; }
.feature-basis-grid { align-items:stretch; }.feature-basis-grid>.card { height:100%; }
.feature-explanation { padding:14px; border:1px solid #bfdbfe; border-radius:9px; background:#eff6ff; color:#475569; font-size:11px; line-height:1.55; }
.feature-explanation>strong { display:block; margin-bottom:8px; color:#1e40af; font:700 15px 'DM Mono',monospace; }.feature-explanation p { margin:5px 0; }.feature-explanation small { display:block; margin-top:9px; color:#64748b; }
.feature-transform-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }.feature-transform-grid>div { display:grid; gap:5px; padding:12px; border:1px solid var(--border); border-radius:8px; background:var(--gray-50); }.feature-transform-grid strong { color:var(--green); font:700 11px 'DM Mono',monospace; }.feature-transform-grid span { color:var(--muted); font-size:11px; line-height:1.45; }.feature-transform-grid .dropped { border-color:#fde68a; background:#fffbeb; }.feature-transform-grid .dropped strong { color:#92400e; }
.leakage-controls { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin-top:16px; padding-top:16px; border-top:1px solid var(--border); }.leakage-controls>div { padding:9px 11px; border-radius:7px; background:#f0fdf4; color:#166534; font-size:10px; line-height:1.5; }
.step6-complete { border-color:#93c5fd; background:#eff6ff; }.step6-complete strong { color:#1e40af; }.step6-complete span { color:#475569; }
@media(max-width:1050px){.feature-action{grid-template-columns:1fr 1fr}.feature-action .sim-btn{width:100%}.feature-transform-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:760px){.feature-action,.feature-transform-grid,.leakage-controls{grid-template-columns:1fr}.feature-action .sim-btn{width:100%}}

/* Step 7: complete automated ML */
.automl-launch { display:grid; grid-template-columns:1fr 280px auto; gap:14px; align-items:center; padding:19px 20px; border:1px solid #4ade80; border-radius:12px; background:linear-gradient(135deg,#f0fdf4,#eff6ff); }.automl-launch>div { display:grid; gap:5px; }.automl-launch strong { color:#166534; font-size:14px; }.automl-launch span { color:#475569; font-size:11px; line-height:1.5; }.automl-launch .sim-btn { width:280px; }
.automl-train-action { display:flex; align-items:center; justify-content:space-between; gap:20px; padding:18px 20px; border:1px solid #4ade80; border-radius:12px; background:#f0fdf4; }.automl-train-action>div { display:grid; gap:5px; }.automl-train-action strong { color:#166534; }.automl-train-action span { color:#4b715e; font-size:11px; }.automl-train-action .sim-btn { width:280px; }
.validation-state { display:inline-flex; padding:7px 11px; border-radius:999px; font-size:11px; font-weight:800; text-transform:uppercase; }.validation-state.passed { color:#166534; background:#dcfce7; }.validation-state.review_required { color:#92400e; background:#fef3c7; }
.validation-verdict { display:grid; gap:5px; margin-bottom:20px; padding:14px 16px; border-radius:10px; font-size:11px; line-height:1.5; }.validation-verdict.passed { border:1px solid #86efac; background:#f0fdf4; color:#166534; }.validation-verdict.review_required { border:1px solid #fde68a; background:#fffbeb; color:#92400e; }.validation-verdict strong { font-size:13px; }
.final-validation-grid,.automl-detail-grid { align-items:stretch; }.final-validation-grid>.card,.automl-detail-grid>.card { height:100%; }
.final-metric-list,.importance-list { display:grid; gap:8px; }.final-metric-list>div,.importance-list>div { display:flex; justify-content:space-between; gap:12px; padding:10px 11px; border:1px solid var(--border); border-radius:8px; background:var(--gray-50); font-size:11px; }.final-metric-list span,.importance-list span { color:var(--muted); text-transform:capitalize; }.final-metric-list strong,.importance-list strong { color:var(--green); font-family:'DM Mono',monospace; }.final-metric-list.baseline strong { color:#64748b; }
.automl-confusion { overflow:auto; }.automl-confusion table { min-width:420px; margin:auto; border-collapse:separate; border-spacing:5px; }.automl-confusion th { padding:8px; color:var(--muted); font-size:10px; }.automl-confusion td { min-width:90px; padding:20px; border-radius:8px; text-align:center; }.automl-confusion td.correct { background:#166534; color:#fff; }.automl-confusion td.error { background:#fee2e2; color:#991b1b; }.automl-confusion td strong { font:700 22px 'DM Mono',monospace; }
.artifact-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }.artifact-grid a { display:grid; gap:4px; padding:13px; border:1px solid var(--border); border-radius:9px; background:var(--gray-50); color:inherit; text-decoration:none; }.artifact-grid a:hover { border-color:#86efac; background:#f0fdf4; }.artifact-grid span { color:var(--green); font-size:9px; font-weight:800; letter-spacing:.08em; }.artifact-grid strong { color:var(--text); font-size:11px; }.artifact-grid small { overflow:hidden; color:var(--muted); font:9px 'DM Mono',monospace; text-overflow:ellipsis; white-space:nowrap; }
.automl-complete { display:grid; gap:7px; margin-bottom:20px; padding:20px; border:1px solid #4ade80; border-radius:12px; background:linear-gradient(135deg,#dcfce7,#eff6ff); }.automl-complete strong { color:#14532d; font-size:16px; }.automl-complete span { color:#166534; font-weight:600; }.automl-complete small { color:#475569; line-height:1.5; }
@media(max-width:1050px){.automl-launch{grid-template-columns:1fr 1fr}.automl-launch>div{grid-column:1/-1}.artifact-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:760px){.automl-launch,.artifact-grid{grid-template-columns:1fr}.automl-launch>div{grid-column:auto}.automl-launch .sim-btn,.automl-train-action .sim-btn{width:100%}.automl-train-action{align-items:stretch;flex-direction:column}}

/* Simplified technical-user workspace */
.pipeline-ready-bar { display:flex; align-items:center; justify-content:space-between; gap:18px; margin-bottom:18px; padding:13px 16px; border:1px solid #bbf7d0; border-radius:10px; background:#f0fdf4; }.pipeline-ready-bar>div { display:flex; align-items:center; gap:10px; }.pipeline-ready-bar>div>div { display:grid; gap:2px; }.pipeline-ready-bar strong { color:#166534; font-size:12px; }.pipeline-ready-bar small,.pipeline-ready-bar>span { color:#4b715e; font-size:10px; }.pipeline-ready-dot { width:9px; height:9px; border-radius:50%; background:#22c55e; box-shadow:0 0 0 4px rgba(34,197,94,.13); }
.page-import .import-layout { display:grid; grid-template-columns:1fr; gap:10px; margin-top:0; }.page-import .import-form-card .import-form { grid-template-columns:1fr 1fr; }.page-import .import-form-card .upload-dropzone,.page-import .import-form-card .selected-file,.page-import .import-form-card .sim-btn,.page-import .import-form-card .storage-hint { grid-column:1/-1; }.page-import .upload-dropzone { min-height:115px; padding:18px; }
.validation-rules { border:1px solid var(--border); border-radius:10px; background:var(--white); }.validation-rules summary { display:flex; align-items:center; justify-content:space-between; gap:18px; padding:13px 16px; cursor:pointer; list-style:none; }.validation-rules summary::-webkit-details-marker { display:none; }.validation-rules summary span { display:grid; gap:2px; }.validation-rules summary strong { color:var(--text); font-size:11px; }.validation-rules summary small { color:var(--muted); font-size:10px; }.validation-rules summary b { color:var(--green); font-size:10px; }.validation-rules .check-list { grid-template-columns:repeat(2,1fr); padding:0 16px 15px; border-top:1px solid var(--gray-100); padding-top:14px; }
.result-toolbar { display:flex; align-items:center; justify-content:space-between; gap:18px; margin:0 0 18px; padding:12px 14px; border:1px solid var(--border); border-radius:9px; background:var(--white); }.result-toolbar>div { display:grid; gap:2px; }.result-toolbar strong { color:var(--text); font-size:11px; }.result-toolbar span { color:var(--muted); font-size:10px; }
.cloud-summary { display:flex; align-items:center; justify-content:space-between; gap:20px; margin-bottom:18px; padding:18px 20px; border:1px solid #bbf7d0; border-radius:12px; background:linear-gradient(135deg,#f0fdf4,#eff6ff); }.cloud-summary>div { display:flex; align-items:center; gap:14px; }.cloud-summary-icon { display:grid; place-items:center; width:42px; height:42px; border-radius:10px; background:#dcfce7; color:#166534; font:800 12px 'DM Mono',monospace; }.cloud-summary h2 { margin:0 0 3px; font-size:17px; }.cloud-summary p { margin:0; color:var(--muted); font-size:11px; }
.page-storage .cloud-metrics { margin:0 0 18px; }.compact-cloud-actions { margin-bottom:12px; padding:16px 18px; }.compact-cloud-actions .cloud-button { min-width:125px; }
.cloud-settings { padding:0; overflow:hidden; }.cloud-settings>summary { display:flex; align-items:center; justify-content:space-between; padding:15px 18px; cursor:pointer; list-style:none; }.cloud-settings>summary::-webkit-details-marker { display:none; }.cloud-settings>summary span { display:grid; gap:2px; }.cloud-settings>summary strong { color:var(--text); font-size:12px; }.cloud-settings>summary small { color:var(--muted); font-size:10px; }.cloud-settings>summary b { color:var(--green); }.cloud-settings[open]>summary { border-bottom:1px solid var(--border); }.cloud-settings-body { display:grid; grid-template-columns:1.15fr .85fr; gap:24px; padding:18px; }.compact-setup { margin-top:12px; }.compact-credentials { align-content:start; }
@media(max-width:800px){.page-import .import-form-card .import-form,.validation-rules .check-list,.cloud-settings-body{grid-template-columns:1fr}.pipeline-ready-bar,.cloud-summary{align-items:flex-start;flex-direction:column}.result-toolbar{align-items:stretch;flex-direction:column}}
.live-data-module{border:1px solid #a7f3d0;background:linear-gradient(135deg,#f0fdf4 0%,#fff 55%,#eff6ff 100%)}
.live-data-empty,.live-data-heading{display:flex;align-items:center;justify-content:space-between;gap:20px}.live-data-empty strong,.live-data-heading h3{display:block;font-size:18px;color:#10223d;margin:4px 0}.live-data-empty p,.live-data-heading p{margin:0;color:var(--muted);font-size:13px}.live-open-link{width:auto;text-decoration:none;white-space:nowrap}.live-data-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.live-data-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:18px 0}.live-data-metrics>div{background:#fff;border:1px solid #dbe7ef;border-radius:10px;padding:12px}.live-data-metrics span{display:block;font-size:11px;text-transform:uppercase;letter-spacing:.05em;color:#64748b;margin-bottom:5px}.live-data-metrics strong{display:block;color:#0f5132;font-size:14px;overflow-wrap:anywhere}.live-data-controls{display:grid;grid-template-columns:1fr 1fr 1.2fr;gap:12px;margin-bottom:14px}.live-data-controls label{font-size:12px;font-weight:600;color:#334155}.live-data-controls select,.live-data-controls input{margin-top:5px;width:100%}.live-data-grid{display:grid;grid-template-columns:minmax(280px,.8fr) minmax(0,1.7fr);gap:14px}.live-chart-panel,.live-table-panel{background:#fff;border:1px solid #dbe7ef;border-radius:12px;padding:14px;min-width:0}.live-chart-description{margin-bottom:8px}.live-table-panel .table-scroll{max-height:330px}.live-table-panel td{white-space:nowrap;max-width:240px;overflow:hidden;text-overflow:ellipsis}.live-pager{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-top:10px;font-size:12px;color:#64748b}.live-pager>div{display:flex;gap:7px}.live-pager button:disabled{opacity:.45;cursor:not-allowed}
@media(max-width:1000px){.live-data-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.live-data-grid{grid-template-columns:1fr}.live-data-controls{grid-template-columns:1fr 1fr}.live-data-controls label:last-child{grid-column:1/-1}}
@media(max-width:640px){.live-data-empty,.live-data-heading{align-items:flex-start;flex-direction:column}.live-data-metrics,.live-data-controls{grid-template-columns:1fr}.live-data-controls label:last-child{grid-column:auto}}
.live-data-explorer{margin-top:14px;border:1px solid #dbe7ef;border-radius:12px;background:rgba(255,255,255,.8);overflow:hidden}.live-data-explorer>summary{list-style:none;cursor:pointer;padding:14px 16px;display:flex;align-items:center;justify-content:space-between;gap:18px}.live-data-explorer>summary::-webkit-details-marker{display:none}.live-data-explorer>summary>span:first-child{display:grid;gap:3px}.live-data-explorer>summary strong{font-size:13px;color:#17324d}.live-data-explorer>summary small{font-size:11px;color:#64748b;font-weight:400}.live-explorer-action{font-size:12px;font-weight:700;color:#166534;background:#ecfdf5;border:1px solid #bbf7d0;border-radius:8px;padding:8px 11px;white-space:nowrap}.live-explorer-body{padding:0 14px 14px}.module-results-heading{margin:6px 0 16px;padding:4px 2px}.module-results-heading span{font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.08em;color:#16834b}.module-results-heading h2{margin:4px 0;font-size:20px;color:#10223d}.module-results-heading p{margin:0;max-width:900px;color:#64748b;font-size:12px;line-height:1.55}.dashboard-source-strip{display:grid;grid-template-columns:1.3fr repeat(4,1fr);gap:10px;margin-bottom:18px}.dashboard-source-title,.dashboard-source-item{border:1px solid #dbe7ef;background:#fff;border-radius:11px;padding:12px 14px;min-width:0}.dashboard-source-title{background:linear-gradient(135deg,#ecfdf5,#eff6ff)}.dashboard-source-title span,.dashboard-source-item span{display:block;font-size:10px;text-transform:uppercase;letter-spacing:.06em;color:#64748b}.dashboard-source-title strong,.dashboard-source-item strong{display:block;margin:4px 0;color:#10223d;font-size:13px}.dashboard-source-title small,.dashboard-source-item small{display:block;color:#64748b;font-size:10px;line-height:1.4;overflow:hidden;text-overflow:ellipsis}.dashboard-source-item.live{border-color:#a7f3d0}.dashboard-source-item.live strong{color:#166534}@media(max-width:1100px){.dashboard-source-strip{grid-template-columns:repeat(2,1fr)}.dashboard-source-title{grid-column:1/-1}}@media(max-width:640px){.live-data-explorer>summary{align-items:flex-start;flex-direction:column}.dashboard-source-strip{grid-template-columns:1fr}.dashboard-source-title{grid-column:auto}}
.run-selector{margin:12px 0 16px;display:block;width:100%}.run-selector label{display:grid;grid-template-columns:minmax(150px,190px) minmax(0,1fr);align-items:center;gap:12px;width:100%;color:#475569;font-size:13px}.run-selector label>span{font-weight:700;color:#334155}.run-selector select{min-width:0;width:100%;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.chart-wrap canvas[data-drilldown-ready]{cursor:pointer}.chart-wrap canvas[data-drilldown-ready]:focus{outline:3px solid rgba(37,99,235,.3);outline-offset:3px}.chart-drilldown-hint{display:inline-flex;margin-top:8px;padding:6px 10px;border:1px solid #dbe7ef;border-radius:7px;background:#f8fafc;color:#166534;font:700 11px 'DM Sans',sans-serif;cursor:pointer;transition:background .16s ease,border-color .16s ease,transform .16s ease}.chart-drilldown-hint:hover{background:#ecfdf5;border-color:#86efac;transform:translateY(-1px)}
.is-loading{opacity:.78;pointer-events:none}.is-loading button[aria-busy="true"]{position:relative;padding-left:34px}.is-loading button[aria-busy="true"]:before{content:"";position:absolute;left:13px;top:50%;width:12px;height:12px;margin-top:-7px;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;animation:agriflood-spin .7s linear infinite}@keyframes agriflood-spin{to{transform:rotate(360deg)}}
.chart-drilldown[hidden]{display:none}.chart-drilldown{position:fixed;inset:0;z-index:1000;display:grid;place-items:center;padding:20px}.chart-drilldown-backdrop{position:absolute;inset:0;background:rgba(15,23,42,.58)}.chart-drilldown-dialog{position:relative;width:min(900px,96vw);max-height:90vh;overflow:auto;background:#fff;border-radius:14px;box-shadow:0 24px 70px rgba(15,23,42,.28);padding:22px}.chart-drilldown-dialog header,.chart-drilldown-dialog footer,.chart-drilldown-tools{display:flex;align-items:center;justify-content:space-between;gap:16px}.chart-drilldown-dialog h2{font-size:20px;margin:0}.chart-drilldown-dialog header p{margin:4px 0 0;color:#64748b}.chart-drilldown-close{border:0;background:#f1f5f9;border-radius:50%;width:38px;height:38px;font-size:24px;cursor:pointer}.chart-drilldown-meta{display:flex;flex-wrap:wrap;gap:8px 18px;margin:16px 0;padding:11px 13px;background:#f8fafc;border:1px solid #e2e8f0;border-radius:9px;color:#475569;font-size:12px}.chart-drilldown-tools{margin-bottom:12px}.chart-drilldown-tools label{flex:1;color:#475569;font-size:12px}.chart-drilldown-tools input{display:block;width:100%;margin-top:4px;padding:9px 11px;border:1px solid #cbd5e1;border-radius:8px}.chart-drilldown-tools button,.chart-drilldown-dialog footer button{border:1px solid #bbf7d0;background:#f0fdf4;color:#166534;border-radius:7px;padding:9px 13px;cursor:pointer}.chart-drilldown-dialog footer{margin-top:14px;color:#64748b;font-size:12px}.chart-drilldown-dialog footer div{display:flex;gap:8px}.modal-open{overflow:hidden}@media(max-width:700px){.run-selector{justify-content:stretch}.run-selector label{display:block;width:100%}.run-selector select{min-width:0;width:100%;margin-top:5px}.chart-drilldown{padding:8px}.chart-drilldown-dialog{padding:15px}.chart-drilldown-tools{align-items:stretch;flex-direction:column}}
.chart-drilldown-summary h3,.chart-drilldown-records h3{margin:18px 0 8px;font-size:14px;color:#0f172a}.chart-drilldown-summary .table-scroll{margin:0 0 16px;max-height:180px}.chart-drilldown-records>.table-scroll{max-height:430px}.chart-drilldown-summary .data-table th,.chart-drilldown-summary .data-table td{white-space:nowrap}
.automl-interactive-section{margin:0 0 20px}.automl-interactive-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:18px;margin:0 0 12px;padding:15px 18px;border:1px solid #bbf7d0;border-radius:12px;background:linear-gradient(135deg,#f0fdf4,#eff6ff)}.automl-interactive-heading span{font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.09em;color:#16834b}.automl-interactive-heading h3{margin:4px 0;font-size:18px;color:#10223d}.automl-interactive-heading p{margin:0;color:#64748b;font-size:11px}.automl-run-chip{min-width:180px;padding:9px 12px;border:1px solid #dbe7ef;border-radius:9px;background:#fff;text-align:right}.automl-run-chip small{display:block;color:#64748b;font-size:9px}.automl-run-chip strong{display:block;color:#166534;font-size:12px}.automl-interactive-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.automl-interactive-section.prediction-only .automl-interactive-grid{grid-template-columns:1fr}.automl-chart-card .chart-wrap{height:280px}.automl-chart-card .chart-wrap.tall{height:360px}.automl-chart-card .automl-confusion{display:flex;align-items:center;justify-content:center;min-height:280px}.automl-interactive-section.compact .automl-chart-card .chart-wrap{height:250px}@media(max-width:860px){.automl-interactive-grid{grid-template-columns:1fr}.automl-interactive-heading{align-items:flex-start;flex-direction:column}.automl-run-chip{min-width:0;width:100%;text-align:left}}
.forecast-domain-card{margin-bottom:20px}.forecast-domain-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.forecast-domain-grid>div{display:grid;gap:4px;padding:12px;border:1px solid #dbe7ef;border-radius:9px;background:#f8fafc}.forecast-domain-grid strong{font-size:12px;color:#166534}.forecast-domain-grid span{font-size:10px;line-height:1.45;color:#64748b}.forecast-section-heading{margin-top:22px}.forecast-limitation-card{display:flex;flex-direction:column}.forecast-insufficient{display:flex;flex:1;min-height:190px;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:26px;border:1px dashed #fbbf24;border-radius:10px;background:#fffbeb}.forecast-insufficient strong{font-size:14px;color:#92400e}.forecast-insufficient p{max-width:560px;margin:9px 0;color:#64748b;font-size:12px;line-height:1.6}.forecast-insufficient span{font-size:10px;color:#92400e}.forecast-coverage-list{display:grid;gap:8px}.forecast-coverage-list>div{display:flex;justify-content:space-between;gap:16px;padding:9px 11px;border:1px solid #e2e8f0;border-radius:8px;background:#f8fafc;font-size:11px}.forecast-coverage-list span{color:#64748b}.forecast-coverage-list strong{text-align:right;color:#10223d}.forecast-note{margin:12px 0 0;color:#64748b;font-size:10px;line-height:1.55}@media(max-width:1050px){.forecast-domain-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:640px){.forecast-domain-grid{grid-template-columns:1fr}.forecast-coverage-list>div{flex-direction:column;gap:3px}.forecast-coverage-list strong{text-align:left}}
.matrix-detail-button{display:block;width:100%;border:0;background:transparent;color:inherit;cursor:pointer;padding:0}.matrix-detail-button:focus-visible{outline:3px solid #60a5fa;outline-offset:4px;border-radius:5px}.empty-state{min-height:150px;display:flex;align-items:center;justify-content:center;margin:0;color:var(--muted);font-size:13px;text-align:center}
.analytics-geo-filter{display:grid;grid-template-columns:minmax(150px,.7fr) repeat(2,minmax(210px,1fr)) auto;gap:14px;align-items:end;margin:0 0 18px;padding:16px 18px;background:#fff;border:1px solid var(--border);border-radius:12px;box-shadow:var(--shadow-sm)}.analytics-geo-heading{align-self:center;display:flex;flex-direction:column;gap:3px}.analytics-geo-heading strong{font-size:14px;color:var(--text)}.analytics-geo-heading span,.analytics-geo-note{font-size:11px;color:var(--muted)}.analytics-geo-filter label{display:flex;flex-direction:column;gap:6px}.analytics-geo-filter label>span{font-size:11px;font-weight:700;color:var(--gray-600);text-transform:uppercase;letter-spacing:.04em}.analytics-geo-filter select{width:100%;height:42px;padding:0 38px 0 12px;border:1px solid var(--border);border-radius:9px;background:#fff;color:var(--text);font:500 13px 'DM Sans',sans-serif}.analytics-geo-filter select:focus{outline:2px solid rgba(22,163,74,.16);border-color:var(--primary)}.analytics-geo-filter select:disabled{background:var(--gray-50);color:var(--muted);cursor:not-allowed}.analytics-geo-reset{height:42px;display:inline-flex;align-items:center;justify-content:center;padding:0 16px;border:1px solid #bbf7d0;border-radius:9px;background:#f0fdf4;color:#166534;font-size:12px;font-weight:700;text-decoration:none}.analytics-geo-reset:hover{background:#dcfce7}.analytics-geo-note{grid-column:2/-1;margin-top:-4px}@media(max-width:900px){.analytics-geo-filter{grid-template-columns:1fr 1fr}.analytics-geo-heading{grid-column:1/-1}.analytics-geo-note{grid-column:1/-1}}@media(max-width:560px){.analytics-geo-filter{grid-template-columns:1fr}.analytics-geo-heading,.analytics-geo-note{grid-column:1}.analytics-geo-reset{width:100%}}
.dashboard-filter-panel{padding-bottom:0;overflow:hidden}.dashboard-filter-grid{display:grid;grid-template-columns:1fr 1fr;border-top:1px solid var(--border);margin:0 -20px}.dashboard-filter-group{padding:18px 20px;min-width:0}.dashboard-filter-group:nth-child(even){border-left:1px solid var(--border)}.dashboard-filter-group:nth-child(n+3){border-top:1px solid var(--border)}.dashboard-filter-group h3{font-size:14px;margin:0 0 3px;color:var(--text)}.dashboard-filter-group>p{font-size:11px;color:var(--muted);margin:0 0 13px}.dashboard-filter-panel .analytics-geo-filter{grid-template-columns:minmax(120px,.65fr) repeat(2,minmax(150px,1fr)) auto;margin:0;padding:0;border:0;border-radius:0;box-shadow:none;background:transparent;gap:10px}.dashboard-filter-panel .analytics-geo-heading strong{font-size:12px}.dashboard-filter-panel .analytics-geo-filter select,.dashboard-filter-panel .analytics-geo-reset{height:40px}@media(max-width:1100px){.dashboard-filter-grid{grid-template-columns:1fr}.dashboard-filter-group:nth-child(even){border-left:0}.dashboard-filter-group:nth-child(n+2){border-top:1px solid var(--border)}}@media(max-width:760px){.dashboard-filter-panel .analytics-geo-filter{grid-template-columns:1fr 1fr}.dashboard-filter-panel .analytics-geo-heading{grid-column:1/-1}}@media(max-width:560px){.dashboard-filter-panel .analytics-geo-filter{grid-template-columns:1fr}}
.analytics-scope-switch{display:flex;align-items:center;gap:3px;padding:3px;border:1px solid #dbe5df;border-radius:999px;background:#fff}.analytics-scope-switch a{padding:6px 10px;border-radius:999px;color:#52637a;font-size:12px;text-decoration:none;white-space:nowrap}.analytics-scope-switch a.active{background:#166534;color:#fff;font-weight:600}
@keyframes agriflood-modal-fade{from{opacity:0}to{opacity:1}}@keyframes agriflood-modal-rise{from{opacity:0;transform:translateY(12px) scale(.985)}to{opacity:1;transform:none}}.chart-drilldown:not([hidden]){animation:agriflood-modal-fade .18s ease-out}.chart-drilldown:not([hidden]) .chart-drilldown-dialog{animation:agriflood-modal-rise .22s cubic-bezier(.2,.8,.2,1)}
.page-crops .crop-page-hero{margin:0 0 18px;padding:22px 24px;border:1px solid #bbf7d0;border-radius:14px;background:linear-gradient(135deg,#f0fdf4 0%,#eff6ff 100%);box-shadow:var(--shadow-sm)}.page-crops .crop-page-hero h2{font-size:24px;margin-top:5px}.page-crops .crop-page-hero p{max-width:780px}.crop-summary-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px;margin-bottom:18px}.crop-summary-grid .stat-card{min-height:94px;padding:14px 16px;transition:transform .18s ease,box-shadow .18s ease}.crop-summary-grid .stat-card .stat-label{font-size:10px}.crop-summary-grid .stat-card .stat-value{font-size:22px;margin:6px 0 3px}.crop-summary-grid .stat-card .stat-sub{font-size:10px}.crop-summary-grid .stat-card:hover{transform:translateY(-2px);box-shadow:0 10px 28px rgba(15,23,42,.10)}.page-crops .crop-section-heading{margin:28px 0 14px;padding-left:14px;border-left:4px solid #16a34a}.page-crops .grid-2>.card{transition:box-shadow .18s ease,border-color .18s ease}.page-crops .grid-2>.card:hover{border-color:#cbd5e1;box-shadow:0 12px 30px rgba(15,23,42,.08)}.crop-model-hero{display:flex;align-items:center;justify-content:space-between;gap:22px;margin:0 0 18px;padding:22px 24px;border:1px solid #bfdbfe;border-radius:14px;background:linear-gradient(135deg,#eff6ff 0%,#f0fdf4 100%);box-shadow:var(--shadow-sm)}.crop-model-hero span{font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.09em;color:#15803d}.crop-model-hero h2{margin:5px 0 6px;font-size:22px;color:#10223d}.crop-model-hero p{margin:0;max-width:760px;color:#64748b;font-size:12px;line-height:1.6}.crop-model-badge{min-width:210px;padding:12px 14px;border:1px solid #bbf7d0;border-radius:10px;background:#fff;text-align:right}.crop-model-badge small{display:block;color:#64748b;font-size:10px}.crop-model-badge strong{display:block;margin-top:4px;color:#166534;font-size:14px}.crop-model-metrics .metric-card{border-top:3px solid #60a5fa}.crop-model-metrics .crop-model-selected{border-top-color:#22c55e;background:linear-gradient(180deg,#f0fdf4,#fff)}.crop-model-periods{background:linear-gradient(135deg,#fff,#f8fafc)}.crop-model-periods>div{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:0}.crop-model-periods>div>div{padding:3px 16px;border-left:1px solid #e2e8f0}.crop-model-periods>div>div:first-child{border-left:0}.crop-model-card{overflow:hidden}.crop-model-card .card-header{margin:-20px -20px 16px;padding:16px 20px;border-bottom:1px solid #e2e8f0;background:#f8fafc}.crop-validation-card{background:linear-gradient(180deg,#fff,#f8fbff)}.crop-validation-card .chart-wrap{height:315px;padding:4px 2px}.crop-line-key{align-self:center;padding:6px 9px;border:1px solid #dbeafe;border-radius:999px;background:#eff6ff;color:#475569;font-size:9px;font-weight:700;white-space:nowrap}@media(max-width:1200px){.crop-summary-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(max-width:900px){.crop-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.crop-model-hero{align-items:flex-start;flex-direction:column}.crop-model-badge{min-width:0;width:100%;text-align:left}.crop-model-periods>div{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.crop-model-periods>div>div{border-left:0}}@media(max-width:560px){.crop-summary-grid,.crop-model-periods>div{grid-template-columns:1fr}}
.crop-forecast-card{overflow:hidden;background:linear-gradient(180deg,#fff,#f8fbff)}.crop-forecast-card .card-header{margin:-20px -20px 16px;padding:16px 20px;border-bottom:1px solid #e2e8f0;background:#f8fafc}.crop-forecast-card .chart-wrap{height:330px;padding:4px 2px}
.system-state-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;padding:0 20px 20px}.system-state-option{padding:16px;border:1px solid var(--border,#dbe3ee);border-radius:12px;background:#f8fbff}.system-state-option p{margin:7px 0 14px;color:var(--muted,#60708a);line-height:1.55}.system-state-option.danger-zone{background:#fff9f8;border-color:#fecaca}.system-state-option details>summary{display:inline-flex;cursor:pointer;list-style:none}.system-state-option details>summary::-webkit-details-marker{display:none}.system-state-option .protected-delete-form{margin-top:12px;max-width:520px}.table-action.button:disabled{opacity:.5;cursor:not-allowed}@media(max-width:800px){.system-state-actions{grid-template-columns:1fr}}
.dataset-source-card{--source-accent:#16a34a;--source-soft:#f0fdf4;display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:14px;margin:0 0 18px;padding:14px 16px;border:1px solid color-mix(in srgb,var(--source-accent) 24%,#dbe7ef);border-radius:13px;background:linear-gradient(135deg,var(--source-soft),#fff 65%);box-shadow:0 5px 18px rgba(15,23,42,.05)}.dataset-source-card.tone-blue{--source-accent:#2563eb;--source-soft:#eff6ff}.dataset-source-card.tone-orange{--source-accent:#d97706;--source-soft:#fff7ed}.dataset-source-card.tone-purple{--source-accent:#7c3aed;--source-soft:#f5f3ff}.dataset-source-icon{display:grid;place-items:center;width:42px;height:42px;border:1px solid color-mix(in srgb,var(--source-accent) 28%,transparent);border-radius:11px;background:#fff;font-size:20px}.dataset-source-copy{min-width:0}.dataset-source-copy span{display:block;margin-bottom:2px;color:var(--source-accent);font-size:9px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}.dataset-source-copy strong{display:block;color:#10223d;font-size:14px}.dataset-source-copy p{margin:3px 0 0;color:#64748b;font-size:10px;line-height:1.45}.dataset-source-link{display:inline-flex;align-items:center;gap:9px;padding:9px 12px;border:1px solid color-mix(in srgb,var(--source-accent) 36%,#dbe7ef);border-radius:9px;background:#fff;color:var(--source-accent);font-size:11px;font-weight:800;text-decoration:none;white-space:nowrap;transition:transform .16s ease,box-shadow .16s ease}.dataset-source-link:hover{transform:translateY(-1px);box-shadow:0 7px 16px rgba(15,23,42,.09)}.dataset-source-link b{font-size:14px}@media(max-width:650px){.dataset-source-card{grid-template-columns:auto 1fr}.dataset-source-link{grid-column:1/-1;justify-content:center;width:100%}}
.dashboard-filter-panel{padding:0;overflow:hidden}.dashboard-filter-summary{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:14px 18px;cursor:pointer;list-style:none}.dashboard-filter-summary::-webkit-details-marker{display:none}.dashboard-filter-summary>span{padding:7px 10px;border:1px solid #bbf7d0;border-radius:8px;background:#f0fdf4;color:#166534;font-size:11px;font-weight:800;white-space:nowrap}.dashboard-filter-panel[open] .dashboard-filter-summary{border-bottom:1px solid var(--border)}.dashboard-filter-panel[open] .dashboard-filter-summary>span{font-size:0}.dashboard-filter-panel[open] .dashboard-filter-summary>span:after{content:'Hide filters ▴';font-size:11px}.dashboard-filter-grid{margin:0}.dashboard-filter-group{padding:14px 18px}.dashboard-filter-group h3{font-size:13px}.dashboard-filter-group>p{font-size:10px;margin-bottom:10px}.dashboard-filter-panel .analytics-geo-filter{grid-template-columns:minmax(105px,.55fr) repeat(2,minmax(135px,1fr)) auto;gap:8px}.dashboard-filter-panel .analytics-geo-heading strong{font-size:11px}.dashboard-filter-panel .analytics-geo-heading span,.dashboard-filter-panel .analytics-geo-note{font-size:9px}.dashboard-filter-panel .analytics-geo-filter select,.dashboard-filter-panel .analytics-geo-reset{height:36px;font-size:11px}.hazard-reference-note{margin:-4px 0 18px;padding:10px 13px;border:1px solid #ddd6fe;border-radius:10px;background:#faf5ff;color:#5b4b88;font-size:11px;line-height:1.55}.hazard-reference-note strong{color:#5b21b6}@media(max-width:760px){.dashboard-filter-summary{align-items:flex-start;flex-direction:column;gap:8px}}
.dashboard-filter-area{padding:0}.dashboard-filter-area-heading{padding:0 2px 10px}.dashboard-filter-area .dashboard-filter-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;border:0;margin:0}.dashboard-filter-area .dashboard-filter-group{padding:0;border:1px solid var(--border);border-radius:11px;background:var(--white);overflow:hidden;box-shadow:var(--shadow-sm)}.dashboard-filter-area .dashboard-filter-group:nth-child(even),.dashboard-filter-area .dashboard-filter-group:nth-child(n+3){border:1px solid var(--border)}.dashboard-filter-area .dashboard-filter-group summary{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:67px;padding:12px;cursor:pointer;list-style:none}.dashboard-filter-area .dashboard-filter-group summary::-webkit-details-marker{display:none}.dashboard-filter-area .dashboard-filter-group summary strong{display:block;font-size:13px;color:var(--text)}.dashboard-filter-area .dashboard-filter-group summary small{display:block;margin-top:3px;font-size:10px;line-height:1.25;color:var(--muted)}.dashboard-filter-area .dashboard-filter-group summary em{padding:5px 7px;border-radius:7px;background:#f0fdf4;color:#166534;font-size:10px;font-style:normal;font-weight:800;white-space:nowrap}.dashboard-filter-area .dashboard-filter-group[open] summary{border-bottom:1px solid var(--border);background:#fcfffd}.dashboard-filter-area .dashboard-filter-group[open] summary em{font-size:0}.dashboard-filter-area .dashboard-filter-group[open] summary em:after{content:'Close ▴';font-size:10px}.dashboard-filter-content{padding:12px}.dashboard-filter-area .analytics-geo-filter{display:block;margin:0;padding:0;border:0;border-radius:0;box-shadow:none;background:transparent}.dashboard-filter-area .analytics-geo-heading{margin-bottom:8px}.dashboard-filter-area .analytics-geo-heading strong{font-size:11px}.dashboard-filter-area .analytics-geo-heading span,.dashboard-filter-area .analytics-geo-note{font-size:9px}.dashboard-filter-area .analytics-geo-filter label{margin-top:8px}.dashboard-filter-area .analytics-geo-filter label>span{font-size:9px}.dashboard-filter-area .analytics-geo-filter select,.dashboard-filter-area .analytics-geo-reset{height:35px;font-size:11px}.dashboard-filter-area .analytics-geo-reset{width:100%;margin-top:8px}.dashboard-filter-area .analytics-geo-note{margin:7px 0 0}@media(max-width:1100px){.dashboard-filter-area .dashboard-filter-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:560px){.dashboard-filter-area .dashboard-filter-grid{grid-template-columns:1fr}}
.dashboard-filter-card-heading{min-height:50px;padding:12px;border-bottom:1px solid var(--border);background:#fcfffd}.dashboard-filter-card-heading strong{display:block;font-size:13px;color:var(--text)}.dashboard-filter-card-heading small{display:block;margin-top:3px;font-size:10px;line-height:1.25;color:var(--muted)}
.dashboard-filter-area .dashboard-filter-area-heading{padding-bottom:7px}.dashboard-filter-area .dashboard-filter-grid{gap:8px}.dashboard-filter-card-heading{min-height:42px;padding:8px 10px}.dashboard-filter-card-heading strong{font-size:12px}.dashboard-filter-card-heading small{margin-top:2px;font-size:9px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.dashboard-filter-content{padding:8px 10px}.dashboard-filter-area .analytics-geo-heading{display:none}.dashboard-filter-area .analytics-geo-filter label{gap:3px;margin-top:6px}.dashboard-filter-area .analytics-geo-filter label:first-of-type{margin-top:0}.dashboard-filter-area .analytics-geo-filter label>span{font-size:8px}.dashboard-filter-area .analytics-geo-filter select,.dashboard-filter-area .analytics-geo-reset{height:31px;padding-top:0;padding-bottom:0;font-size:10px}.dashboard-filter-area .analytics-geo-reset{margin-top:6px;padding-left:8px;padding-right:8px}.dashboard-filter-area .analytics-geo-note{display:none}
.automated-model-hero{display:flex;align-items:center;justify-content:space-between;gap:22px;margin:0 0 18px;padding:22px 24px;border:1px solid #bfdbfe;border-radius:14px;background:linear-gradient(135deg,#eff6ff 0%,#f0fdf4 100%);box-shadow:var(--shadow-sm)}.automated-model-hero span{font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.09em;color:#15803d}.automated-model-hero h2{margin:5px 0 6px;font-size:22px;color:#10223d}.automated-model-hero p{margin:0;max-width:760px;color:#64748b;font-size:12px;line-height:1.6}.automated-model-badge{min-width:210px;padding:12px 14px;border:1px solid #bbf7d0;border-radius:10px;background:#fff;text-align:right}.automated-model-badge small{display:block;color:#64748b;font-size:10px}.automated-model-badge strong{display:block;margin-top:4px;color:#166534;font-size:14px}.automated-model-metrics .metric-card{border-top:3px solid #60a5fa}.automated-model-metrics .automated-model-selected{border-top-color:#22c55e;background:linear-gradient(180deg,#f0fdf4,#fff)}.automated-model-card{overflow:hidden;background:linear-gradient(180deg,#fff,#f8fbff)}.automated-model-card .card-header{margin:-20px -20px 16px;padding:16px 20px;border-bottom:1px solid #e2e8f0;background:#f8fafc}.automated-model-card .chart-wrap{padding:4px 2px}@media(max-width:900px){.automated-model-hero{align-items:flex-start;flex-direction:column}.automated-model-badge{min-width:0;width:100%;text-align:left}}
.dataset-report-download-card{display:grid;grid-template-columns:34px minmax(0,1fr);gap:10px;width:300px;margin:18px auto;padding:12px;border:1px solid #ccebd8;border-radius:10px;background:linear-gradient(135deg,#f3fff7,#f8fbff);box-shadow:0 5px 16px rgba(15,23,42,.06)}.dataset-report-icon{display:grid;place-items:center;width:34px;height:34px;border:1px solid #bbf7d0;border-radius:9px;background:#fff;color:#15803d;font-size:18px;font-weight:800}.dataset-report-download-card span{display:block;font-size:8px;font-weight:800;letter-spacing:.09em;color:#15803d}.dataset-report-download-card h3{margin:2px 0;color:#10223d;font-size:13px;line-height:1.25}.dataset-report-download-card p{margin:0 0 8px;color:#64748b;font-size:9px;line-height:1.4}.dataset-report-download-card a{display:inline-flex;align-items:center;justify-content:center;padding:6px 9px;border:1px solid #86efac;border-radius:7px;background:#fff;color:#166534;font-size:10px;font-weight:800;text-decoration:none}.dataset-report-download-card a:hover{background:#dcfce7}@media(max-width:560px){.dataset-report-download-card{width:calc(100% - 24px);max-width:300px}}
.import-route-alert .table-action{margin-left:auto}@media(max-width:640px){.import-route-alert{align-items:flex-start;flex-wrap:wrap}.import-route-alert .table-action{margin-left:0}}
.user-invite-card{padding:20px 24px;background:linear-gradient(135deg,#fff 0%,#f0fdf4 100%);border-color:#bbf7d0}.user-invite-card .card-header{margin-bottom:18px}.user-invite-kicker{display:block;margin-bottom:5px;color:#15803d;font-size:10px;font-weight:800;letter-spacing:.09em;text-transform:uppercase}.user-invite-card .card-title{font-size:16px}.user-invite-card .card-sub{max-width:680px}.user-invite-form{display:grid;grid-template-columns:1.3fr .9fr 1.2fr 1.2fr 1.25fr auto;gap:12px;align-items:end}.user-invite-form label{display:grid;gap:6px;color:#41536f;font-size:10px;font-weight:800;letter-spacing:.04em;text-transform:uppercase}.user-invite-form input,.user-invite-form select{width:100%;min-height:38px;padding:9px 11px;border:1px solid #cbd5e1;border-radius:8px;background:#fff;color:#10223d;font:500 12px 'DM Sans',sans-serif;outline:none}.user-invite-form input:focus,.user-invite-form select:focus{border-color:#22c55e;box-shadow:0 0 0 3px rgba(34,197,94,.13)}.user-invite-form label:has(select){padding:8px 10px;border:1px solid #ccebd7;border-radius:10px;background:#f6fff8}.user-invite-form label:has(select) span{color:#15803d}.user-invite-form button{min-height:38px;padding:9px 14px;border:1px solid #15803d;border-radius:8px;background:#166534;color:#fff;font:700 11px 'DM Sans',sans-serif;white-space:nowrap;cursor:pointer}.user-invite-form button:hover{background:#15803d}@media(max-width:1180px){.user-invite-form{grid-template-columns:repeat(3,minmax(0,1fr))}.user-invite-form button{width:100%}}@media(max-width:680px){.user-invite-card{padding:18px}.user-invite-form{grid-template-columns:1fr}}
