:root {
  --bg-main: #0a0f0d;
  --bg-card: rgba(17, 29, 23, 0.75);
  --bg-card-hover: rgba(22, 38, 30, 0.85);
  --bg-nav: rgba(12, 22, 17, 0.92);
  --border-color: rgba(52, 211, 153, 0.18);
  --border-glow: rgba(16, 185, 129, 0.35);

  --text-primary: #f3f4f6;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;

  --emerald-500: #10b981;
  --emerald-400: #34d399;
  --emerald-600: #059669;
  --emerald-900: #064e3b;

  --accent-cyan: #06b6d4;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
  --accent-indigo: #6366f1;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --shadow-card: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-main);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.5;
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(16, 185, 129, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 85% 85%, rgba(6, 182, 212, 0.06) 0%, transparent 40%);
  min-height: 100vh;
}

/* Layout */
.app-layout {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Navigation Header */
.top-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: var(--bg-nav);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--emerald-500), var(--accent-cyan));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.4);
}

.brand-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  background: linear-gradient(90deg, #fff, var(--emerald-400));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-badge {
  font-size: 0.7rem;
  background: rgba(16, 185, 129, 0.15);
  color: var(--emerald-400);
  border: 1px solid var(--border-color);
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-full);
  margin-left: 0.4rem;
}

.nav-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.farm-select-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.auth-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  padding: 0.35rem 0.75rem;
  background: rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.status-indicator.online {
  width: 8px;
  height: 8px;
  background-color: var(--emerald-400);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--emerald-400);
}

/* Dashboard Grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.5rem;
  padding: 1.5rem 2rem;
  max-width: 1600px;
  margin: 0 auto;
  width: 100%;
}

/* Cards */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}

.card:hover {
  border-color: var(--border-glow);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.card-header h2 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: #fff;
}

.card-title-group {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

/* Grid Layout Spans */
.map-card {
  grid-column: span 7;
  min-height: 420px;
}

.health-card {
  grid-column: span 5;
}

.ml-yield-card {
  grid-column: span 5;
}

.weather-card {
  grid-column: span 7;
}

.vegetation-card {
  grid-column: span 6;
}

.advisory-card {
  grid-column: span 6;
}

.jobs-card {
  grid-column: span 12;
}

/* Map Containers */
.farm-map-container {
  flex: 1;
  min-height: 300px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.draw-map-container {
  height: 240px;
  border-radius: var(--radius-md);
  margin-top: 0.5rem;
  border: 1px solid var(--border-color);
}

.map-actions {
  display: flex;
  gap: 0.5rem;
}

.map-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.75rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.centroid-info {
  display: flex;
  gap: 1rem;
}

.map-legend {
  display: flex;
  gap: 0.75rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.color-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.color-dot.high { background: var(--emerald-400); box-shadow: 0 0 6px var(--emerald-400); }
.color-dot.med { background: var(--accent-amber); box-shadow: 0 0 6px var(--accent-amber); }
.color-dot.low { background: var(--accent-rose); box-shadow: 0 0 6px var(--accent-rose); }

/* Health Metrics & Gauge */
.health-metrics {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.5rem 0;
}

.gauge-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 140px;
}

.circular-progress {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: conic-gradient(var(--emerald-500) calc(86 * 1%), rgba(255, 255, 255, 0.08) 0deg);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.2);
  transition: background 0.5s ease;
}

.inner-circle {
  width: 104px;
  height: 104px;
  background-color: #0d1712;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.gauge-value {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  color: #fff;
}

.gauge-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.health-indicators {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.indicator-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
}

.indicator-label {
  color: var(--text-secondary);
}

.indicator-value {
  font-weight: 500;
  color: #fff;
}

.indicator-value.highlight {
  color: var(--emerald-400);
}

.progress-bar-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 120px;
}

.progress-bar {
  height: 6px;
  background: linear-gradient(90deg, var(--emerald-400), var(--accent-rose));
  border-radius: var(--radius-full);
  background-color: var(--emerald-400);
}

.progress-text {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ML Yield Section */
.yield-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.yield-metric-box, .growth-stage-box {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  padding: 0.85rem;
}

.yield-metric-title, .stage-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.yield-value-group {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  margin: 0.25rem 0;
}

.yield-number {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--emerald-400);
}

.yield-unit {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.yield-range {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.stage-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  margin: 0.35rem 0;
}

.gdd-metric {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.feature-contributions h3 {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.contributions-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.contribution-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.02);
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
}

.contribution-desc {
  color: var(--text-secondary);
}

.contribution-impact.pos { color: var(--emerald-400); font-weight: 600; }
.contribution-impact.neg { color: var(--accent-rose); font-weight: 600; }
.contribution-impact.neutral { color: var(--text-muted); }

/* Chart Container */
.chart-container {
  position: relative;
  flex: 1;
  min-height: 220px;
  width: 100%;
}

/* Advisory & Alerts */
.advisory-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  flex: 1;
}

.alerts-column h3, .recommendations-column h3 {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.feed-container {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  max-height: 240px;
  overflow-y: auto;
}

.feed-empty {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
  padding: 1.5rem 0;
}

.alert-item {
  background: rgba(244, 63, 94, 0.08);
  border: 1px solid rgba(244, 63, 94, 0.25);
  border-radius: var(--radius-md);
  padding: 0.6rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.alert-item.severity-medium {
  background: rgba(245, 158, 11, 0.08);
  border-color: rgba(245, 158, 11, 0.25);
}

.alert-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.alert-title {
  font-weight: 600;
  font-size: 0.85rem;
  color: #fff;
}

.alert-msg {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.recommendation-item {
  background: rgba(16, 185, 129, 0.06);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: var(--radius-md);
  padding: 0.6rem 0.75rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
}

.rec-text {
  font-size: 0.8rem;
  color: var(--text-primary);
}

/* Tables */
.table-container {
  overflow-x: auto;
  max-height: 220px;
}

.styled-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.styled-table th {
  text-align: left;
  padding: 0.6rem 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.styled-table td {
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
}

/* Badges & Buttons */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
}
.badge-outline { border: 1px solid var(--border-color); color: var(--emerald-400); }
.badge-accent { background: rgba(6, 182, 212, 0.15); color: var(--accent-cyan); border: 1px solid rgba(6, 182, 212, 0.3); }
.badge-success { background: rgba(16, 185, 129, 0.15); color: var(--emerald-400); }
.badge-warning { background: rgba(245, 158, 11, 0.15); color: var(--accent-amber); }
.badge-danger { background: rgba(244, 63, 94, 0.15); color: var(--accent-rose); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.85rem;
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--emerald-500), var(--emerald-600));
  color: #fff;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--emerald-400), var(--emerald-500));
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.45);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.12);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.14);
}

.btn-outline {
  background: transparent;
  color: var(--emerald-400);
  border-color: var(--border-color);
}
.btn-outline:hover {
  background: rgba(16, 185, 129, 0.1);
  border-color: var(--emerald-400);
}

.btn-accent {
  background: rgba(6, 182, 212, 0.15);
  color: var(--accent-cyan);
  border-color: rgba(6, 182, 212, 0.3);
}
.btn-accent:hover {
  background: rgba(6, 182, 212, 0.25);
}

.btn-xs {
  font-size: 0.75rem;
  padding: 0.25rem 0.6rem;
}

.styled-select, .styled-input {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-color);
  color: #fff;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.85rem;
  outline: none;
}
.styled-select:focus, .styled-input:focus {
  border-color: var(--emerald-400);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.3);
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 1rem;
}

.modal-content {
  background: #111d17;
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-lg);
  max-width: 600px;
  width: 100%;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}

.modal-content.modal-large {
  max-width: 780px;
}

.modal-subtitle {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 0.2rem;
}

.farmer-finder-toolbar {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
  background: rgba(16, 185, 129, 0.05);
  border: 1px solid rgba(16, 185, 129, 0.2);
  padding: 0.75rem;
  border-radius: var(--radius-md);
}

.search-box-group {
  display: flex;
  gap: 0.5rem;
  flex: 1;
  min-width: 280px;
}

.btn-gps {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  color: #fff;
  border: none;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 0.9rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
}

.btn-gps:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.map-guide-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.03);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--emerald-500);
}

.map-action-buttons {
  display: flex;
  gap: 0.5rem;
}

.area-conversion-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(6, 182, 212, 0.06);
  border: 1px solid rgba(6, 182, 212, 0.25);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
}

.area-metric {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.inline-input {
  width: 90px;
  padding: 0.25rem 0.5rem;
  font-size: 0.9rem;
  font-weight: bold;
  color: #fff;
}

.area-equivalents {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--cyan-400);
}

.flex-1 { flex: 1; }
.flex-2 { flex: 2; }
.mt-3 { margin-top: 0.75rem; }

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-header h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: #fff;
}

.btn-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
}
.btn-close:hover { color: #fff; }

.modal-body {
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-group label {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.75rem;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 0.5rem;
}


/* Toast */
.toast-notification {
  position: fixed;
  bottom: 2rem;
  right: 6rem;
  background: #111d17;
  color: var(--emerald-400);
  border: 1px solid var(--emerald-500);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  z-index: 3000;
  animation: slideIn 0.3s ease;
}

/* Floating AI Chatbot */
.chatbot-wrapper {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 3500;
}

.chatbot-toggle-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.2);
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.45);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.chatbot-toggle-btn:hover {
  transform: scale(1.08) translateY(-2px);
  box-shadow: 0 12px 30px rgba(16, 185, 129, 0.6);
}

.chat-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--cyan-400);
  color: #06120c;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 10px;
}

.chat-drawer {
  position: absolute;
  bottom: 70px;
  right: 0;
  width: 380px;
  height: 520px;
  background: #0d1712;
  border: 1px solid rgba(52, 211, 153, 0.25);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.75);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: slideIn 0.25s ease;
}

.chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 1rem;
  background: rgba(16, 185, 129, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.chat-header-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: #fff;
  font-size: 0.9rem;
}

.bot-avatar {
  font-size: 1.2rem;
  background: rgba(16, 185, 129, 0.2);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bot-subtext {
  font-size: 0.7rem;
  color: var(--emerald-400);
}

.btn-close-chat {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.3rem;
  cursor: pointer;
}
.btn-close-chat:hover { color: #fff; }

.chat-quick-prompts {
  display: flex;
  gap: 0.4rem;
  padding: 0.5rem 0.75rem;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  overflow-x: auto;
}

.quick-prompt-btn {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: var(--emerald-300);
  font-size: 0.72rem;
  padding: 0.3rem 0.6rem;
  border-radius: 12px;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.2s;
}
.quick-prompt-btn:hover {
  background: rgba(16, 185, 129, 0.25);
}

.chat-messages {
  flex: 1;
  padding: 1rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.chat-bubble {
  max-width: 85%;
  padding: 0.65rem 0.9rem;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  line-height: 1.45;
}

.chat-header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-voice-toggle {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-voice-toggle.active {
  background: rgba(16, 185, 129, 0.2);
  border-color: var(--emerald-500);
  color: var(--emerald-400);
}

.bot-bubble {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #f3f4f6;
  align-self: flex-start;
  border-bottom-left-radius: 2px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.btn-speak-msg {
  background: transparent;
  border: none;
  font-size: 0.85rem;
  align-self: flex-end;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.2s;
  padding: 0;
}
.btn-speak-msg:hover { opacity: 1; transform: scale(1.1); }

.chat-input-row {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  padding: 0.65rem 0.75rem !important;
  gap: 0.5rem !important;
  background: rgba(0, 0, 0, 0.35) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.btn-voice-mic {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--emerald-400);
  width: 38px !important;
  height: 38px !important;
  min-width: 38px !important;
  flex-shrink: 0 !important;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-voice-mic:hover {
  background: rgba(16, 185, 129, 0.3);
}

.btn-voice-mic.listening {
  background: #f43f5e;
  border-color: #f43f5e;
  color: #fff;
  animation: pulseMic 1.2s infinite ease-in-out;
}

@keyframes pulseMic {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(244, 63, 94, 0.7); }
  70% { transform: scale(1.1); box-shadow: 0 0 0 10px rgba(244, 63, 94, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(244, 63, 94, 0); }
}

.chat-input-field {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  height: 38px !important;
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #fff !important;
  padding: 0 0.75rem !important;
  border-radius: var(--radius-sm) !important;
  font-size: 0.82rem !important;
  box-sizing: border-box !important;
}

.chat-input-field:focus {
  outline: none;
  border-color: var(--emerald-500) !important;
  background: rgba(255, 255, 255, 0.09) !important;
}

.btn-send-chat {
  background: var(--emerald-500);
  border: none;
  color: #fff;
  width: 38px !important;
  height: 38px !important;
  min-width: 38px !important;
  flex-shrink: 0 !important;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-send-chat:hover {
  background: var(--emerald-400);
}

@keyframes slideIn {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}


/* Responsive */
@media (max-width: 1200px) {
  .map-card, .weather-card { grid-column: span 12; }
  .health-card, .ml-yield-card { grid-column: span 6; }
  .vegetation-card, .advisory-card { grid-column: span 12; }
}

@media (max-width: 768px) {
  .top-nav { flex-direction: column; gap: 1rem; align-items: flex-start; }
  .nav-controls { flex-wrap: wrap; }
  .health-card, .ml-yield-card { grid-column: span 12; }
  .advisory-layout { grid-template-columns: 1fr; }
  .dashboard-grid { padding: 1rem; }
  .chat-drawer { width: 310px; right: -10px; height: 460px; }
}

