/* AIPlantFix — Green Theme */
:root {
  --primary: #16A34A;
  --primary-dark: #15803D;
  --primary-light: #BBF7D0;
  --primary-bg: #F0FDF4;
  --accent: #065F46;
  --text: #1E293B;
  --text-light: #64748B;
  --bg: #FFFFFF;
  --bg-alt: #F8FAFC;
  --border: #E2E8F0;
  --danger: #DC2626;
  --warning: #F59E0B;
  --info: #3B82F6;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -4px rgba(0,0,0,.1);
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text);
  background: var(--bg-alt);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }

/* ---- NAVBAR ---- */
.navbar {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 0 1.5rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}
.navbar-brand {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
}
.navbar-brand svg { width: 32px; height: 32px; }
.nav-links { display: flex; align-items: center; gap: 1rem; }
.nav-links a {
  color: var(--text-light);
  font-size: .9rem;
  font-weight: 500;
  padding: .4rem .75rem;
  border-radius: 8px;
  transition: all .15s;
}
.nav-links a:hover, .nav-links a.active { color: var(--primary); background: var(--primary-bg); }
.hamburger { display: none; background: none; border: none; cursor: pointer; padding: .5rem; }
.hamburger span { display: block; width: 22px; height: 2px; background: var(--text); margin: 5px 0; border-radius: 2px; transition: .2s; }

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .625rem 1.25rem;
  border: none;
  border-radius: 8px;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
  text-decoration: none;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-outline { background: transparent; border: 1.5px solid var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--primary-bg); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-sm { padding: .4rem .9rem; font-size: .8rem; }
.btn-lg { padding: .75rem 2rem; font-size: 1rem; }
.btn-block { width: 100%; }

/* ---- LAYOUT ---- */
.container { max-width: 1100px; margin: 0 auto; padding: 2rem 1.5rem; }
.page-header { margin-bottom: 2rem; }
.page-header h1 { font-size: 1.75rem; font-weight: 700; margin-bottom: .25rem; }
.page-header p { color: var(--text-light); }

/* ---- CARDS ---- */
.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}
.feature-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
  transition: all .2s;
  text-align: center;
}
.feature-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); border-color: var(--primary-light); }
.feature-icon {
  width: 56px; height: 56px;
  background: var(--primary-bg);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1rem;
  font-size: 1.5rem;
}
.feature-card h3 { font-size: 1.05rem; margin-bottom: .5rem; }
.feature-card p { font-size: .85rem; color: var(--text-light); margin-bottom: 1rem; }

/* ---- HERO ---- */
.hero {
  text-align: center;
  padding: 4rem 1.5rem 3rem;
  background: linear-gradient(135deg, var(--primary-bg) 0%, #ECFDF5 100%);
  border-bottom: 1px solid var(--border);
}
.hero h1 { font-size: 2.5rem; font-weight: 800; margin-bottom: .75rem; line-height: 1.2; }
.hero h1 span { color: var(--primary); }
.hero p { font-size: 1.15rem; color: var(--text-light); max-width: 600px; margin: 0 auto 2rem; }

/* ---- FORMS ---- */
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font-weight: 600; font-size: .85rem; margin-bottom: .35rem; color: var(--text); }
.form-control {
  width: 100%;
  padding: .65rem .9rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: .9rem;
  transition: border-color .15s;
  background: var(--bg);
  font-family: inherit;
}
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(22,163,74,.12); }
textarea.form-control { min-height: 100px; resize: vertical; }
select.form-control { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748B' d='M6 8L1 3h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .75rem center; padding-right: 2rem; }

/* ---- ALERTS ---- */
.alert { padding: .75rem 1rem; border-radius: 8px; margin-bottom: 1rem; font-size: .9rem; }
.alert-success { background: #F0FDF4; color: #166534; border: 1px solid #BBF7D0; }
.alert-error { background: #FEF2F2; color: #991B1B; border: 1px solid #FECACA; }
.alert-info { background: #EFF6FF; color: #1E40AF; border: 1px solid #BFDBFE; }

/* ---- AI RESULT ---- */
.ai-result {
  background: var(--primary-bg);
  border: 1px solid var(--primary-light);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-top: 1.5rem;
  white-space: pre-wrap;
  line-height: 1.7;
  font-size: .92rem;
}
.ai-result h3 { color: var(--primary-dark); margin-bottom: .75rem; font-size: 1.1rem; }
.ai-result-content { white-space: pre-wrap; }

/* ---- CONFIDENCE BADGE ---- */
.confidence { display: inline-block; padding: .2rem .6rem; border-radius: 20px; font-size: .75rem; font-weight: 700; }
.confidence-high { background: #DCFCE7; color: #166534; }
.confidence-med { background: #FEF9C3; color: #854D0E; }
.confidence-low { background: #FEE2E2; color: #991B1B; }

/* ---- PRICING ---- */
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }
.pricing-card {
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  text-align: center;
  position: relative;
  transition: all .2s;
}
.pricing-card.featured { border-color: var(--primary); }
.pricing-card.featured::before {
  content: 'Most Popular';
  position: absolute;
  top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--primary);
  color: #fff;
  padding: .2rem .9rem;
  border-radius: 20px;
  font-size: .75rem;
  font-weight: 700;
}
.pricing-card h3 { font-size: 1.2rem; margin-bottom: .5rem; }
.pricing-price { font-size: 2.5rem; font-weight: 800; color: var(--primary); margin: .75rem 0; }
.pricing-price span { font-size: .9rem; font-weight: 400; color: var(--text-light); }
.pricing-features { list-style: none; margin: 1.25rem 0; text-align: left; }
.pricing-features li { padding: .4rem 0; font-size: .88rem; color: var(--text-light); display: flex; align-items: center; gap: .5rem; }
.pricing-features li::before { content: '✓'; color: var(--primary); font-weight: 700; }

/* ---- GARDEN COLLECTION ---- */
.plant-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: .75rem;
}
.plant-item-icon { font-size: 2rem; }
.plant-item-info { flex: 1; }
.plant-item-info h4 { font-size: .95rem; margin-bottom: .15rem; }
.plant-item-info p { font-size: .8rem; color: var(--text-light); }

/* ---- DASHBOARD STATS ---- */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.stat-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
}
.stat-number { font-size: 2rem; font-weight: 800; color: var(--primary); }
.stat-label { font-size: .8rem; color: var(--text-light); margin-top: .25rem; }

/* ---- LOADING ---- */
.spinner {
  display: none;
  width: 36px; height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .6s linear infinite;
  margin: 1rem auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- USAGE BAR ---- */
.usage-bar-wrap { background: var(--border); border-radius: 20px; height: 8px; overflow: hidden; margin: .5rem 0; }
.usage-bar { background: var(--primary); height: 100%; border-radius: 20px; transition: width .3s; }
.usage-text { font-size: .8rem; color: var(--text-light); }

/* ---- AUTH PAGES ---- */
.auth-wrap { max-width: 420px; margin: 3rem auto; }
.auth-wrap .card { padding: 2rem; }
.auth-wrap h2 { text-align: center; margin-bottom: 1.5rem; }

/* ---- FOOTER ---- */
.footer {
  text-align: center;
  padding: 2rem 1.5rem;
  border-top: 1px solid var(--border);
  color: var(--text-light);
  font-size: .8rem;
  margin-top: 3rem;
}

/* ---- MOBILE ---- */
@media (max-width: 768px) {
  .hero h1 { font-size: 1.75rem; }
  .hero p { font-size: 1rem; }
  .nav-links { display: none; position: absolute; top: 64px; left: 0; right: 0; background: var(--bg); flex-direction: column; padding: 1rem; border-bottom: 1px solid var(--border); box-shadow: var(--shadow-lg); }
  .nav-links.open { display: flex; }
  .hamburger { display: block; }
  .card-grid { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .container { padding: 1.25rem 1rem; }
}
