/* ══════════════════════════════════════════════════════════════════
   chemical.ariprus.com — AriLinc CIP Intelligence
   Design: Industrial dark-green + amber
══════════════════════════════════════════════════════════════════ */

:root {
  --bg:         #090F0C;
  --bg2:        #0D1812;
  --bg3:        #111F17;
  --card:       #152419;
  --cardHi:     #1C3325;
  --emerald:    #0D9B5A;
  --emeraldBr:  #14C97A;
  --emeraldDim: #085C36;
  --emeraldGlow:rgba(13,155,90,0.18);
  --amber:      #D97706;
  --amberBr:    #F59E0B;
  --white:      #F0F7F3;
  --muted:      #5A8A6E;
  --mutedHi:    #7DB896;
  --text:       #C8E6D4;
  --red:        #EF4444;
  --redDim:     #7F1D1D;
  --border:     rgba(20,201,122,0.13);
  --borderHi:   rgba(20,201,122,0.32);
  --shadow:     0 4px 24px rgba(0,0,0,0.45);
  --shadowCard: 0 2px 12px rgba(0,0,0,0.4);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  line-height: 1.5;
}

/* ── Scrollbar ─────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb { background: var(--emeraldDim); border-radius: 3px; }

/* ══ NAV ══════════════════════════════════════════════════════════ */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  background: rgba(9,15,12,0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.3s;
}
nav.scrolled { box-shadow: 0 4px 32px rgba(0,0,0,0.6); }

.nav-inner {
  max-width: 1280px; margin: 0 auto;
  display: flex; align-items: center; gap: 32px;
  padding: 0 32px; height: 64px;
}

.nav-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo-mark {
  width: 36px; height: 36px; border-radius: 9px;
  background: var(--emerald);
  display: grid; place-items: center;
  font-size: 18px; color: white;
  flex-shrink: 0;
}
.logo-name {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 22px; letter-spacing: 3px; color: var(--white);
  line-height: 1;
}
.logo-sub {
  font-size: 10px; color: var(--emeraldBr);
  font-family: 'DM Mono', monospace; letter-spacing: 0.5px;
}

.nav-links {
  display: flex; gap: 2px; list-style: none; margin-left: auto;
}
.nav-link {
  text-decoration: none; color: var(--muted); font-size: 13px;
  font-weight: 500; padding: 6px 14px; border-radius: 6px;
  transition: color 0.2s, background 0.2s;
}
.nav-link:hover { color: var(--white); background: rgba(255,255,255,0.05); }
.nav-link.active { color: var(--emeraldBr); background: var(--emeraldGlow); }

.nav-right { display: flex; align-items: center; gap: 16px; }
.live-badge {
  display: flex; align-items: center; gap: 6px;
  background: rgba(13,155,90,0.12); border: 1px solid var(--border);
  border-radius: 100px; padding: 4px 12px;
  font-size: 11px; font-family: 'DM Mono', monospace;
  color: var(--emeraldBr); letter-spacing: 1px;
}
.live-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--emeraldBr);
  animation: blink 1.4s ease-in-out infinite;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0.25} }

.btn-nav-cta {
  background: var(--emerald); color: white; border: none;
  padding: 8px 20px; border-radius: 7px; font-size: 13px;
  font-weight: 600; cursor: pointer; font-family: 'DM Sans', sans-serif;
  transition: background 0.2s, transform 0.15s;
  white-space: nowrap;
}
.btn-nav-cta:hover { background: var(--emeraldBr); transform: translateY(-1px); }

.hamburger {
  display: none; background: none; border: none;
  color: var(--white); font-size: 22px; cursor: pointer;
  margin-left: auto;
}

/* ══ HERO ═════════════════════════════════════════════════════════ */
.hero {
  position: relative; min-height: 100vh;
  display: flex; align-items: center;
  padding: 80px 32px 60px;
  overflow: hidden;
}

.hero-grid-bg {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(20,201,122,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20,201,122,0.04) 1px, transparent 1px);
  background-size: 72px 72px;
}

.hero-content {
  position: relative; z-index: 2;
  max-width: 620px;
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(13,155,90,0.1); border: 1px solid var(--border);
  border-radius: 100px; padding: 5px 16px 5px 10px;
  font-size: 12px; font-family: 'DM Mono', monospace;
  color: var(--emeraldBr); margin-bottom: 28px;
}
.eyebrow-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--emeraldBr); animation: blink 1.4s infinite;
  flex-shrink: 0;
}

.hero-h1 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(52px, 8vw, 96px);
  line-height: 0.92; letter-spacing: 2px;
  color: var(--white); margin-bottom: 24px;
}
.hero-h1 .accent { color: var(--emeraldBr); }

.hero-sub {
  font-size: 16px; font-weight: 300; line-height: 1.7;
  color: var(--mutedHi); max-width: 500px; margin-bottom: 36px;
}

.hero-stats {
  display: flex; align-items: center; gap: 0;
  margin-bottom: 36px; flex-wrap: wrap; gap: 0;
}
.hero-stat { padding: 0 20px; }
.hero-stat:first-child { padding-left: 0; }
.hs-val {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 36px; color: var(--emeraldBr); letter-spacing: 1px;
  line-height: 1;
}
.hs-lbl { font-size: 11px; color: var(--muted); margin-top: 3px; }
.hero-stat-div {
  width: 1px; height: 40px; background: var(--border); flex-shrink: 0;
}

.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.btn-primary {
  background: var(--emerald); color: white; border: none;
  padding: 13px 28px; border-radius: 8px; font-size: 14px;
  font-weight: 600; cursor: pointer; font-family: 'DM Sans', sans-serif;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}
.btn-primary:hover {
  background: var(--emeraldBr); transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(13,155,90,0.35);
}
.btn-primary.full { width: 100%; }

.btn-secondary {
  background: transparent; color: var(--emeraldBr);
  border: 1px solid var(--borderHi);
  padding: 13px 28px; border-radius: 8px; font-size: 14px;
  font-weight: 500; cursor: pointer; font-family: 'DM Sans', sans-serif;
  transition: background 0.2s, transform 0.15s;
}
.btn-secondary:hover { background: var(--emeraldGlow); transform: translateY(-2px); }

/* Plant schematic (right side of hero) */
.hero-visual {
  position: absolute; right: 0; top: 0; bottom: 0;
  width: 45%; z-index: 1; overflow: hidden;
  opacity: 0.5;
}
.plant-schematic {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 12px;
}

/* ══ SECTIONS ═════════════════════════════════════════════════════ */
.section {
  padding: 80px 32px;
  max-width: 1280px; margin: 0 auto;
}
.section-dark {
  max-width: 100%;
  background: var(--bg2);
  padding: 80px 32px;
}
.section-dark > * { max-width: 1280px; margin-left: auto; margin-right: auto; }

.section-header {
  text-align: center; margin-bottom: 48px;
}
.section-tag {
  display: inline-block;
  font-size: 11px; font-family: 'DM Mono', monospace;
  color: var(--emeraldBr); letter-spacing: 2px; text-transform: uppercase;
  background: var(--emeraldGlow); border: 1px solid var(--border);
  padding: 4px 14px; border-radius: 100px; margin-bottom: 14px;
}
.section-h2 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(32px, 4vw, 52px); letter-spacing: 2px;
  color: var(--white); margin-bottom: 12px;
}
.section-sub {
  font-size: 15px; color: var(--muted); max-width: 580px;
  margin: 0 auto; line-height: 1.65;
}

/* ══ KPI ROW ══════════════════════════════════════════════════════ */
.kpi-row {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 16px; margin-bottom: 32px;
}
.kpi-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 12px; padding: 20px 22px;
  position: relative; overflow: hidden;
  transition: border-color 0.2s, transform 0.2s;
}
.kpi-card:hover { border-color: var(--borderHi); transform: translateY(-2px); }
.kpi-card-accent {
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
}
.kpi-val {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 36px; letter-spacing: 1px; color: var(--white);
  line-height: 1; margin-bottom: 4px;
}
.kpi-lbl { font-size: 12px; color: var(--muted); font-weight: 500; }
.kpi-delta {
  font-size: 11px; margin-top: 6px;
  font-family: 'DM Mono', monospace;
}
.kpi-delta.up { color: var(--emeraldBr); }
.kpi-delta.down { color: var(--red); }

/* ══ EQUIPMENT GRID ══════════════════════════════════════════════ */
.equip-grid {
  display: grid; grid-template-columns: repeat(5, 1fr);
  gap: 16px; margin-bottom: 24px;
}

.equip-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 14px; padding: 20px; cursor: pointer;
  transition: border-color 0.25s, transform 0.2s, box-shadow 0.25s;
  position: relative; overflow: hidden;
}
.equip-card:hover {
  border-color: var(--borderHi); transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.4);
}
.equip-card.cip-active { border-color: var(--amber); }
.equip-card.cip-active .equip-icon-bg { background: rgba(217,119,6,0.15); }
.equip-card.critical { border-color: var(--red); animation: criticalPulse 1.5s ease-in-out infinite; }
@keyframes criticalPulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(239,68,68,0); }
  50% { box-shadow: 0 0 0 6px rgba(239,68,68,0.15); }
}

.equip-card-top {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 16px;
}
.equip-icon-bg {
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--emeraldGlow); display: grid; place-items: center;
  font-size: 20px; flex-shrink: 0;
}
.equip-status-chip {
  font-size: 10px; font-family: 'DM Mono', monospace;
  padding: 3px 9px; border-radius: 100px; font-weight: 500;
}
.chip-idle     { background: rgba(91,138,110,0.2);  color: var(--mutedHi); }
.chip-active   { background: rgba(217,119,6,0.2);   color: var(--amberBr); }
.chip-complete { background: rgba(13,155,90,0.2);   color: var(--emeraldBr); }
.chip-critical { background: rgba(239,68,68,0.2);   color: #FCA5A5; }
.chip-scheduled{ background: rgba(99,102,241,0.2);  color: #A5B4FC; }

.equip-name {
  font-size: 14px; font-weight: 600; color: var(--white); margin-bottom: 2px;
}
.equip-id {
  font-size: 11px; color: var(--muted);
  font-family: 'DM Mono', monospace;
}

.soiling-label {
  display: flex; justify-content: space-between; align-items: center;
  margin: 14px 0 6px; font-size: 11px; color: var(--muted);
}
.soiling-val {
  font-family: 'DM Mono', monospace; font-weight: 500;
}

.soiling-track {
  height: 6px; background: rgba(255,255,255,0.08); border-radius: 3px;
  overflow: hidden; margin-bottom: 14px;
}
.soiling-fill {
  height: 100%; border-radius: 3px;
  transition: width 1s ease;
}

.equip-meta {
  font-size: 11px; color: var(--muted); line-height: 1.6;
}
.equip-meta span { color: var(--mutedHi); font-weight: 500; }

/* ══ ALERT BANNER ════════════════════════════════════════════════ */
.alert-banner {
  display: flex; align-items: center; gap: 14px;
  background: rgba(217,119,6,0.12); border: 1px solid rgba(217,119,6,0.4);
  border-radius: 12px; padding: 14px 20px; margin-top: 20px;
}
.alert-icon { font-size: 22px; flex-shrink: 0; }
.alert-text { flex: 1; font-size: 14px; color: var(--amberBr); }
.alert-dismiss {
  background: none; border: 1px solid rgba(217,119,6,0.4);
  color: var(--amber); padding: 5px 14px; border-radius: 6px;
  font-size: 12px; cursor: pointer; transition: background 0.2s;
}
.alert-dismiss:hover { background: rgba(217,119,6,0.15); }

/* ══ MONITOR LAYOUT ══════════════════════════════════════════════ */
.monitor-layout {
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px;
  max-width: 1280px; margin: 0 auto;
}

.monitor-equip-select {
  display: flex; align-items: center; gap: 12px; margin-bottom: 18px;
  font-size: 13px; color: var(--muted);
}
.monitor-equip-select select {
  background: var(--card); border: 1px solid var(--border);
  color: var(--white); padding: 7px 12px; border-radius: 7px;
  font-size: 13px; font-family: 'DM Sans', sans-serif;
  cursor: pointer; flex: 1;
}

.phase-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 14px; padding: 22px; margin-bottom: 18px;
}
.phase-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 20px;
}
.phase-title { font-size: 14px; font-weight: 600; color: var(--white); }
.phase-badge {
  font-size: 10px; font-family: 'DM Mono', monospace;
  background: rgba(13,155,90,0.2); color: var(--emeraldBr);
  padding: 3px 10px; border-radius: 100px;
  animation: blink 1.4s infinite;
}
.phase-badge.paused { background: rgba(217,119,6,0.2); color: var(--amberBr); animation: none; }

.phase-steps { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.phase-step {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 12px; border-radius: 8px;
  font-size: 13px; transition: background 0.3s;
}
.phase-step.done    { background: rgba(13,155,90,0.1); color: var(--emeraldBr); }
.phase-step.current { background: rgba(217,119,6,0.15); color: var(--amberBr); font-weight: 600; }
.phase-step.pending { color: var(--muted); }

.ps-icon {
  width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center; font-size: 12px; flex-shrink: 0;
}
.phase-step.done    .ps-icon { background: var(--emeraldDim); }
.phase-step.current .ps-icon { background: rgba(217,119,6,0.3); }
.phase-step.pending .ps-icon { background: rgba(255,255,255,0.05); }

.ps-time {
  margin-left: auto; font-size: 11px;
  font-family: 'DM Mono', monospace; color: var(--muted);
}

.phase-progress-bar {
  height: 5px; background: rgba(255,255,255,0.07); border-radius: 3px;
  overflow: hidden; margin-bottom: 10px;
}
.phase-progress-fill {
  height: 100%; background: linear-gradient(90deg, var(--emeraldDim), var(--emeraldBr));
  border-radius: 3px; transition: width 0.8s ease;
}

.phase-elapsed {
  font-size: 11px; color: var(--muted); text-align: right;
  font-family: 'DM Mono', monospace;
}

/* Sensor grid */
.sensor-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sensor-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 10px; padding: 14px 16px;
}
.sensor-label { font-size: 11px; color: var(--muted); margin-bottom: 6px; }
.sensor-val {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 28px; letter-spacing: 1px; color: var(--white);
  line-height: 1; margin-bottom: 2px;
}
.sensor-unit { font-size: 11px; color: var(--muted); }
.sensor-trend {
  font-size: 11px; font-family: 'DM Mono', monospace;
  margin-top: 4px;
}
.trend-up   { color: var(--amberBr); }
.trend-down { color: var(--emeraldBr); }
.trend-ok   { color: var(--emeraldBr); }

/* Monitor right */
.monitor-right { display: flex; flex-direction: column; gap: 16px; }

.chart-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 14px; padding: 18px 20px;
}
.chart-title {
  font-size: 12px; font-family: 'DM Mono', monospace;
  color: var(--muted); margin-bottom: 12px; text-transform: uppercase;
  letter-spacing: 0.5px;
}

.anomaly-log {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 14px; padding: 18px 20px; flex: 1;
}
.anomaly-log-title {
  font-size: 12px; font-family: 'DM Mono', monospace;
  color: var(--muted); margin-bottom: 12px; text-transform: uppercase;
}
.anomaly-entries { display: flex; flex-direction: column; gap: 8px; }
.anomaly-entry {
  display: flex; gap: 10px; align-items: flex-start;
  font-size: 12px; padding: 8px 10px; border-radius: 7px;
}
.anomaly-entry.ok     { background: rgba(13,155,90,0.08); color: var(--emeraldBr); }
.anomaly-entry.warn   { background: rgba(217,119,6,0.1);  color: var(--amberBr); }
.anomaly-entry.info   { background: rgba(99,102,241,0.1); color: #A5B4FC; }
.ae-time { font-family: 'DM Mono', monospace; flex-shrink: 0; opacity: 0.7; }

/* ══ DOSING SECTION ══════════════════════════════════════════════ */
.dosing-layout {
  display: grid; grid-template-columns: 1fr auto;
  gap: 24px; align-items: start;
}

.dosing-table-wrap {
  overflow-x: auto; border-radius: 12px;
  border: 1px solid var(--border);
}
.dosing-table {
  width: 100%; border-collapse: collapse;
  background: var(--card);
}
.dosing-table th {
  background: var(--bg3); color: var(--muted);
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.5px; padding: 12px 16px; text-align: left;
  border-bottom: 1px solid var(--border);
  font-family: 'DM Mono', monospace;
}
.dosing-table td {
  padding: 13px 16px; font-size: 13px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}
.dosing-table tr:last-child td { border-bottom: none; }
.dosing-table tr:hover td { background: rgba(255,255,255,0.02); }
.saving-cell { color: var(--emeraldBr); font-weight: 600; }
.status-ok   { color: var(--emeraldBr); font-size: 11px; }

.dosing-stats { display: flex; flex-direction: column; gap: 12px; width: 200px; }
.dosing-stat-card {
  border-radius: 12px; padding: 18px 16px;
}
.dosing-stat-card.green {
  background: rgba(13,155,90,0.12);
  border: 1px solid rgba(13,155,90,0.25);
}
.dosing-stat-card.amber {
  background: rgba(217,119,6,0.1);
  border: 1px solid rgba(217,119,6,0.25);
}
.dsc-val {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 28px; letter-spacing: 1px;
  color: var(--white); line-height: 1; margin-bottom: 4px;
}
.dosing-stat-card.amber .dsc-val { color: var(--amberBr); }
.dsc-lbl { font-size: 12px; font-weight: 600; color: var(--white); margin-bottom: 3px; }
.dsc-sub { font-size: 11px; color: var(--muted); }

.dosing-note {
  display: flex; align-items: center; gap: 10px;
  background: rgba(13,155,90,0.07); border: 1px solid var(--border);
  border-radius: 10px; padding: 12px 18px; margin-top: 20px;
  font-size: 13px; color: var(--muted);
}
.check-icon { color: var(--emeraldBr); font-size: 16px; flex-shrink: 0; }

/* ══ COMPLIANCE ══════════════════════════════════════════════════ */
.compliance-kpis {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 14px; margin-bottom: 24px;
  max-width: 1280px; margin-left: auto; margin-right: auto;
}

.compliance-controls {
  display: flex; align-items: center; gap: 14px; margin-bottom: 16px;
  flex-wrap: wrap; max-width: 1280px; margin-left: auto; margin-right: auto;
}
.filter-group {
  display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted);
}
.filter-group select, .filter-group input {
  background: var(--card); border: 1px solid var(--border);
  color: var(--white); padding: 7px 12px; border-radius: 7px;
  font-size: 13px; font-family: 'DM Sans', sans-serif; cursor: pointer;
}

.btn-export {
  margin-left: auto;
  background: transparent; color: var(--emeraldBr);
  border: 1px solid var(--borderHi);
  padding: 8px 18px; border-radius: 7px; font-size: 13px;
  cursor: pointer; transition: background 0.2s;
  font-family: 'DM Sans', sans-serif;
}
.btn-export:hover { background: var(--emeraldGlow); }

.compliance-table-wrap {
  overflow-x: auto; border-radius: 12px;
  border: 1px solid var(--border); margin-bottom: 24px;
  max-width: 1280px; margin-left: auto; margin-right: auto;
}
.compliance-table {
  width: 100%; border-collapse: collapse;
  background: var(--card); font-size: 12px;
}
.compliance-table th {
  background: var(--bg3); color: var(--muted);
  font-size: 10px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.5px; padding: 10px 14px; text-align: left;
  border-bottom: 1px solid var(--border);
  font-family: 'DM Mono', monospace; white-space: nowrap;
}
.compliance-table td {
  padding: 10px 14px; border-bottom: 1px solid var(--border);
  color: var(--text); white-space: nowrap;
  font-family: 'DM Mono', monospace; font-size: 11px;
}
.compliance-table tr:last-child td { border-bottom: none; }
.compliance-table tr:hover td { background: rgba(255,255,255,0.02); }

.result-badge {
  display: inline-block; padding: 2px 9px;
  border-radius: 100px; font-size: 10px; font-weight: 600;
}
.result-PASS        { background: rgba(13,155,90,0.2);  color: var(--emeraldBr); }
.result-CONDITIONAL { background: rgba(217,119,6,0.2);  color: var(--amberBr); }
.result-FAIL        { background: rgba(239,68,68,0.2);  color: #FCA5A5; }

.standards-row {
  display: flex; flex-wrap: wrap; gap: 10px;
  max-width: 1280px; margin: 0 auto;
}
.standard-badge {
  background: rgba(13,155,90,0.1); border: 1px solid var(--border);
  border-radius: 100px; padding: 5px 14px;
  font-size: 12px; color: var(--emeraldBr);
  font-family: 'DM Mono', monospace;
}

/* ══ ANALYTICS ═══════════════════════════════════════════════════ */
.analytics-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr;
  gap: 16px; margin-bottom: 24px;
}
.analytics-chart-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 14px; padding: 20px 22px;
}
.analytics-chart-card.wide { grid-column: span 1; }

.roi-table-wrap {
  overflow-x: auto; border-radius: 12px;
  border: 1px solid var(--border); margin-bottom: 24px;
}
.roi-table {
  width: 100%; border-collapse: collapse;
  background: var(--card);
}
.roi-table th {
  background: var(--bg3); color: var(--muted);
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.5px; padding: 12px 18px; text-align: left;
  border-bottom: 1px solid var(--border);
  font-family: 'DM Mono', monospace;
}
.roi-table td {
  padding: 13px 18px; font-size: 13px;
  border-bottom: 1px solid var(--border); color: var(--text);
}
.roi-table tr:last-child td { border-bottom: none; }
.roi-val { color: var(--emeraldBr); font-weight: 600; }

.roi-summary {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.roi-sum-card {
  border-radius: 14px; padding: 24px;
  text-align: center;
}
.roi-sum-card.green  { background: rgba(13,155,90,0.12); border: 1px solid rgba(13,155,90,0.25); }
.roi-sum-card.amber  { background: rgba(217,119,6,0.1);  border: 1px solid rgba(217,119,6,0.25); }
.roi-sum-card.red    { background: rgba(239,68,68,0.1);  border: 1px solid rgba(239,68,68,0.25); }
.rs-val {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 40px; letter-spacing: 2px; color: var(--white);
  line-height: 1; margin-bottom: 8px;
}
.roi-sum-card.amber .rs-val { color: var(--amberBr); }
.roi-sum-card.red   .rs-val { color: #FCA5A5; }
.rs-lbl { font-size: 13px; font-weight: 600; color: var(--white); margin-bottom: 4px; }
.rs-sub { font-size: 12px; color: var(--muted); }

/* ══ DEPLOY STRIP ════════════════════════════════════════════════ */
.deploy-strip {
  background: var(--bg3);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 56px 32px;
}
.deploy-steps {
  display: flex; align-items: center; justify-content: center;
  flex-wrap: wrap; gap: 0; max-width: 1100px; margin: 0 auto 40px;
}
.ds-step {
  text-align: center; width: 160px; padding: 0 8px;
}
.ds-num {
  font-family: 'Bebas Neue', sans-serif; font-size: 32px;
  color: var(--emeraldBr); line-height: 1; margin-bottom: 6px;
}
.ds-title {
  font-size: 14px; font-weight: 600; color: var(--white); margin-bottom: 6px;
}
.ds-body { font-size: 12px; color: var(--muted); line-height: 1.5; }
.ds-arrow {
  font-size: 18px; color: var(--emeraldDim); padding: 0 4px;
  flex-shrink: 0; align-self: flex-start; margin-top: 12px;
}
.deploy-cta {
  text-align: center;
}
.deploy-cta p {
  font-size: 16px; color: var(--muted); margin-bottom: 18px;
  font-style: italic;
}

/* ══ FOOTER ══════════════════════════════════════════════════════ */
.footer {
  background: var(--bg); border-top: 1px solid var(--border);
  padding: 48px 32px 24px;
}
.footer-inner {
  max-width: 1280px; margin: 0 auto;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px; margin-bottom: 40px;
}
.footer-brand { display: flex; align-items: flex-start; gap: 12px; }
.footer-col-title {
  font-size: 11px; font-family: 'DM Mono', monospace;
  color: var(--muted); text-transform: uppercase; letter-spacing: 1px;
  margin-bottom: 14px;
}
.footer-links-col { display: flex; flex-direction: column; gap: 10px; }
.footer-links-col a {
  font-size: 13px; color: var(--muted); text-decoration: none;
  transition: color 0.2s;
}
.footer-links-col a:hover { color: var(--emeraldBr); }
.footer-bottom {
  max-width: 1280px; margin: 0 auto;
  border-top: 1px solid var(--border);
  padding-top: 20px;
  font-size: 12px; color: var(--muted); text-align: center;
}

/* ══ MODAL ═══════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(6px);
  display: none; place-items: center;
  padding: 20px;
}
.modal-overlay.open { display: grid; }

.modal {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 18px; padding: 36px; width: 100%;
  max-width: 520px; position: relative;
  animation: modalIn 0.25s ease;
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.96) translateY(10px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-close {
  position: absolute; top: 16px; right: 18px;
  background: none; border: none; color: var(--muted);
  font-size: 18px; cursor: pointer; transition: color 0.2s;
}
.modal-close:hover { color: var(--white); }

.modal-header { text-align: center; margin-bottom: 28px; }
.modal-icon {
  font-size: 36px; display: block; margin-bottom: 12px;
}
.modal-header h3 {
  font-family: 'Bebas Neue', sans-serif; font-size: 28px;
  letter-spacing: 2px; color: var(--white); margin-bottom: 8px;
}
.modal-header p { font-size: 14px; color: var(--muted); line-height: 1.5; }

.modal-form { display: flex; flex-direction: column; gap: 14px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 12px; color: var(--muted); font-weight: 500; }
.form-group input, .form-group select {
  background: var(--card); border: 1px solid var(--border);
  color: var(--white); padding: 10px 14px; border-radius: 8px;
  font-size: 14px; font-family: 'DM Sans', sans-serif;
  transition: border-color 0.2s;
  outline: none;
}
.form-group input:focus,
.form-group select:focus { border-color: var(--emeraldBr); }
.form-group input::placeholder { color: var(--muted); }

/* ══ TOAST ═══════════════════════════════════════════════════════ */
.toast {
  position: fixed; bottom: 28px; right: 28px; z-index: 600;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 10px; padding: 14px 20px; font-size: 14px;
  color: var(--emeraldBr); box-shadow: var(--shadow);
  transform: translateY(120%); transition: transform 0.35s ease;
  pointer-events: none; max-width: 320px;
}
.toast.show { transform: translateY(0); }

/* ══ RESPONSIVE ══════════════════════════════════════════════════ */
@media (max-width: 1100px) {
  .equip-grid { grid-template-columns: repeat(3, 1fr); }
  .kpi-row    { grid-template-columns: repeat(2, 1fr); }
  .analytics-grid { grid-template-columns: 1fr 1fr; }
  .analytics-chart-card.wide { grid-column: span 2; }
}
@media (max-width: 860px) {
  .nav-links, .nav-right { display: none; }
  .hamburger { display: block; }
  .hero { flex-direction: column; padding: 90px 20px 40px; }
  .hero-visual { display: none; }
  .hero-stats { gap: 4px; }
  .hero-stat { padding: 0 12px; }
  .equip-grid { grid-template-columns: repeat(2, 1fr); }
  .monitor-layout { grid-template-columns: 1fr; }
  .dosing-layout { grid-template-columns: 1fr; }
  .dosing-stats { flex-direction: row; flex-wrap: wrap; width: 100%; }
  .dosing-stat-card { flex: 1; min-width: 140px; }
  .analytics-grid { grid-template-columns: 1fr; }
  .analytics-chart-card.wide { grid-column: span 1; }
  .roi-summary { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .deploy-steps { justify-content: flex-start; }
  .form-row { grid-template-columns: 1fr; }
  .compliance-kpis { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 520px) {
  .equip-grid { grid-template-columns: 1fr; }
  .kpi-row    { grid-template-columns: 1fr; }
  .hero-stats { flex-direction: column; gap: 10px; align-items: flex-start; }
  .hero-stat-div { display: none; }
  .section { padding: 50px 16px; }
  .section-dark { padding: 50px 16px; }
}
