
  :root {
    --green-dark: #1B5E20;
    --green-mid: #2E7D32;
    --green: #43A047;
    --green-light: #76C442;
    --green-pale: #E8F5E9;
    --teal: #00695C;
    --teal-light: #E0F2F1;
    --amber: #F57F17;
    --amber-light: #FFF8E1;
    --blue: #1565C0;
    --blue-light: #E3F2FD;
    --red: #C62828;
    --white: #ffffff;
    --gray-100: #F5F5F5;
    --gray-200: #EEEEEE;
    --gray-400: #BDBDBD;
    --gray-600: #757575;
    --gray-800: #424242;
    --dark: #0D1B0F;
    --shadow: 0 4px 24px rgba(27,94,32,0.12);
    --shadow-lg: 0 8px 48px rgba(27,94,32,0.18);
    --radius: 12px;
    --radius-lg: 20px;
  }
  * { box-sizing: border-box; margin: 0; padding: 0; }
  html { scroll-behavior: smooth; }
  body { font-family: 'Segoe UI', system-ui, sans-serif; color: var(--gray-800); background: var(--white); overflow-x: hidden; }

  /* ===== LANGUAGE CONTENT ===== */
  [data-vi], [data-en] { display: none; }
  body.lang-vi [data-vi] { display: block; }
  body.lang-en [data-en] { display: block; }
  body.lang-vi [data-vi].inline { display: inline; }
  body.lang-en [data-en].inline { display: inline; }
  body.lang-vi [data-vi].flex { display: flex; }
  body.lang-en [data-en].flex { display: flex; }

  /* ===== NAVBAR ===== */
  nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    background: rgba(255,255,255,0.95); backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--gray-200);
    padding: 0 40px; height: 68px;
    display: flex; align-items: center; justify-content: space-between;
    transition: box-shadow 0.3s;
  }
  nav.scrolled { box-shadow: var(--shadow); }
  .nav-logo { display: flex; align-items: center; text-decoration: none; }
  .nav-logo-icon {
    width: 38px; height: 38px; background: linear-gradient(135deg, var(--green-mid), var(--green-light));
    border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 20px;
  }
  .nav-logo-text { font-size: 22px; font-weight: 800; color: var(--green-dark); letter-spacing: -0.5px; }
  .nav-links { display: flex; gap: 32px; list-style: none; }
  .nav-links a { text-decoration: none; color: var(--gray-800); font-size: 14px; font-weight: 500; transition: color 0.2s; }
  .nav-links a:hover { color: var(--green); }
  .nav-right { display: flex; align-items: center; gap: 12px; }
  .lang-toggle {
    display: flex; background: var(--gray-100); border-radius: 8px; padding: 3px;
  }
  .lang-toggle[hidden] { display: none; }
  .lang-btn {
    padding: 5px 12px; border: none; background: transparent; border-radius: 6px;
    font-size: 13px; font-weight: 600; cursor: pointer; color: var(--gray-600); transition: all 0.2s;
  }
  .lang-btn.active { background: var(--white); color: var(--green-dark); box-shadow: 0 1px 4px rgba(0,0,0,0.1); }
  .btn-primary {
    background: linear-gradient(135deg, var(--green-mid), var(--green-light));
    color: white; border: none; border-radius: 8px; padding: 9px 20px;
    font-size: 14px; font-weight: 600; cursor: pointer; transition: all 0.2s; text-decoration: none;
  }
  .btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(67,160,71,0.4); }

  /* ===== HERO ===== */
  .hero {
    min-height: 100vh; padding: 120px 40px 80px;
    background: linear-gradient(135deg, var(--dark) 0%, var(--green-dark) 50%, #1a3a1a 100%);
    display: flex; align-items: center; position: relative; overflow: hidden;
  }
  .hero::before {
    content: ''; position: absolute; inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%2376C442' fill-opacity='0.06'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  }
  .hero-content { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; position: relative; z-index: 1; }
  .hero-badge {
    display: inline-flex; align-items: center; gap: 8px;
    background: rgba(118,196,66,0.15); border: 1px solid rgba(118,196,66,0.3);
    color: var(--green-light); border-radius: 100px; padding: 6px 16px; font-size: 13px; font-weight: 600; margin-bottom: 24px;
  }
  .hero-badge-dot { width: 8px; height: 8px; background: var(--green-light); border-radius: 50%; animation: pulse 2s infinite; }
  @keyframes pulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:0.6;transform:scale(1.2)} }
  .hero h1 { font-size: 56px; font-weight: 900; color: white; line-height: 1.1; letter-spacing: -1px; margin-bottom: 24px; }
  .hero h1 span { color: var(--green-light); }
  .hero-sub { font-size: 18px; color: rgba(255,255,255,0.75); line-height: 1.7; margin-bottom: 40px; }
  .hero-ctas { display: flex; gap: 16px; flex-wrap: wrap; }
  .btn-hero-primary {
    background: linear-gradient(135deg, var(--green), var(--green-light));
    color: white; border: none; border-radius: 12px; padding: 16px 32px;
    font-size: 16px; font-weight: 700; cursor: pointer; text-decoration: none;
    transition: all 0.3s; display: flex; align-items: center; gap: 8px;
  }
  .btn-hero-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(118,196,66,0.5); }
  .btn-hero-secondary {
    background: transparent; color: white; border: 2px solid rgba(255,255,255,0.3);
    border-radius: 12px; padding: 14px 28px; font-size: 16px; font-weight: 600;
    cursor: pointer; text-decoration: none; transition: all 0.3s;
  }
  .btn-hero-secondary:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.5); }
  .hero-stats { display: flex; gap: 32px; margin-top: 48px; }
  .hero-stat { }
  .hero-stat-num { font-size: 28px; font-weight: 900; color: var(--green-light); }
  .hero-stat-label { font-size: 13px; color: rgba(255,255,255,0.6); margin-top: 2px; }
  .hero-visual {
    background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-lg); padding: 24px; backdrop-filter: blur(8px);
  }
  .hero-dashboard-preview { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .hdp-card {
    background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.12);
    border-radius: var(--radius); padding: 16px; transition: all 0.3s; cursor: pointer;
  }
  .hdp-card:hover { background: rgba(118,196,66,0.15); border-color: rgba(118,196,66,0.3); transform: translateY(-2px); }
  .hdp-card-icon { font-size: 28px; margin-bottom: 8px; }
  .hdp-card-title { font-size: 13px; font-weight: 700; color: white; margin-bottom: 4px; }
  .hdp-card-val { font-size: 22px; font-weight: 900; color: var(--green-light); }
  .hdp-card-sub { font-size: 11px; color: rgba(255,255,255,0.5); margin-top: 2px; }

  /* ===== STATS BAR ===== */
  .stats-bar {
    background: linear-gradient(135deg, var(--green-mid), var(--teal));
    padding: 32px 40px;
  }
  .stats-bar-inner { max-width: 1200px; margin: 0 auto; display: flex; justify-content: space-around; gap: 20px; flex-wrap: wrap; }
  .stat-item { text-align: center; color: white; }
  .stat-num { font-size: 32px; font-weight: 900; }
  .stat-label { font-size: 13px; opacity: 0.85; margin-top: 4px; }

  /* ===== SECTIONS ===== */
  section { padding: 80px 40px; }
  .section-inner { max-width: 1200px; margin: 0 auto; }
  .section-tag {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--green-pale); color: var(--green-dark); border-radius: 100px;
    padding: 5px 14px; font-size: 13px; font-weight: 700; margin-bottom: 16px;
  }
  .section-title { font-size: 40px; font-weight: 900; color: var(--green-dark); margin-bottom: 16px; line-height: 1.2; }
  .section-sub { font-size: 17px; color: var(--gray-600); max-width: 600px; line-height: 1.7; }

  /* ===== FEATURES ===== */
  .features-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; margin-top: 48px; }
  .feature-card {
    background: var(--white); border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg); padding: 32px; transition: all 0.3s; cursor: pointer;
    position: relative; overflow: hidden;
  }
  .feature-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, var(--green), var(--green-light));
    transform: scaleX(0); transition: transform 0.3s; transform-origin: left;
  }
  .feature-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); border-color: var(--green-pale); }
  .feature-card:hover::before { transform: scaleX(1); }
  .feature-icon {
    width: 56px; height: 56px; border-radius: 14px; display: flex; align-items: center;
    justify-content: center; font-size: 26px; margin-bottom: 20px;
  }
  .fc-1 .feature-icon { background: var(--blue-light); }
  .fc-2 .feature-icon { background: var(--green-pale); }
  .fc-3 .feature-icon { background: var(--teal-light); }
  .fc-4 .feature-icon { background: var(--amber-light); }
  .feature-tag {
    display: inline-block; font-size: 11px; font-weight: 700; padding: 3px 10px;
    border-radius: 100px; margin-bottom: 12px; letter-spacing: 0.5px; text-transform: uppercase;
  }
  .fc-1 .feature-tag { background: var(--blue-light); color: var(--blue); }
  .fc-2 .feature-tag { background: var(--green-pale); color: var(--green-dark); }
  .fc-3 .feature-tag { background: var(--teal-light); color: var(--teal); }
  .fc-4 .feature-tag { background: var(--amber-light); color: var(--amber); }
  .feature-title { font-size: 20px; font-weight: 800; color: var(--gray-800); margin-bottom: 10px; }
  .feature-desc { font-size: 14px; color: var(--gray-600); line-height: 1.7; margin-bottom: 16px; }
  .feature-bullets { list-style: none; }
  .feature-bullets li { font-size: 13px; color: var(--gray-600); padding: 4px 0; display: flex; gap: 8px; align-items: flex-start; }
  .feature-bullets li::before { content: '✓'; color: var(--green); font-weight: 700; flex-shrink: 0; margin-top: 1px; }

  /* ===== DEMO SECTION ===== */
  #demo { background: var(--gray-100); }
  .demo-tabs { display: flex; gap: 8px; margin: 40px 0 24px; flex-wrap: wrap; -webkit-overflow-scrolling: touch; }
  .demo-tab {
    display: flex; align-items: center; gap: 8px; padding: 12px 24px;
    border: 2px solid var(--gray-200); background: var(--white); border-radius: 100px;
    font-size: 14px; font-weight: 600; cursor: pointer; color: var(--gray-600); transition: all 0.2s;
  }
  .demo-tab.active { background: var(--green-mid); color: white; border-color: var(--green-mid); }
  .demo-tab:hover:not(.active) { border-color: var(--green); color: var(--green); }
  .demo-panel { display: none; animation: fadeIn 0.3s ease; }
  .demo-panel.active { display: block; }
  @keyframes fadeIn { from{opacity:0;transform:translateY(8px)} to{opacity:1;transform:translateY(0)} }

  /* ===== WEATHER DEMO ===== */
  .weather-grid { display: grid; grid-template-columns: 1fr 2fr; gap: 20px; }
  .weather-current {
    background: linear-gradient(135deg, #1565C0, #1976D2);
    border-radius: var(--radius-lg); padding: 28px; color: white;
  }
  .weather-location { font-size: 13px; opacity: 0.8; margin-bottom: 8px; }
  .weather-temp { font-size: 64px; font-weight: 900; line-height: 1; }
  .weather-desc { font-size: 18px; opacity: 0.9; margin: 8px 0 20px; }
  .weather-details { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .wd-item { background: rgba(255,255,255,0.12); border-radius: 10px; padding: 12px; }
  .wd-label { font-size: 11px; opacity: 0.7; margin-bottom: 4px; }
  .wd-val { font-size: 18px; font-weight: 700; }
  .weather-forecast-panel {
    background: var(--white); border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow);
  }
  .forecast-title { font-size: 14px; font-weight: 700; color: var(--gray-800); margin-bottom: 16px; }
  .forecast-days { display: flex; gap: 8px; margin-bottom: 20px; overflow-x: auto; padding-bottom: 4px; }
  .fd-day {
    flex: 0 0 auto; background: var(--gray-100); border-radius: 12px; padding: 12px 16px;
    text-align: center; cursor: pointer; transition: all 0.2s; min-width: 80px;
  }
  .fd-day.active { background: var(--green); color: white; }
  .fd-day-name { font-size: 12px; font-weight: 600; }
  .fd-day-icon { font-size: 22px; margin: 6px 0; }
  .fd-day-temp { font-size: 14px; font-weight: 700; }
  .chart-container { position: relative; height: 160px; }
  .weather-alert {
    background: #FFF3E0; border: 1px solid #FFB74D; border-radius: 10px; padding: 12px 16px;
    display: flex; align-items: flex-start; gap: 10px; margin-top: 16px; font-size: 13px;
  }

  /* ===== CROPGUARD DEMO ===== */
  .cropguard-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
  .upload-zone {
    background: var(--white); border: 2px dashed var(--gray-400); border-radius: var(--radius-lg);
    padding: 32px; text-align: center; cursor: pointer; transition: all 0.3s; min-height: 280px;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
  }
  .upload-zone:hover, .upload-zone.drag-over {
    border-color: var(--green); background: var(--green-pale);
  }
  .upload-zone input { display: none; }
  .upload-icon { font-size: 48px; margin-bottom: 16px; }
  .upload-title { font-size: 16px; font-weight: 700; color: var(--gray-800); margin-bottom: 8px; }
  .upload-sub { font-size: 13px; color: var(--gray-600); }
  .sample-crops { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; justify-content: center; }
  .sample-btn {
    background: var(--green-pale); color: var(--green-dark); border: none; border-radius: 8px;
    padding: 6px 12px; font-size: 12px; font-weight: 600; cursor: pointer; transition: all 0.2s;
  }
  .sample-btn:hover { background: var(--green); color: white; }
  .detection-result { background: var(--white); border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow); min-height: 280px; }
  .result-placeholder { color: var(--gray-400); text-align: center; padding: 60px 20px; }
  .result-placeholder-icon { font-size: 48px; margin-bottom: 12px; }
  .result-content { display: none; }
  .result-disease-name { font-size: 20px; font-weight: 800; color: var(--red); margin-bottom: 8px; }
  .result-confidence {
    display: flex; align-items: center; gap: 12px; margin-bottom: 16px;
  }
  .confidence-bar { flex: 1; height: 8px; background: var(--gray-200); border-radius: 4px; overflow: hidden; }
  .confidence-fill { height: 100%; border-radius: 4px; background: linear-gradient(90deg, #EF9A9A, var(--red)); transition: width 1s ease; }
  .result-detail { font-size: 13px; color: var(--gray-600); line-height: 1.6; margin-bottom: 16px; }
  .result-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
  .result-tag { background: var(--gray-100); color: var(--gray-800); border-radius: 6px; padding: 4px 10px; font-size: 12px; font-weight: 600; }
  .result-solution { background: var(--green-pale); border-left: 3px solid var(--green); padding: 12px 16px; border-radius: 0 8px 8px 0; font-size: 13px; color: var(--green-dark); }
  .ai-analyzing {
    display: none; text-align: center; padding: 60px 20px; color: var(--green);
  }
  .ai-spinner { font-size: 36px; animation: spin 1.2s linear infinite; margin-bottom: 12px; }
  @keyframes spin { from{transform:rotate(0)} to{transform:rotate(360deg)} }

  /* ===== SMARTFARM DEMO ===== */
  .farm-layout { display: grid; grid-template-columns: repeat(3, 1fr) 1fr; gap: 16px; }
  .farm-layout-bottom { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; margin-top: 16px; }
  .sensor-card {
    background: var(--white); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow);
    transition: all 0.3s;
  }
  .sensor-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
  .sensor-label { font-size: 12px; color: var(--gray-600); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px; }
  .sensor-value { font-size: 36px; font-weight: 900; line-height: 1; }
  .sensor-unit { font-size: 14px; color: var(--gray-600); margin-left: 2px; }
  .sensor-status { font-size: 12px; margin-top: 6px; display: flex; align-items: center; gap: 4px; }
  .status-dot { width: 7px; height: 7px; border-radius: 50%; }
  .s-good { color: var(--green); }
  .s-warn { color: var(--amber); }
  .s-bad { color: var(--red); }
  .s-good .status-dot { background: var(--green); }
  .s-warn .status-dot { background: var(--amber); }
  .s-bad .status-dot { background: var(--red); }
  .farm-control-panel {
    background: var(--white); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); grid-row: span 1;
  }
  .control-title { font-size: 13px; font-weight: 700; color: var(--gray-800); margin-bottom: 14px; }
  .toggle-row { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--gray-200); }
  .toggle-row:last-child { border-bottom: none; }
  .toggle-label { font-size: 13px; color: var(--gray-700); }
  .toggle-switch { position: relative; width: 42px; height: 24px; }
  .toggle-switch input { opacity: 0; width: 0; height: 0; }
  .toggle-slider {
    position: absolute; inset: 0; background: var(--gray-400); border-radius: 24px; cursor: pointer;
    transition: 0.3s;
  }
  .toggle-slider::before {
    content: ''; position: absolute; width: 18px; height: 18px; background: white;
    border-radius: 50%; left: 3px; top: 3px; transition: 0.3s;
  }
  .toggle-switch input:checked + .toggle-slider { background: var(--green); }
  .toggle-switch input:checked + .toggle-slider::before { transform: translateX(18px); }
  .farm-chart-panel {
    background: var(--white); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow);
  }
  .chart-title { font-size: 13px; font-weight: 700; color: var(--gray-800); margin-bottom: 4px; }
  .chart-sub { font-size: 11px; color: var(--gray-600); margin-bottom: 12px; }
  .farm-chart-h { position: relative; height: 180px; }
  .farm-alerts { background: var(--white); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
  .alert-item { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--gray-200); font-size: 13px; }
  .alert-item:last-child { border-bottom: none; }
  .alert-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 4px; flex-shrink: 0; }

  /* ===== PRICING ===== */
  .pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 48px; }
  .pricing-card {
    background: var(--white); border: 2px solid var(--gray-200); border-radius: var(--radius-lg);
    padding: 32px; transition: all 0.3s; position: relative; overflow: hidden;
  }
  .pricing-card.featured {
    border-color: var(--green); background: linear-gradient(160deg, var(--green-pale), var(--white));
  }
  .pricing-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); }
  .pricing-badge {
    position: absolute; top: 20px; right: 20px; background: var(--green); color: white;
    font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 100px;
  }
  .pricing-tier { font-size: 13px; font-weight: 700; color: var(--green); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 12px; }
  .pricing-name { font-size: 24px; font-weight: 800; color: var(--gray-800); margin-bottom: 8px; }
  .pricing-price { display: flex; align-items: baseline; gap: 4px; margin-bottom: 20px; }
  .pricing-amount { font-size: 40px; font-weight: 900; color: var(--green-dark); }
  .pricing-period { font-size: 14px; color: var(--gray-600); }
  .pricing-desc { font-size: 14px; color: var(--gray-600); line-height: 1.6; margin-bottom: 24px; }
  .pricing-features { list-style: none; margin-bottom: 28px; }
  .pricing-features li { font-size: 14px; color: var(--gray-700); padding: 7px 0; display: flex; gap: 10px; border-bottom: 1px solid var(--gray-200); }
  .pricing-features li:last-child { border-bottom: none; }
  .pricing-features li .check { color: var(--green); font-weight: 700; }
  .pricing-features li .cross { color: var(--gray-400); }
  .btn-pricing {
    width: 100%; padding: 12px; border-radius: 10px; font-size: 15px; font-weight: 700;
    cursor: pointer; border: 2px solid var(--green); transition: all 0.2s;
  }
  .btn-pricing-outline { background: transparent; color: var(--green); }
  .btn-pricing-solid { background: var(--green); color: white; }
  .btn-pricing:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(67,160,71,0.3); }

  /* ===== TESTIMONIALS ===== */
  #testimonials { background: var(--green-pale); }
  .testimonials-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 48px; }
  .testimonial-card {
    background: var(--white); border-radius: var(--radius-lg); padding: 28px;
    box-shadow: var(--shadow); transition: all 0.3s;
  }
  .testimonial-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
  .testimonial-quote { font-size: 32px; color: var(--green); line-height: 1; margin-bottom: 12px; }
  .testimonial-text { font-size: 14px; color: var(--gray-700); line-height: 1.7; font-style: italic; margin-bottom: 20px; }
  .testimonial-author { display: flex; align-items: center; gap: 12px; }
  .author-avatar {
    width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center;
    justify-content: center; font-size: 18px; font-weight: 700; color: white;
    background: linear-gradient(135deg, var(--green), var(--teal));
    flex-shrink: 0;
  }
  .author-name { font-size: 14px; font-weight: 700; color: var(--gray-800); }
  .author-role { font-size: 12px; color: var(--gray-600); }
  .stars { color: #FFC107; font-size: 14px; margin-bottom: 4px; }

  /* ===== CONTACT ===== */
  .contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: start; }
  .contact-form {
    background: var(--white); border-radius: var(--radius-lg); padding: 40px; box-shadow: var(--shadow);
  }
  .form-group { margin-bottom: 20px; }
  .form-label { font-size: 13px; font-weight: 600; color: var(--gray-700); margin-bottom: 6px; display: block; }
  .form-input, .form-select, .form-textarea {
    width: 100%; padding: 12px 16px; border: 2px solid var(--gray-200); border-radius: 10px;
    font-size: 14px; color: var(--gray-800); transition: border-color 0.2s; font-family: inherit;
    background: var(--white);
  }
  .form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none; border-color: var(--green);
  }
  .form-textarea { resize: vertical; min-height: 100px; }
  .form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
  .btn-submit {
    width: 100%; padding: 14px; background: linear-gradient(135deg, var(--green-mid), var(--green-light));
    color: white; border: none; border-radius: 10px; font-size: 16px; font-weight: 700;
    cursor: pointer; transition: all 0.3s;
  }
  .btn-submit:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(67,160,71,0.4); }
  .contact-info { }
  .contact-info-title { font-size: 32px; font-weight: 800; color: var(--green-dark); margin-bottom: 16px; }
  .contact-info-sub { font-size: 16px; color: var(--gray-600); line-height: 1.7; margin-bottom: 32px; }
  .contact-item { display: flex; gap: 14px; margin-bottom: 20px; align-items: flex-start; }
  .contact-item-icon { width: 44px; height: 44px; background: var(--green-pale); border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
  .contact-item-text { }
  .contact-item-label { font-size: 13px; color: var(--gray-600); margin-bottom: 2px; }
  .contact-item-val { font-size: 15px; font-weight: 600; color: var(--gray-800); }
  .success-msg {
    display: none; background: var(--green-pale); border: 1px solid var(--green);
    border-radius: 10px; padding: 16px; text-align: center; color: var(--green-dark);
    font-weight: 600; margin-top: 12px;
  }

  /* ===== FOOTER ===== */
  footer {
    background: var(--dark); color: white; padding: 60px 40px 24px;
  }
  .footer-inner { max-width: 1200px; margin: 0 auto; }
  .footer-top { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 48px; }
  .footer-brand-tagline { font-size: 14px; color: rgba(255,255,255,0.6); line-height: 1.7; margin-top: 12px; }
  .footer-col-title { font-size: 13px; font-weight: 700; color: rgba(255,255,255,0.5); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 16px; }
  .footer-links { list-style: none; }
  .footer-links li { margin-bottom: 10px; }
  .footer-links a { color: rgba(255,255,255,0.7); text-decoration: none; font-size: 14px; transition: color 0.2s; }
  .footer-links a:hover { color: var(--green-light); }
  .footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 24px; display: flex; justify-content: space-between; align-items: center; }
  .footer-copy { font-size: 13px; color: rgba(255,255,255,0.4); }
  .footer-socials { display: flex; gap: 12px; }
  .social-btn {
    width: 36px; height: 36px; background: rgba(255,255,255,0.08); border-radius: 8px;
    display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,0.6);
    text-decoration: none; font-size: 16px; transition: all 0.2s;
  }
  .social-btn:hover { background: var(--green); color: white; }

  /* ===== FLOATING CTA ===== */
  .floating-demo-btn {
    position: fixed; bottom: 28px; right: 28px; z-index: 999;
    background: linear-gradient(135deg, var(--green-mid), var(--green-light));
    color: white; border: none; border-radius: 100px; padding: 14px 24px;
    font-size: 14px; font-weight: 700; cursor: pointer; box-shadow: 0 6px 24px rgba(67,160,71,0.5);
    display: flex; align-items: center; gap: 8px; transition: all 0.3s;
    text-decoration: none;
  }
  .floating-demo-btn:hover { transform: translateY(-3px) scale(1.03); box-shadow: 0 10px 32px rgba(67,160,71,0.6); }


  /* ===== AGROLINK DEMO ===== */
  .agrolink-layout { display: flex; flex-direction: column; gap: 16px; }
  .al-kpi-row { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; }
  .al-kpi-card {
    background: var(--white); border-radius: var(--radius); padding: 20px;
    box-shadow: var(--shadow); text-align: center; transition: all 0.3s;
  }
  .al-kpi-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
  .al-kpi-icon { font-size: 28px; margin-bottom: 8px; }
  .al-kpi-val { font-size: 28px; font-weight: 900; color: var(--green-dark); }
  .al-kpi-label { font-size: 12px; color: var(--gray-600); margin-top: 4px; }
  .al-main-row { display: flex; gap: 16px; }
  .al-panel { background: var(--white); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
  .al-panel-title { font-size: 13px; font-weight: 700; color: var(--gray-800); margin-bottom: 14px; }
  .al-table { width: 100%; border-collapse: collapse; font-size: 13px; }
  .al-table th { background: var(--gray-100); padding: 10px 12px; text-align: left; font-size: 12px; font-weight: 700; color: var(--gray-600); border-bottom: 2px solid var(--gray-200); }
  .al-table td { padding: 10px 12px; border-bottom: 1px solid var(--gray-200); color: var(--gray-800); }
  .al-table tr:hover td { background: var(--green-pale); }
  .al-badge { display: inline-block; padding: 3px 10px; border-radius: 100px; font-size: 11px; font-weight: 700; }
  .al-badge-transit { background: #FFF3E0; color: #E65100; }
  .al-badge-done { background: var(--green-pale); color: var(--green-dark); }
  .al-badge-process { background: var(--blue-light); color: var(--blue); }
  .al-trace-search { display: flex; gap: 8px; margin-bottom: 12px; }
  .al-trace-input { flex: 1; padding: 8px 12px; border: 2px solid var(--gray-200); border-radius: 8px; font-size: 13px; font-family: inherit; }
  .al-trace-input:focus { outline: none; border-color: var(--green); }
  .al-trace-btn { background: var(--green); color: white; border: none; border-radius: 8px; padding: 8px 16px; font-size: 13px; font-weight: 700; cursor: pointer; white-space: nowrap; transition: background 0.2s; }
  .al-trace-btn:hover { background: var(--green-mid); }
  .al-trace-result { }
  .al-trace-step { display: flex; gap: 10px; align-items: flex-start; padding: 7px 0; position: relative; }
  .al-trace-step:not(:last-child)::after { content:''; position:absolute; left:7px; top:22px; bottom:-4px; width:2px; background:var(--gray-200); }
  .al-ts-dot { width: 16px; height: 16px; border-radius: 50%; background: var(--green); flex-shrink: 0; margin-top: 2px; }
  .al-ts-title { font-size: 13px; font-weight: 700; color: var(--gray-800); }
  .al-ts-sub { font-size: 11px; color: var(--gray-600); margin-top: 2px; }

  /* ==============================================
     HAMBURGER BUTTON
  ============================================== */
  .hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
    transition: background 0.2s;
    flex-shrink: 0;
  }
  .hamburger:hover { background: var(--gray-100); }
  .hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--gray-800);
    border-radius: 2px;
    transition: all 0.3s;
  }
  .hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
  .hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .mobile-menu {
    display: none;
    position: fixed;
    top: 68px;
    left: 0;
    right: 0;
    background: white;
    border-bottom: 1px solid var(--gray-200);
    padding: 16px 20px 20px;
    z-index: 999;
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    flex-direction: column;
    gap: 4px;
  }
  .mobile-menu.open { display: flex; }
  .mobile-menu a {
    display: block;
    padding: 12px 16px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--gray-800);
    font-size: 15px;
    font-weight: 600;
    transition: background 0.2s;
  }
  .mobile-menu a:hover { background: var(--green-pale); color: var(--green-dark); }
  .mobile-menu .mobile-cta {
    margin-top: 8px;
    display: block;
    text-align: center;
    background: linear-gradient(135deg, var(--green-mid), var(--green-light));
    color: white;
    border-radius: 10px;
    padding: 13px;
    font-weight: 700;
  }

  /* ==============================================
     ≤ 1200px  Large tablet / small laptop
  ============================================== */
  @media (max-width: 1200px) {
    .section-inner      { max-width: 100%; padding-inline: 32px; }
    .hero-content       { gap: 32px; }
    .hero h1            { font-size: 44px; }
    .stats-bar-inner    { gap: 16px; }
    .stat-num           { font-size: 26px; }
    .features-grid      { gap: 20px; }
    .pricing-grid       { gap: 16px; }
    .farm-layout        { grid-template-columns: repeat(3, 1fr); }
    .al-kpi-row         { gap: 12px; }
    .footer-top         { grid-template-columns: 1fr 1fr 1fr; gap: 24px; }
    .footer-top > div:first-child { grid-column: 1 / -1; }
  }

  /* ==============================================
     ≤ 900px  Tablet
  ============================================== */
  @media (max-width: 900px) {
    /* --- Navbar --- */
    nav                     { padding: 0 20px; }
    .nav-links              { display: none; }
    .nav-right .btn-primary { display: none; }
    .hamburger              { display: flex; }

    /* --- Hero --- */
    .hero                   { padding: 90px 24px 56px; min-height: auto; }
    .hero-content           { grid-template-columns: 1fr; }
    .hero-visual            { display: none; }
    .hero h1                { font-size: 36px; }
    .hero-sub               { font-size: 15px; }
    .hero-stats             { gap: 24px; flex-wrap: wrap; }
    .hero-stat-num          { font-size: 22px; }

    /* --- Stats bar --- */
    .stats-bar              { padding: 24px 20px; }
    .stats-bar-inner        { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; justify-items: center; }

    /* --- Sections --- */
    section                 { padding: 56px 24px; }
    .section-inner          { padding-inline: 0; }
    .section-title          { font-size: 30px; }
    .section-sub            { font-size: 15px; }

    /* --- Features --- */
    .features-grid          { grid-template-columns: 1fr; gap: 16px; }
    .feature-card           { padding: 24px; }

    /* --- Demo --- */
    .demo-tabs              { gap: 6px; flex-wrap: wrap; }
    .demo-tab               { padding: 10px 16px; font-size: 13px; }
    .weather-grid           { grid-template-columns: 1fr; gap: 16px; }
    .cropguard-layout       { grid-template-columns: 1fr; gap: 16px; }
    .farm-layout            { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .farm-layout-bottom     { grid-template-columns: 1fr; gap: 12px; }
    .al-kpi-row             { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .al-main-row            { flex-direction: column; gap: 12px; }
    .al-table               { font-size: 12px; }
    .al-table th,
    .al-table td            { padding: 8px; }

    /* --- Pricing --- */
    .pricing-grid           { grid-template-columns: 1fr; gap: 16px; }
    .pricing-card           { max-width: 480px; margin-inline: auto; width: 100%; }

    /* --- Testimonials --- */
    .testimonials-grid      { grid-template-columns: 1fr; gap: 16px; }
    .testimonial-card       { max-width: 520px; margin-inline: auto; width: 100%; }

    /* --- Contact --- */
    .contact-grid           { grid-template-columns: 1fr; gap: 32px; }
    .contact-form           { padding: 28px; }

    /* --- Footer --- */
    .footer-top             { grid-template-columns: repeat(2, 1fr); gap: 28px; }
    .footer-top > div:first-child { grid-column: 1 / -1; }
    .footer-bottom          { flex-direction: column; gap: 12px; text-align: center; }
  }

  /* ==============================================
     ≤ 600px  Mobile
  ============================================== */
  @media (max-width: 600px) {
    /* --- Navbar --- */
    .lang-toggle            { display: none; }

    /* --- Hero --- */
    .hero                   { padding: 82px 16px 48px; }
    .hero h1                { font-size: 28px; line-height: 1.2; letter-spacing: -0.3px; }
    .hero-sub               { font-size: 14px; line-height: 1.6; }
    .hero-badge             { font-size: 12px; padding: 5px 12px; }
    .hero-ctas              { flex-direction: column; gap: 10px; }
    .btn-hero-primary,
    .btn-hero-secondary     { width: 100%; justify-content: center; text-align: center; padding: 14px 20px; }
    .hero-stats             { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 32px; }
    .hero-stat-num          { font-size: 18px; }
    .hero-stat-label        { font-size: 10px; line-height: 1.4; }

    /* --- Stats bar --- */
    .stats-bar              { padding: 20px 16px; }
    .stats-bar-inner        { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .stat-num               { font-size: 20px; }
    .stat-label             { font-size: 11px; }

    /* --- Sections --- */
    section                 { padding: 44px 16px; }
    .section-title          { font-size: 24px; }
    .section-sub            { font-size: 14px; }

    /* --- Demo tabs: horizontal scroll --- */
    .demo-tabs              { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 8px;
                              -webkit-overflow-scrolling: touch; scrollbar-width: none;
                              gap: 8px; margin-bottom: 16px; }
    .demo-tabs::-webkit-scrollbar { display: none; }
    .demo-tab               { flex: 0 0 auto; font-size: 12px; padding: 9px 14px; white-space: nowrap; }

    /* --- Weather --- */
    .weather-temp           { font-size: 48px; }
    .weather-details        { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .weather-forecast-panel { padding: 16px; }
    .forecast-days          { gap: 4px; }
    .fd-day                 { min-width: 52px; padding: 8px 4px; }
    .fd-day-name            { font-size: 10px; }
    .fd-day-icon            { font-size: 18px; margin: 4px 0; }
    .fd-day-temp            { font-size: 12px; }
    .chart-container        { height: 140px; }
    .weather-current        { padding: 20px; }

    /* --- CropGuard --- */
    .upload-zone            { padding: 24px 16px; min-height: 200px; }
    .upload-icon            { font-size: 36px; margin-bottom: 10px; }
    .upload-title           { font-size: 14px; }
    .detection-result       { min-height: 200px; padding: 16px; }
    .sample-crops           { gap: 6px; justify-content: center; }

    /* --- SmartFarm --- */
    .farm-layout            { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .sensor-card            { padding: 14px; }
    .sensor-label           { font-size: 11px; }
    .sensor-value           { font-size: 26px; }
    .sensor-status          { font-size: 11px; }
    .farm-control-panel     { grid-column: 1 / -1; }
    .farm-chart-h           { height: 150px; }

    /* --- AgroLink --- */
    .al-kpi-row             { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .al-kpi-card            { padding: 14px 10px; }
    .al-kpi-val             { font-size: 20px; }
    .al-kpi-label           { font-size: 11px; }
    .al-kpi-icon            { font-size: 22px; margin-bottom: 6px; }
    .al-panel               { padding: 14px; overflow-x: auto; }
    .al-table               { min-width: 460px; font-size: 12px; }
    .al-trace-search        { flex-direction: row; gap: 6px; }
    .al-trace-input         { font-size: 12px; }

    /* --- Pricing --- */
    .pricing-card           { padding: 24px 18px; }
    .pricing-amount         { font-size: 34px; }
    .pricing-name           { font-size: 20px; }

    /* --- Testimonials --- */
    .testimonial-card       { padding: 20px; }

    /* --- Contact --- */
    .contact-info-title     { font-size: 24px; }
    .contact-form           { padding: 20px 16px; }
    .form-grid-2            { grid-template-columns: 1fr; gap: 0; }

    /* --- Footer --- */
    .footer-top             { grid-template-columns: 1fr; gap: 20px; }
    footer                  { padding: 36px 16px 20px; }

    /* --- Floating btn --- */
    .floating-demo-btn      { bottom: 14px; right: 14px; padding: 11px 16px; font-size: 13px; }
  }

  /* ==============================================
     ≤ 400px  Small phones
  ============================================== */
  @media (max-width: 400px) {
    nav                     { height: 60px; }
    .mobile-menu            { top: 60px; }
    .hero                   { padding: 72px 14px 40px; }
    .hero h1                { font-size: 24px; }
    .hero-stats             { grid-template-columns: repeat(3, 1fr); gap: 8px; }
    .hero-stat-num          { font-size: 16px; }
    .section-title          { font-size: 22px; }
    .stats-bar-inner        { grid-template-columns: 1fr; gap: 10px; }
    .al-kpi-row             { grid-template-columns: repeat(2, 1fr); }
    .sensor-value           { font-size: 22px; }
    .demo-tab               { font-size: 11px; padding: 8px 11px; }
    .weather-temp           { font-size: 40px; }
    .pricing-amount         { font-size: 28px; }
    .btn-hero-primary,
    .btn-hero-secondary     { font-size: 14px; padding: 13px 16px; }
  }

/* =====================================================
   DASHBOARD SPA — appended to agrixa_style.css
===================================================== */

/* ─── SPA view management ─── */
.spa-view        { display: none; }
.spa-view.active { display: block; }
body.in-app .landing-only  { display: none !important; }
body.in-app .floating-demo-btn { display: none !important; }

/* ─── Auth overlay ─── */
.auth-overlay {
  position: fixed; inset: 0; z-index: 2000;
  background: linear-gradient(135deg, #0D1B0F, #1B5E20);
  flex-direction: column; padding: 20px; overflow-y: auto;
}
.auth-overlay.spa-view.active { display: flex; }
.auth-box {
  flex: none; margin: auto;
  background: #fff; border-radius: 20px; padding: clamp(24px, 6vw, 40px);
  width: 100%; max-width: 420px; box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.auth-box.wide { max-width: 500px; }
.auth-logo-img { height: 52px; width: auto; display: block; margin: 0 auto 24px; }
.auth-h1  { font-size: 24px; font-weight: 800; text-align: center; color: #1a1a2e; margin-bottom: 6px; }
.auth-sub { font-size: 14px; color: #757575; text-align: center; margin-bottom: 28px; }
.a-form-group { margin-bottom: 16px; }
.a-form-row2  { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.a-label  { display: block; font-size: 13px; font-weight: 600; color: #424242; margin-bottom: 6px; }
.a-input  {
  width: 100%; padding: 11px 14px; border: 2px solid #EEE; border-radius: 10px;
  font-size: 14px; font-family: inherit; transition: border-color .2s;
}
.a-input:focus { outline: none; border-color: #43A047; }
.a-btn {
  width: 100%; padding: 13px; background: linear-gradient(135deg, #2E7D32, #76C442);
  color: #fff; border: none; border-radius: 10px; font-size: 15px; font-weight: 700;
  cursor: pointer; margin-top: 4px; transition: all .2s;
}
.a-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(67,160,71,.45); }
.a-switch { text-align: center; font-size: 14px; color: #757575; margin-top: 18px; }
.a-switch a { color: #43A047; font-weight: 700; cursor: pointer; text-decoration: none; }
.a-demo   { background: #F5F5F5; border-radius: 8px; padding: 10px 14px;
            text-align: center; font-size: 12px; color: #757575; margin-top: 12px; }
.a-demo code { background: #E8F5E9; color: #1B5E20; padding: 2px 6px; border-radius: 4px; }
.a-err  { background: #FFEBEE; color: #C62828; border-radius: 8px; padding: 10px 14px;
          font-size: 13px; margin-bottom: 14px; display: none; }
.a-err.show { display: block; }

/* ─── Dashboard shell ─── */
.db-shell   { display: flex; min-height: 100vh; }

.db-sidebar {
  width: 240px; flex-shrink: 0; background: #1a1a2e;
  display: flex; flex-direction: column; position: fixed;
  top: 0; left: 0; bottom: 0; z-index: 300; transition: transform .3s;
}
.db-sidebar-logo { padding: 20px; border-bottom: 1px solid rgba(255,255,255,.08); }
.db-sidebar-logo img { height: 48px; width: auto; }
.db-nav  { flex: 1; padding: 14px 10px; display: flex; flex-direction: column; gap: 3px; overflow-y: auto; }
.db-nav-item {
  display: flex; align-items: center; gap: 11px; padding: 11px 14px;
  border-radius: 9px; text-decoration: none; cursor: pointer;
  color: rgba(255,255,255,.62); font-size: 14px; font-weight: 500; transition: all .2s;
  border: none; background: none; width: 100%; text-align: left;
}
.db-nav-item:hover  { background: rgba(255,255,255,.08); color: #fff; }
.db-nav-item.active { background: #43A047; color: #fff; font-weight: 700; }
.db-nav-icon { font-size: 18px; flex-shrink: 0; }
.db-sidebar-foot {
  padding: 14px 12px; border-top: 1px solid rgba(255,255,255,.08);
  display: flex; align-items: center; gap: 10px;
}
.db-avatar {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg,#43A047,#00695C);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 700; color: #fff;
}
.db-user-name { font-size: 13px; font-weight: 700; color: #fff; }
.db-user-farm { font-size: 11px; color: rgba(255,255,255,.4); }
.db-logout {
  margin-left: auto; background: none; border: none; cursor: pointer;
  color: rgba(255,255,255,.4); font-size: 18px; transition: color .2s;
}
.db-logout:hover { color: #EF9A9A; }

.db-topbar {
  display: none; position: fixed; top: 0; left: 0; right: 0; height: 58px;
  background: #1a1a2e; z-index: 400; align-items: center; padding: 0 16px; gap: 12px;
}
.db-menu-btn { background: none; border: none; color: #fff; font-size: 22px; cursor: pointer; }
.db-topbar-logo { height: 30px; }
.db-topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.db-topbar-name  { font-size: 12px; color: rgba(255,255,255,.6); }
.db-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 299; }

.db-main  { margin-left: 240px; flex: 1; min-height: 100vh; background: #F5F5F5; }
.db-page  { display: none; padding: 28px 32px; max-width: 1360px; }
.db-page.active { display: block; }

/* ─── Page headers ─── */
.db-page-hdr { display: flex; align-items: flex-start; justify-content: space-between;
               gap: 12px; margin-bottom: 26px; flex-wrap: wrap; }
.db-page-title { font-size: 24px; font-weight: 800; color: #1a1a2e; }
.db-page-sub   { font-size: 13px; color: #757575; margin-top: 4px; }
.db-live-badge { background: #E8F5E9; color: #1B5E20; border: 1px solid #43A047;
                 border-radius: 100px; padding: 5px 14px; font-size: 12px; font-weight: 700;
                 animation: pulse 2s infinite; }

/* ─── KPI row ─── */
.db-kpi-row { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; margin-bottom: 22px; }
.db-kpi { background:#fff; border-radius:12px; padding:18px; box-shadow:0 2px 10px rgba(0,0,0,.07);
          border-top: 3px solid transparent; transition: box-shadow .2s; }
.db-kpi:hover { box-shadow: 0 4px 20px rgba(0,0,0,.12); }
.db-kpi-g { border-top-color:#43A047; } .db-kpi-b { border-top-color:#1565C0; }
.db-kpi-a { border-top-color:#E65100; } .db-kpi-t { border-top-color:#00695C; }
.db-kpi-r { border-top-color:#C62828; }
.db-kpi-icon { font-size:22px; margin-bottom:6px; }
.db-kpi-val  { font-size:30px; font-weight:900; color:#1a1a2e; line-height:1.1; }
.db-kpi-lbl  { font-size:12px; color:#757575; margin-top:3px; }
.db-kpi-sub  { font-size:11px; color:#9E9E9E; margin-top:2px; }

/* ─── Cards ─── */
.db-card { background:#fff; border-radius:12px; padding:20px 22px; box-shadow:0 2px 10px rgba(0,0,0,.07); }
.db-card-hdr { display:flex; align-items:center; justify-content:space-between; margin-bottom:14px; gap:10px; flex-wrap:wrap; }
.db-card-title { font-size:14px; font-weight:700; color:#424242; }
.db-card-link  { font-size:13px; color:#43A047; text-decoration:none; font-weight:600; cursor:pointer; }
.db-grid2 { display:grid; grid-template-columns:1fr 1fr; gap:16px; margin-bottom:18px; }
.db-grid3 { display:grid; grid-template-columns:repeat(3,1fr); gap:14px; margin-bottom:18px; }

/* ─── Sensor cards ─── */
.db-sensor-card { background:#fff; border-radius:12px; padding:18px; box-shadow:0 2px 10px rgba(0,0,0,.07); }
.db-sc-hdr { display:flex; justify-content:space-between; align-items:center; margin-bottom:14px; }
.db-sc-plot { font-size:15px; font-weight:800; color:#1B5E20; }
.db-sc-ok   { font-size:11px; font-weight:600; color:#43A047; }
.db-sc-metrics { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; }
.db-sc-m   { text-align:center; background:#F5F5F5; border-radius:8px; padding:10px 6px; }
.db-sc-mi  { font-size:18px; }
.db-sc-mv  { font-size:18px; font-weight:800; color:#1a1a2e; margin:4px 0; }
.db-sc-ml  { font-size:10px; color:#757575; }
.db-sc-upd { font-size:11px; color:#BDBDBD; margin-top:10px; text-align:right; }
.db-chart-wrap { position:relative; height:200px; margin-top:8px; }

/* ─── Pest table ─── */
.db-table-wrap { overflow-x:auto; }
.db-table { width:100%; border-collapse:collapse; font-size:13px; min-width:620px; }
.db-table th { background:#F5F5F5; padding:9px 11px; text-align:left; font-size:11px;
               font-weight:700; color:#757575; border-bottom:2px solid #EEE; white-space:nowrap; }
.db-table td { padding:10px 11px; border-bottom:1px solid #EEE; vertical-align:middle; }
.db-table tr:hover td { background:#E8F5E9; }
.db-sev { padding:3px 9px; border-radius:100px; font-size:11px; font-weight:700; white-space:nowrap; }
.db-sev-h { background:#FFEBEE; color:#C62828; }
.db-sev-m { background:#FFF3E0; color:#E65100; }
.db-sev-l { background:#E8F5E9; color:#1B5E20; }
.db-st-open   { background:#FFF3E0; color:#E65100; padding:3px 9px; border-radius:100px; font-size:11px; font-weight:700; }
.db-st-done   { background:#E8F5E9; color:#1B5E20; padding:3px 9px; border-radius:100px; font-size:11px; font-weight:700; }
.db-plot-chip { background:#E0F2F1; color:#00695C; border-radius:6px; padding:2px 8px; font-size:12px; font-weight:700; }
.db-conf-bar  { height:5px; background:#EEE; border-radius:3px; overflow:hidden; margin-bottom:3px; }
.db-conf-fill { height:100%; background:linear-gradient(90deg,#43A047,#76C442); border-radius:3px; }

/* ─── Weather ─── */
.db-weather-grid { display:grid; grid-template-columns:260px 1fr; gap:16px; }
.db-weather-now  { background:linear-gradient(135deg,#1565C0,#1976D2); border-radius:12px; padding:22px; color:#fff; }
.db-wn-loc  { font-size:12px; opacity:.8; margin-bottom:6px; }
.db-wn-temp { font-size:60px; font-weight:900; line-height:1; }
.db-wn-icon { font-size:36px; margin:8px 0; }
.db-wn-grid { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin-top:14px; }
.db-wn-item { background:rgba(255,255,255,.15); border-radius:8px; padding:9px 10px; }
.db-wn-lbl  { font-size:10px; opacity:.7; }
.db-wn-val  { font-size:18px; font-weight:700; }
.db-w-alert { background:rgba(255,165,0,.25); border:1px solid rgba(255,165,0,.5);
              border-radius:8px; padding:9px 12px; margin-top:10px; font-size:12px; }
.db-fc-row  { display:flex; gap:6px; overflow-x:auto; padding-bottom:4px; margin-bottom:12px; }
.db-fc-day  { flex:0 0 auto; text-align:center; background:#F5F5F5; border-radius:9px;
              padding:9px 12px; min-width:66px; cursor:pointer; transition:background .2s; }
.db-fc-day.today { background:#43A047; color:#fff; }
.db-fc-name { font-size:11px; font-weight:700; }
.db-fc-icon { font-size:20px; margin:5px 0; }
.db-fc-temp { font-size:14px; font-weight:700; }
.db-fc-rain { font-size:10px; color:#64B5F6; }
.db-fc-day.today .db-fc-rain { color:rgba(255,255,255,.8); }
.db-adv-list { display:flex; flex-direction:column; gap:7px; }
.db-adv-ok   { background:#E8F5E9; color:#1B5E20; padding:9px 12px; border-radius:8px; font-size:13px; }
.db-adv-warn { background:#FFF3E0; color:#E65100; padding:9px 12px; border-radius:8px; font-size:13px; }

/* ─── Controls ─── */
.db-ctrl-sel {
  padding:6px 11px; border:1.5px solid #EEE; border-radius:8px;
  font-size:12px; color:#424242; background:#fff; cursor:pointer; font-family:inherit;
}
.db-ctrl-sel:focus { outline:none; border-color:#43A047; }
.db-btn-add {
  background:linear-gradient(135deg,#2E7D32,#76C442); color:#fff; border:none;
  border-radius:9px; padding:9px 18px; font-size:13px; font-weight:700; cursor:pointer; transition:all .2s;
}
.db-btn-add:hover { transform:translateY(-1px); box-shadow:0 4px 12px rgba(67,160,71,.4); }
.db-btn-sm  { padding:5px 10px; font-size:11px; font-weight:700; border:none; border-radius:6px;
              background:#E8F5E9; color:#1B5E20; cursor:pointer; transition:all .2s; }
.db-btn-sm:hover { background:#43A047; color:#fff; }

/* ─── Add-pest modal ─── */
.db-modal-bg { display:none; position:fixed; inset:0; background:rgba(0,0,0,.5); z-index:1000; }
.db-modal-bg.open { display:flex; align-items:center; justify-content:center; padding:20px; }
.db-modal { background:#fff; border-radius:14px; width:100%; max-width:500px;
            max-height:92vh; overflow-y:auto; box-shadow:0 20px 60px rgba(0,0,0,.2); }
.db-modal-hdr { display:flex; justify-content:space-between; align-items:center;
                padding:18px 22px; border-bottom:1px solid #EEE; }
.db-modal-hdr h3 { font-size:16px; font-weight:700; }
.db-modal-x { background:none; border:none; font-size:18px; cursor:pointer; color:#757575; }
.db-modal-body { padding:18px 22px; }
.db-modal-foot { display:flex; justify-content:flex-end; gap:10px; padding:14px 22px;
                 border-top:1px solid #EEE; }
.db-btn-cancel { background:none; border:1.5px solid #BDBDBD; border-radius:8px; padding:8px 16px;
                 font-size:13px; font-weight:600; cursor:pointer; color:#757575; }

/* ─── Misc ─── */
.db-empty { text-align:center; color:#BDBDBD; padding:36px; font-size:14px; }
.db-quick-links { display:grid; grid-template-columns:repeat(3,1fr); gap:14px; margin-top:18px; }
.db-ql { background:#fff; border-radius:12px; padding:18px; box-shadow:0 2px 10px rgba(0,0,0,.07);
         cursor:pointer; transition:all .2s; border-left:4px solid transparent; }
.db-ql:hover { transform:translateY(-2px); box-shadow:0 6px 20px rgba(0,0,0,.12); }
.db-ql-b { border-left-color:#1565C0; } .db-ql-g { border-left-color:#43A047; } .db-ql-a { border-left-color:#E65100; }
.db-ql-icon  { font-size:26px; margin-bottom:8px; }
.db-ql-title { font-size:14px; font-weight:700; color:#424242; }
.db-ql-sub   { font-size:12px; color:#757575; margin-top:3px; }
.db-clock    { font-size:12px; color:#757575; }
.db-pest-mini { display:flex; flex-direction:column; gap:10px; }
.db-pm-item  { display:flex; align-items:center; gap:10px; padding:10px 12px;
               background:#F5F5F5; border-radius:9px; }
.db-pm-sev   { font-size:20px; flex-shrink:0; }
.db-pm-name  { font-size:13px; font-weight:700; color:#424242; }
.db-pm-meta  { font-size:11px; color:#757575; }
.db-pm-badge { margin-left:auto; flex-shrink:0; }

/* ─── Responsive dashboard ─── */
@media (max-width:900px) {
  .db-sidebar { transform:translateX(-100%); }
  .db-sidebar.open { transform:translateX(0); }
  .db-overlay.open { display:block; }
  .db-topbar  { display:flex; }
  .db-main    { margin-left:0; padding-top:58px; }
  .db-page    { padding:18px 14px; }
  .db-kpi-row { grid-template-columns:repeat(2,1fr); gap:10px; }
  .db-grid2   { grid-template-columns:1fr; }
  .db-grid3   { grid-template-columns:1fr 1fr; }
  .db-weather-grid { grid-template-columns:1fr; }
  .db-quick-links  { grid-template-columns:1fr; }
}
@media (max-width:600px) {
  .db-kpi-row { grid-template-columns:1fr 1fr; }
  .db-kpi-val { font-size:24px; }
  .db-grid3   { grid-template-columns:1fr 1fr; }
  .db-sc-metrics { grid-template-columns:repeat(2,1fr); }
  .db-wn-temp { font-size:48px; }
  .a-form-row2 { grid-template-columns:1fr; }
}
