/* Modern Design System - CropVision AI */
:root {
  --bg-main: #0a0f0d;
  --bg-card: rgba(16, 26, 21, 0.75);
  --bg-card-hover: rgba(22, 38, 30, 0.85);
  --border-glass: rgba(16, 185, 129, 0.18);
  --border-subtle: rgba(255, 255, 255, 0.08);
  
  --emerald-400: #34d399;
  --emerald-500: #10b981;
  --emerald-600: #059669;
  --emerald-glow: rgba(16, 185, 129, 0.35);

  --amber-400: #fbbf24;
  --amber-500: #f59e0b;
  --red-400: #f87171;
  --red-500: #ef4444;

  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --text-dim: #6b7280;

  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.6), 0 0 1px 1px var(--border-glass);
  --shadow-glow: 0 0 25px var(--emerald-glow);
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-body);
  min-height: 100vh;
  line-height: 1.5;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Ambient glowing orbs */
.glow-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.45;
}
.orb-1 {
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, #059669 0%, transparent 70%);
  top: -100px;
  left: -100px;
}
.orb-2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #047857 0%, transparent 70%);
  bottom: -150px;
  right: -100px;
}
.orb-3 {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, #0284c7 0%, transparent 70%);
  top: 45%;
  left: 55%;
  opacity: 0.2;
}

.app-container {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.5rem 1.75rem 3.5rem;
}

/* Navbar */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  margin-bottom: 2rem;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

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

.brand-title {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.brand-title .highlight {
  color: var(--emerald-400);
}

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

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

/* Status Pill */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  color: var(--emerald-400);
  font-weight: 500;
}
.status-dot {
  width: 8px;
  height: 8px;
  background-color: var(--emerald-400);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--emerald-400);
  animation: pulse-dot 2s infinite ease-in-out;
}
@keyframes pulse-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.35); opacity: 0.65; }
}

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

/* User Profile Chip */
.user-chip {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
}
.user-avatar {
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, #10b981, #0284c7);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: white;
}
.user-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
}

/* Navigation Tabs */
.main-tabs {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.75rem;
  background: rgba(16, 26, 21, 0.5);
  backdrop-filter: blur(12px);
  padding: 0.4rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  width: fit-content;
}
.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 1.25rem;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-fast);
}
.tab-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.04);
}
.tab-btn.active {
  color: #fff;
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid rgba(16, 185, 129, 0.4);
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.15);
}
.tab-btn .badge {
  background: rgba(255, 255, 255, 0.1);
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
}

/* Tab Content Visibility */
.tab-content {
  display: none;
}
.tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease-out;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Auth Banner */
.auth-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.15), rgba(6, 95, 70, 0.25));
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 1rem 1.5rem;
  margin-bottom: 1.75rem;
}
.banner-content {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.9rem;
  color: #d1fae5;
}
.banner-icon {
  color: var(--emerald-400);
  display: flex;
}
.banner-actions {
  display: flex;
  gap: 0.75rem;
}

/* Glass Card */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 1.75rem;
}

/* Scanner Grid Layout */
.scanner-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.75rem;
}
@media (max-width: 960px) {
  .scanner-grid {
    grid-template-columns: 1fr;
  }
}

/* Card Headers */
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.25rem;
}
.card-title {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.card-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

/* Chip */
.chip {
  display: inline-flex;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
}
.chip-emerald {
  background: rgba(16, 185, 129, 0.15);
  color: var(--emerald-400);
  border: 1px solid rgba(16, 185, 129, 0.3);
}
.chip-amber {
  background: rgba(245, 158, 11, 0.15);
  color: var(--amber-400);
  border: 1px solid rgba(245, 158, 11, 0.3);
}
.chip-cyan {
  background: rgba(6, 182, 212, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(6, 182, 212, 0.3);
}

/* Model Switcher Section */
.model-switcher-section {
  margin-bottom: 1.25rem;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-md);
  padding: 1rem;
}

.model-switcher-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.switcher-label {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--emerald-400);
}

.switcher-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
}

.model-switcher-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

@media (max-width: 640px) {
  .model-switcher-grid {
    grid-template-columns: 1fr;
  }
}

.model-card-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 0.85rem;
  text-align: left;
  cursor: pointer;
  transition: all var(--transition-fast);
  color: var(--text-main);
  position: relative;
  display: flex;
  flex-direction: column;
}

.model-card-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(52, 211, 153, 0.35);
  transform: translateY(-2px);
}

.model-card-btn.active {
  background: linear-gradient(145deg, rgba(16, 185, 129, 0.16), rgba(5, 150, 105, 0.08));
  border-color: var(--emerald-400);
  box-shadow: 0 0 16px -2px rgba(16, 185, 129, 0.3);
}

.model-card-btn.active::after {
  content: '✓';
  position: absolute;
  top: 0.5rem;
  right: 0.65rem;
  color: var(--emerald-400);
  font-size: 0.85rem;
  font-weight: 800;
}

.model-badge-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}

.badge-tag {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
}

.badge-tag.pytorch {
  background: rgba(238, 76, 44, 0.18);
  color: #fb7185;
  border: 1px solid rgba(238, 76, 44, 0.3);
}

.badge-tag.tensorflow {
  background: rgba(255, 153, 0, 0.18);
  color: #f59e0b;
  border: 1px solid rgba(255, 153, 0, 0.3);
}

.badge-count {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.model-card-heading {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.2rem;
}

.model-card-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.35;
}

.highlight-chip {
  color: var(--emerald-400) !important;
  font-weight: 600;
}

.classes-tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.4rem;
}

/* Dropzone */
.dropzone {
  border: 2px dashed rgba(52, 211, 153, 0.3);
  border-radius: var(--radius-md);
  padding: 2.5rem 1.5rem;
  text-align: center;
  background: rgba(0, 0, 0, 0.25);
  transition: var(--transition-fast);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.dropzone:hover, .dropzone.dragover {
  border-color: var(--emerald-400);
  background: rgba(16, 185, 129, 0.08);
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.15);
}

.upload-icon-bubble {
  width: 64px;
  height: 64px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--emerald-400);
  margin-bottom: 1rem;
}

.dropzone-title {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 0.25rem;
}
.dropzone-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Dropzone Preview */
.dropzone-preview {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.dropzone-preview img {
  max-width: 100%;
  max-height: 280px;
  object-fit: cover;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-glass);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}
.remove-preview-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
}
.remove-preview-btn:hover {
  background: var(--red-500);
  border-color: var(--red-500);
}
.preview-meta {
  margin-top: 0.75rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: monospace;
}

/* Sample Selection Strip */
.sample-selection-strip {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
}
.sample-label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}
.sample-buttons {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.sample-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.85rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-fast);
}
.sample-btn:hover {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.4);
  transform: translateY(-1px);
}
.sample-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.dot-healthy { background-color: var(--emerald-400); box-shadow: 0 0 6px var(--emerald-400); }
.dot-blight { background-color: var(--amber-400); box-shadow: 0 0 6px var(--amber-400); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
  border: 1px solid transparent;
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}
.btn-primary {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}
.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #34d399, #10b981);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
  transform: translateY(-1px);
}
.btn-outline {
  background: transparent;
  border-color: var(--border-glass);
  color: var(--emerald-400);
}
.btn-outline:hover {
  background: rgba(16, 185, 129, 0.1);
  border-color: var(--emerald-400);
}
.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-subtle);
  color: var(--text-main);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
}
.btn-ghost {
  background: transparent;
  color: var(--text-main);
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
}
.btn-sm {
  padding: 0.4rem 0.85rem;
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
}
.btn-lg {
  padding: 0.9rem 1.75rem;
  font-size: 1rem;
}
.w-full { width: 100%; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }

/* Right Column: Result Card States */
.result-card {
  min-height: 480px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Placeholder state */
.result-placeholder {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--text-muted);
}
.pulse-ring {
  width: 88px;
  height: 88px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid var(--border-glass);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--emerald-400);
  margin-bottom: 1.25rem;
  animation: pulse-ring 3s infinite ease-in-out;
}
@keyframes pulse-ring {
  0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.25); }
  50% { box-shadow: 0 0 0 20px rgba(16, 185, 129, 0); }
}
.result-placeholder h3 {
  font-family: var(--font-heading);
  color: var(--text-main);
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}
.result-placeholder p {
  max-width: 400px;
  margin: 0 auto 1.5rem;
  font-size: 0.9rem;
}
.supported-classes-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-size: 0.75rem;
}
.supported-classes-pill .tag {
  background: rgba(255, 255, 255, 0.06);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
}

/* Scanning Animation */
.result-scanning {
  text-align: center;
  padding: 3rem 1rem;
}
.radar-scan {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 2px solid var(--emerald-400);
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 30px rgba(16, 185, 129, 0.2);
}
.radar-sweep {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: conic-gradient(from 0deg, rgba(16, 185, 129, 0.6) 0deg, transparent 70deg);
  animation: sweep 1.5s linear infinite;
}
@keyframes sweep {
  to { transform: rotate(360deg); }
}
.scan-line {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: #fff;
  box-shadow: 0 0 10px #fff;
  animation: scanLine 2s ease-in-out infinite alternate;
}
@keyframes scanLine {
  0% { top: 10%; }
  100% { top: 90%; }
}

/* Active Result Content */
.result-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}
.result-kicker {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--emerald-400);
  font-weight: 600;
}
.result-class-name {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 700;
  text-transform: capitalize;
}
.severity-badge {
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.severity-optimal { background: rgba(16, 185, 129, 0.2); color: var(--emerald-400); border: 1px solid var(--emerald-500); }
.severity-moderate { background: rgba(245, 158, 11, 0.2); color: var(--amber-400); border: 1px solid var(--amber-500); }
.severity-severe { background: rgba(249, 115, 22, 0.2); color: #fb923c; border: 1px solid #f97316; }
.severity-critical { background: rgba(239, 68, 68, 0.2); color: var(--red-400); border: 1px solid var(--red-500); }

/* Confidence Meter */
.confidence-container {
  margin-bottom: 1.25rem;
}
.confidence-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  margin-bottom: 0.4rem;
}
.confidence-val {
  font-weight: 700;
  color: var(--emerald-400);
}
.progress-bar-bg {
  height: 10px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #34d399);
  border-radius: var(--radius-full);
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 10px rgba(52, 211, 153, 0.5);
}

/* Metadata Chips */
.meta-chips-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}
.meta-chip {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.75rem;
  text-align: center;
}
.chip-label {
  display: block;
  font-size: 0.7rem;
  color: var(--text-dim);
}
.chip-val {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  margin-top: 0.15rem;
}

/* Advisory Box */
.advisory-box {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}
.advisory-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--emerald-400);
}
.advisory-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  line-height: 1.5;
}
.advisory-section {
  margin-top: 0.85rem;
}
.section-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-main);
  margin-bottom: 0.4rem;
}
.symptom-list, .treatment-list {
  padding-left: 1.2rem;
  font-size: 0.82rem;
  color: #d1d5db;
}
.symptom-list li, .treatment-list li {
  margin-bottom: 0.35rem;
}
.treatment-list li {
  color: #a7f3d0;
}

/* SECTION 2: History Card */
.history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}
.history-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}
.stat-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
}
.stat-title {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.stat-number {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  margin-top: 0.25rem;
  color: var(--text-main);
}
.stat-active {
  color: var(--emerald-400);
  font-size: 1.15rem;
}

.table-responsive {
  overflow-x: auto;
}
.history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.history-table th {
  text-align: left;
  padding: 0.75rem 1rem;
  color: var(--text-dim);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border-subtle);
}
.history-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
}
.history-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-main);
}
.diagnosis-tag {
  display: inline-flex;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: capitalize;
}
.btn-icon-delete {
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 0.3rem;
  border-radius: 4px;
  transition: var(--transition-fast);
}
.btn-icon-delete:hover {
  color: var(--red-400);
  background: rgba(239, 68, 68, 0.1);
}

.flex-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.catalog-toggle-tabs {
  display: flex;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  padding: 0.25rem;
  gap: 0.25rem;
}
.catalog-toggle-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.catalog-toggle-btn:hover {
  color: #fff;
}
.catalog-toggle-btn.active {
  background: var(--emerald-500);
  color: #fff;
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.3);
}

/* SECTION 3: Catalog Grid */
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}
@media (max-width: 768px) {
  .catalog-grid {
    grid-template-columns: 1fr;
  }
}
.catalog-item {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  transition: var(--transition-fast);
}
.catalog-item:hover {
  border-color: var(--border-glass);
  transform: translateY(-2px);
}
.catalog-badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 0.65rem;
}
.badge-healthy { background: rgba(16, 185, 129, 0.2); color: var(--emerald-400); }
.badge-blight { background: rgba(245, 158, 11, 0.2); color: var(--amber-400); }
.badge-spot { background: rgba(249, 115, 22, 0.2); color: #fb923c; }
.badge-streak { background: rgba(239, 68, 68, 0.2); color: var(--red-400); }

.catalog-name {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}
.catalog-summary {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.85rem;
}
.catalog-sub {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
}
.catalog-text {
  font-size: 0.82rem;
  color: #e5e7eb;
  margin-top: 0.25rem;
}

/* AUTH MODAL */
.modal-dialog {
  border: none;
  background: transparent;
  margin: auto;
  max-width: 440px;
  width: 90%;
  padding: 0;
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.8);
}
.modal-dialog::backdrop {
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(12px);
}
.modal-card {
  background: #111a15;
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 2rem;
  position: relative;
  color: var(--text-main);
}
.modal-close-btn {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition-fast);
}
.modal-close-btn:hover {
  color: var(--text-main);
}
.auth-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 1.5rem;
}
.auth-tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition-fast);
}
.auth-tab-btn.active {
  color: var(--emerald-400);
  border-bottom-color: var(--emerald-400);
}

.form-group {
  margin-bottom: 1rem;
}
.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  margin-bottom: 0.4rem;
  color: var(--text-muted);
}
.input-wrapper {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.65rem 0.85rem;
  color: var(--text-muted);
  transition: var(--transition-fast);
}
.input-wrapper:focus-within {
  border-color: var(--emerald-400);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.25);
  color: var(--emerald-400);
}
.input-wrapper input {
  background: transparent;
  border: none;
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 0.9rem;
  width: 100%;
  outline: none;
}
.input-wrapper input::placeholder {
  color: var(--text-dim);
}

/* Quick Demo Box */
.demo-quick-box {
  margin-top: 1.25rem;
}
.demo-divider {
  text-align: center;
  position: relative;
  margin-bottom: 1rem;
}
.demo-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--border-subtle);
}
.demo-divider span {
  position: relative;
  background: #111a15;
  padding: 0 0.75rem;
  font-size: 0.7rem;
  color: var(--text-dim);
  letter-spacing: 0.05em;
}

/* Toasts */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  z-index: 9999;
}
.toast {
  background: #16241c;
  border: 1px solid var(--border-glass);
  color: var(--text-main);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  animation: slideInRight 0.3s ease-out;
}
.toast-success { border-color: var(--emerald-400); }
.toast-error { border-color: var(--red-500); }
@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Utilities */
.hidden { display: none !important; }
.text-center { text-align: center; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
