/* ============================================================
   style.css — WillFarm v25.1
   Apple-inspired · Cream/Beige · Nunito · Organic Palette
   Tüm cihazlar için optimize edilmiş esnek ve akışkan CSS mimarisi.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;500;600;700;800;900&display=swap');

/* ── 1. CORE RESET VE TEMEL AYARLAR ───────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  font-family: 'Nunito', sans-serif;
  background: #f5f0e8;
  color: #1C1C1E;
  min-height: 100vh;
  overscroll-behavior: none;
}

#app {
  max-width: 480px;
  margin: 0 auto;
  padding-bottom: 32px;
  position: relative;
}

/* ── 2. HEADER VE NAVİGASYON KOMPONENTLERİ ────────────────── */
.hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: rgba(245, 240, 232, 0.97);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 200;
  border-bottom: 1px solid rgba(0, 0, 0, 0.07);
}

.hdr-left  { display: flex; align-items: center; gap: 6px; }
.hdr-right { display: flex; align-items: center; gap: 6px; }

.hdr-logo {
  font-size: 17px;
  font-weight: 900;
  color: #1C1C1E;
  cursor: pointer;
  letter-spacing: -.3px;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  user-select: none;
}
.hdr-logo span { color: #2563EB; }

.hdr-btn {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid #E5E7EB;
  border-radius: 10px;
  padding: 5px 11px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  color: #374151;
  white-space: nowrap;
  transition: background .15s;
  font-family: inherit;
}
.hdr-btn:active { background: #E5E7EB; }
.hdr-home { font-size: 15px; padding: 5px 9px; }

.hdr-lang {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid #E5E7EB;
  border-radius: 10px;
  padding: 4px 9px;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 3px;
  transition: background .15s;
  font-family: inherit;
}
.hdr-lang:active { background: #E5E7EB; }

.alert-badge {
  background: #EF4444;
  border-radius: 99px;
  min-width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 800;
  color: #fff;
  padding: 0 5px;
}

/* ── 3. İÇERİK SARMALAYICI VE KART MİMARİSİ ───────────────── */
.cont {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.card {
  background: #fff;
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.form-card {
  background: #fff;
  border-radius: 20px;
  padding: 0 0 16px 0;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

.form-card .g2,
.form-card .g3,
.form-card .sowing-date-row,
.form-card .rot-banner,
.form-card #sow-status,
.form-card .poly-toolbar,
.form-card .poly-hint,
.form-card .field-err,
.form-card .form-err,
.form-card .btn-save,
.form-card .accuracy-bar,
.form-card .seed-area-row {
  padding-left: 14px;
  padding-right: 14px;
}

.field-card {
  background: #fff;
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  cursor: pointer;
  border: 2px solid transparent;
  transition: box-shadow 0.15s ease, transform 0.1s ease, border-color 0.15s ease;
}
.field-card:active {
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.18);
  transform: scale(0.985);
}
.field-card-alert { border-color: #FDA4AF; }

.hero {
  background: #fff;
  border-radius: 20px;
  padding: 16px;
  border: 2px solid transparent;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  margin-bottom: 10px;
}
.hero-date-strip {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid rgba(0, 0, 0, 0.07);
}

/* ── 4. TABS (SEKMELER) VE İLERLEME ÇUBUKLARI ─────────────── */
.tabs, .tab-bar {
  display: flex;
  gap: 2px;
  background: #F2F5F9;
  border-radius: 12px;
  padding: 3px;
  margin-bottom: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  width: 100%;
  box-sizing: border-box;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.tabs::-webkit-scrollbar,
.tab-bar::-webkit-scrollbar {
  display: none;
}

.tab-btn {
  flex: 0 0 auto;
  min-width: 0;
  border: none;
  background: transparent;
  border-radius: 9px;
  padding: 7px 10px;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  color: #6B7280;
  white-space: nowrap;
  text-align: center;
  transition: background .15s, color .15s, box-shadow .15s;
  font-family: inherit;
}

.tab-btn.active,
.tab-btn.tab-btn-active {
  background: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
  color: #1D4ED8;
  font-weight: 900;
  border-bottom: 2.5px solid #1D4ED8;
}

.prog-bar  { height: 6px; background: #F2F5F9; border-radius: 99px; overflow: hidden; }
.prog-fill { height: 100%; background: linear-gradient(90deg, #3B82F6, #1D4ED8); border-radius: 99px; transition: width .4s; }

.accuracy-bar { border-radius: 12px; padding: 8px 14px; margin-bottom: 8px; border: 1px solid; }
.accuracy-bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.accuracy-fill-wrap { flex: 1; height: 6px; background: #E5E7EB; border-radius: 99px; overflow: hidden; }
.accuracy-fill { height: 100%; border-radius: 99px; transition: width .4s; }
.accuracy-missing { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 3px; }
.accuracy-missing-item { font-size: 9px; font-weight: 700; background: #FEE2E2; color: #991B1B; border: 1px solid #FECACA; border-radius: 4px; padding: 1px 5px; }

/* ── 5. ASENKRON LOADING (YÜKLENİYOR) GÖRÜNÜMÜ ───────────── */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(245, 240, 232, 0.85);
  backdrop-filter: blur(4px);
  z-index: 8000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.loading-spinner {
  width: 44px;
  height: 44px;
  border: 4px solid #E5E7EB;
  border-top-color: #2563EB;
  border-radius: 50%;
  animation: spin .75s linear infinite;
}

.spinner-sm {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid #E5E7EB;
  border-top-color: #2563EB;
  border-radius: 50%;
  animation: spin .75s linear infinite;
  vertical-align: middle;
  margin-right: 4px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── 6. AGRO-PLAN GÖREV KARTLARI VE AKILLI ÖNERİLER ──────── */
.task-card {
  border-radius: 14px;
  padding: 12px 13px 10px;
  border: 2px solid;
  margin-bottom: 8px;
}
.tc-header   { display: flex; align-items: flex-start; gap: 6px; margin-bottom: 2px; overflow: hidden; }
.tc-dot      { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; margin-top: 4px; }
.tc-title    { flex: 1; font-size: 13px; font-weight: 800; line-height: 1.3; min-width: 0; word-break: break-word; overflow-wrap: break-word; }
.tc-date     { font-size: 9px; color: #64748B; font-weight: 600; white-space: nowrap; }
.tc-day-pill { font-size: 9.5px; font-weight: 800; color: #fff; border-radius: 5px; padding: 2px 8px; flex-shrink: 0; white-space: nowrap; max-width: 150px; overflow: hidden; text-overflow: ellipsis; }
.tc-bbch-row { display: none; }
.tc-bbch     { font-size: 9px; font-weight: 700; border-radius: 5px; padding: 2px 7px; }

.tc-smart-advice {
  border-radius: 8px;
  padding: 6px 9px;
  margin: 4px 0;
  background: #F0FDF4;
  border: 1.5px solid #6EE7B7;
  overflow: hidden;
}
.tc-smart-advice-label { font-size: 8px; font-weight: 800; color: #065F46; text-transform: uppercase; letter-spacing: 0.6px; margin-bottom: 2px; }
.tc-layer-agro-text { font-size: 10px; font-weight: 600; color: #065F46; line-height: 1.4; word-break: break-word; overflow-wrap: break-word; }
.tc-layer-farmer-text { font-size: 10.5px; color: #065F46; line-height: 1.45; font-weight: 500; word-break: break-word; overflow-wrap: break-word; }
.tc-layer-divider { height: 1px; background: #A7F3D0; margin: 4px 0; }

/* Geriye dönük uyumluluk katmanları */
.tc-layer-agro   { border-radius: 8px; padding: 6px 10px; margin-bottom: 4px; background: #F0FDF4; border: 1.5px solid #6EE7B7; overflow: hidden; }
.tc-layer-farmer { border-radius: 8px; padding: 5px 10px; margin-bottom: 4px; background: #ECFDF5; border: 1.5px solid #6EE7B7; overflow: hidden; }
.tc-layer-agro-label, .tc-layer-farmer-label { font-size: 8.5px; font-weight: 800; color: #065F46; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 2px; }
.tc-layer-solo { border-radius: 8px !important; }

.tc-section-dose  { border-radius: 8px; padding: 7px 9px; margin-top: 5px; background: #F0FDF4; border: 1.5px solid #86EFAC; }
.tc-section-label { font-size: 9.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .4px; margin-bottom: 5px; }
.tc-dose-row      { display: flex; flex-direction: column; gap: 3px; padding: 5px 7px; margin-bottom: 4px; background: #fff; border-radius: 7px; border: 1px solid #D1FAE5; }
.tc-dose-name     { font-size: 12px; font-weight: 900; color: #065F46; line-height: 1.3; word-break: break-word; overflow-wrap: break-word; }
.tc-dose-pills    { display: flex; gap: 4px; flex-wrap: wrap; }

.tc-section-seed  { border-radius: 10px; padding: 7px 10px; margin-top: 4px; background: #EFF6FF; border: 1px solid #93C5FD; }
.tc-seed-line     { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 3px; }

.tc-verdict       { border-radius: 10px; padding: 8px 12px; border: 1px solid; display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.tc-verdict-icon  { font-size: 18px; flex-shrink: 0; }
.tc-verdict-label { font-size: 12px; font-weight: 800; }
.tc-verdict-sub   { font-size: 9px; color: #8E8E93; margin-top: 1px; }
.tc-src-strip     { display: none !important; }

.tc-risk-box      { background: #FFFBEB; border: 1.5px solid #FCD34D; border-radius: 10px; padding: 7px 11px; margin-top: 6px; display: flex; align-items: flex-start; gap: 7px; }
.tc-risk-box-icon { font-size: 15px; flex-shrink: 0; margin-top: 1px; }
.tc-risk-box-text { font-size: 10px; font-weight: 700; color: #78350F; line-height: 1.45; }

.tc-irrig-warn      { background: #EFF6FF; border: 1.5px solid #93C5FD; border-radius: 10px; padding: 7px 11px; margin-top: 6px; display: flex; align-items: flex-start; gap: 7px; }
.tc-irrig-warn-icon { font-size: 15px; flex-shrink: 0; }
.tc-irrig-warn-text { font-size: 10px; font-weight: 700; color: #1E40AF; line-height: 1.45; }

.tc-wind-badge { font-size: 11px; font-weight: 900; color: #92400E; background: #FEF3C7; border: 2px solid #FCD34D; border-radius: 8px; padding: 3px 10px; }
.tc-phi-badge  { font-size: 10px; font-weight: 700; color: #991B1B; background: #FEE2E2; border: 1px solid #FECACA; border-radius: 6px; padding: 2px 8px; }

/* METEOROLOJİK VE COĞRAFİ UYARI BLOKLARI */
.warn-block   { border-radius: 8px; padding: 7px 10px; margin-top: 4px; font-size: 10px; line-height: 1.45; }
.warn-wind    { background: #FFF7ED; border: 1px solid #FDBA74; color: #9A3412; }
.warn-frost   { background: #EFF6FF; border: 1px solid #BAE6FD; color: #075985; }
.warn-drought { background: #FFFBEB; border: 1px solid #FDE68A; color: #78350F; }
.warn-fao     { background: #FFFBEB; border: 1.5px solid #F59E0B; color: #92400E; }

/* DOZAJ VE ENJEKSİYON ROZETLERİ */
.dpill          { font-size: 10px; font-weight: 700; border-radius: 6px; padding: 3px 8px; border: 1px solid; white-space: normal; word-break: break-word; max-width: 100%; }
.dpill-blue     { background: #DBEAFE; color: #1E40AF; border-color: #BFDBFE; }
.dpill-green    { background: #DCFCE7; color: #065F46; border-color: #86EFAC; }
.dpill-amber    { background: #FEF3C7; color: #92400E; border-color: #FCD34D; }
.dpill-red      { background: #FEE2E2; color: #991B1B; border-color: #FECACA; }
.dpill-grey     { background: #F1F5F9; color: #475569; border-color: #E2E8F0; }
.dpill-active   { background: #DCFCE7; color: #065F46; border-color: #22C55E; font-weight: 900; }
.dpill-inactive { background: #F1F5F9; color: #9CA3AF; border-color: #E2E8F0; }

/* ── 7. VERİ KAYNAĞI ROZETLERİ VE FOOTER LOGOLARI ─────────── */
.src-pill  { font-size: 8px; font-weight: 700; border-radius: 4px; padding: 1px 5px; border: 1px solid; }
.src-logo  { font-size: 7px; font-weight: 900; border-radius: 4px; padding: 2px 5px; border: 1px solid; flex-shrink: 0; letter-spacing: .2px; }
.src-nasa  { background: #0B3D91; color: #fff;     border-color: #0B3D91; }
.src-cop   { background: #003D7A; color: #fff;     border-color: #003D7A; }
.src-isric { background: #78350F; color: #FEF3C7;  border-color: #92400E; }
.src-yara  { background: #215732; color: #D1FAE5;  border-color: #065F46; }
.src-eppo  { background: #7C3AED; color: #EDE9FE;  border-color: #6D28D9; }
.src-fao   { background: #0369A1; color: #E0F2FE;  border-color: #0284C7; }
.src-meteo { background: #0891B2; color: #ECFEFF;  border-color: #0E7490; }
.src-efsa  { background: #B91C1C; color: #FEE2E2;  border-color: #DC2626; }
.src-multi { background: #374151; color: #F9FAFB;  border-color: #4B5563; }

.src-footer, .source-footer {
  background: #F0F9FF;
  border: 1px solid #BAE6FD;
  border-radius: 12px;
  padding: 8px 13px;
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px;
}
.source-footer-logos { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }

/* ── 8. HARİTA, POLİGON VE GPS TOOLBAR ARABİRİMİ ──────────── */
.map-btn {
  position: absolute;
  z-index: 900;
  border: none;
  border-radius: 10px;
  padding: 7px 12px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  font-family: inherit;
}
.map-btn.gps { top: 10px; left: 10px;  background: #1D4ED8; color: #fff; }
.map-btn.sat { top: 10px; right: 10px; background: #374151; color: #fff; }

.poly-toolbar { display: flex; gap: 6px; align-items: center; padding: 8px 14px 4px; flex-wrap: wrap; }
.poly-btn       { border: none; border-radius: 8px; padding: 6px 12px; font-size: 10px; font-weight: 700; cursor: pointer; color: #fff; font-family: inherit; }
.poly-btn-draw  { background: #374151; }
.poly-btn-clear { background: #EF4444; }
.poly-hint      { font-size: 10px; color: #1E40AF; background: #DBEAFE; border-radius: 7px; padding: 5px 10px; margin: 0 14px 6px; }

.loc-strip-below {
  background: #EFF6FF;
  border-radius: 0 0 12px 12px;
  padding: 10px 14px;
  font-size: 12px;
  color: #1E40AF;
  font-weight: 700;
  line-height: 1.6;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
  border-top: 2px solid #BFDBFE;
  min-height: 40px;
}

/* ── 9. GİRDİ ALANLARI VE FORM ELEMENTLERİ ────────────────── */
.lbl { font-size: 10px; font-weight: 700; color: #374151; display: block; margin-bottom: 3px; }

.inp {
  width: 100%;
  border: 1.5px solid #E5E7EB;
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 13px;
  font-family: inherit;
  background: #fff;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.inp:focus { border-color: #3B82F6; box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12); }
.inp.err   { border-color: #EF4444; }

.sel {
  width: 100%;
  border: 1.5px solid #E5E7EB;
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 12px;
  font-family: inherit;
  background: #fff;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236B7280' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 28px !important;
  cursor: pointer;
}

.s-inp { width: 100%; border: 1.5px solid #E5E7EB; border-radius: 8px; padding: 7px 10px; font-size: 12px; font-family: inherit; background: #fff; outline: none; }
.s-sel { width: 100%; border: 1.5px solid #E5E7EB; border-radius: 8px; padding: 7px 10px; font-size: 12px; font-family: inherit; background: #fff; }

.field-err { color: #FF3B30; font-size: 11px; margin-top: 3px; }
.form-err  { color: #FF3B30; font-size: 12px; text-align: center; margin-bottom: 10px; padding: 0 14px; }

.seed-area-row     { display: flex; align-items: stretch; gap: 6px; margin-bottom: 8px; flex-wrap: nowrap; }
.seed-box-wrap     { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.seed-box-lbl      { font-size: 9px; font-weight: 700; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seed-area-row .inp{ flex: 1; min-width: 0; padding: 9px 8px; box-sizing: border-box; font-size: 12px; }
.seed-box-active   { border-color: #22C55E !important; color: #065F46 !important; font-weight: 800 !important; background: #F0FDF4 !important; }
.seed-box-inactive { border-color: #E5E7EB !important; color: #9CA3AF !important; background: #F9FAFB !important; }

.sowing-date-row  { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; }
.sow-sel { flex: 1; border: 1.5px solid #E5E7EB; border-radius: 10px; padding: 9px 6px; font-size: 12px; font-family: inherit; background: #fff; outline: none; min-width: 0; }

.rot-banner     { border-radius: 12px; padding: 9px 13px; display: flex; align-items: center; gap: 8px; border: 1px solid; margin-bottom: 8px; overflow: hidden; word-break: break-word; }
#rot-banner, .rot-banner-wrap { padding: 0 14px; overflow: hidden; }

.g2  { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.g3  { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }

/* UTILITY MARGINS */
.mt2 { margin-top: 2px; }   .mt6  { margin-top: 6px; }   .mt8  { margin-top: 8px; }   .mt10 { margin-top: 10px; }
.mb6 { margin-bottom: 6px; }.mb8  { margin-bottom: 8px; } .mb10 { margin-bottom: 10px; }.mb14 { margin-bottom: 14px; }

/* ── 10. BUTONLAR VE AKSİYON TETİKLEYİCİLERİ ──────────────── */
.btn-save {
  width: 100%;
  background: linear-gradient(135deg, #1D4ED8, #3B82F6);
  border: none;
  border-radius: 14px;
  padding: 14px;
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  cursor: pointer;
  margin-top: 4px;
  font-family: inherit;
}

.btn-add {
  width: 100%;
  background: linear-gradient(135deg, #1D4ED8, #3B82F6);
  border: none;
  border-radius: 14px;
  padding: 14px;
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  cursor: pointer;
  font-family: inherit;
}

.btn-ai {
  width: 100%;
  background: linear-gradient(135deg, #7C3AED, #4F46E5);
  border: none;
  border-radius: 14px;
  padding: 12px;
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  cursor: pointer;
  margin-bottom: 8px;
  font-family: inherit;
}

.btn-sm {
  border: none;
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  font-family: inherit;
}

.btn-save-sticky-wrap {
  position: sticky;
  bottom: 0;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 10px 14px 14px;
  z-index: 20;
  border-top: 1px solid #F3F4F6;
  margin-top: 6px;
}

/* ── 11. YAPAY ZEKÂ VE DİYALOG MODAL PANELİ ───────────────── */
.ai-panel { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.45); z-index: 9999; display: flex; align-items: flex-end; justify-content: center; }
.ai-box   { background: #fff; border-radius: 24px 24px 0 0; width: 100%; max-width: 480px; max-height: 88vh; display: flex; flex-direction: column; }
.ai-hdr   { background: linear-gradient(135deg, #7C3AED, #4F46E5); padding: 14px 16px; border-radius: 24px 24px 0 0; display: flex; justify-content: space-between; align-items: center; }
.ai-msgs  { flex: 1; overflow-y: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.ai-bubble-user { background: linear-gradient(135deg, #1D4ED8, #3B82F6); color: #fff; border-radius: 18px 18px 4px 18px; padding: 10px 14px; font-size: 13px; max-width: 75%; line-height: 1.5; align-self: flex-end; }
.ai-bubble-bot  { background: #F2F5F9; color: #1C1C1E; border-radius: 18px 18px 18px 4px; padding: 10px 14px; font-size: 13px; max-width: 80%; line-height: 1.5; }
.ai-avatar { width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(135deg, #7C3AED, #4F46E5); display: flex; align-items: center; justify-content: center; font-size: 14px; flex-shrink: 0; }
.ai-footer { padding: 10px 14px; border-top: 1px solid #F2F5F9; display: flex; gap: 8px; align-items: center; }

.modal-back { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.4); z-index: 9998; display: flex; align-items: flex-end; justify-content: center; }
.modal-box  { background: #fff; border-radius: 24px 24px 0 0; width: 100%; max-width: 480px; overflow: hidden; display: flex; flex-direction: column; }
.modal-handle { width: 36px; height: 4px; background: #E5E7EB; border-radius: 99px; margin: 10px auto 0; }
.modal-cat-h  { font-size: 12px; font-weight: 900; color: #1C1C1E; padding: 10px 16px 6px; }
.modal-scroll { overflow-y: auto; padding: 0 10px 16px; }
.modal-item   { display: flex; align-items: center; gap: 12px; padding: 12px 10px; border-radius: 12px; cursor: pointer; margin-bottom: 2px; transition: background 0.15s; }
.modal-item:hover     { background: #F2F5F9; }
.modal-item:active    { background: #E8F0FE; }
.modal-item-active    { background: #EFF6FF; border: 1.5px solid #3B82F6; }
.unit-badge { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800; flex-shrink: 0; }

.lang-variant-row  { display: flex; align-items: center; gap: 10px; padding: 11px 14px; cursor: pointer; border-radius: 12px; margin: 1px 6px; transition: background .12s; }
.lang-variant-row:active { background: #EFF6FF; }
.lang-variant-row.active { background: #EFF6FF; }
.lang-variant-flag { font-size: 20px; flex-shrink: 0; }
.lang-variant-name { font-size: 13px; font-weight: 700; color: #1C1C1E; }
.lang-variant-sub  { font-size: 10px; color: #6B7280; margin-top: 1px; }

/* Akıllı Öneri Katmanı ve Animasyon Tetikleyicileri */
#smart-suggestions-panel { border-radius: 10px; animation: fadeInUp 0.25s ease; }
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

#crop-suggestion-chips button:hover {
  background: #DBEAFE !important;
  border-color: #60A5FA !important;
  transform: translateY(-1px);
  transition: all 0.15s ease;
}
#irrig-suggestion-card > div,
#usage-suggestion-card > div,
#soil-auto-card > div { transition: border-color 0.2s, background 0.2s; }

#irrig-suggestion-card button:hover,
#usage-suggestion-card button:hover {
  opacity: 0.88;
  transform: translateY(-1px);
  transition: all 0.15s ease;
}

/* ── 12. YASAL ONAY EKRANI (CONSENT SCREEN) ──────────────── */
.consent-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; background: linear-gradient(135deg, #1E3A8A, #1D4ED8); }
.consent-box  { background: #fff; border-radius: 24px; overflow: hidden; width: 100%; max-width: 400px; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.consent-hdr  { background: linear-gradient(135deg, #1E3A8A, #3B82F6); padding: 24px 20px; text-align: center; }
.consent-body { padding: 20px; }

/* ── 13. DATA, ROZET VE TARIMSAL METADATA KUTULARI ───────── */
.eppo-meta-line { min-height: 14px; margin-top: 2px; }
.eppo-meta-text { font-size: 9px; color: #9CA3AF; font-weight: 500; letter-spacing: .02em; }

.area-unit-badge {
  font-size: 11px; font-weight: 800; color: #1E40AF;
  background: #EFF6FF; border: 1.5px solid #BFDBFE;
  border-radius: 7px; padding: 3px 8px;
  flex-shrink: 0; white-space: nowrap;
  height: 28px; display: flex; align-items: center;
}

.soil-auto-badge   { background: #DCFCE7; color: #065F46; border-radius: 4px; padding: 2px 7px; font-size: 9px; font-weight: 700; border: 1px solid #86EFAC; }
.soil-manual-badge { background: #FEF3C7; color: #92400E; border-radius: 4px; padding: 2px 7px; font-size: 9px; font-weight: 700; border: 1px solid #FCD34D; }

.season-card { background: #FFFBEB; border: 1px solid #FDE68A; border-radius: 16px; padding: 10px 14px; margin: 0 0 8px; }

/* HOME METEOROLOJİ ŞERİDİ (WEATHER STRIP) COUPLING */
.home-wx-strip  { margin-top: 8px; border-top: 1px solid #E5E7EB; padding-top: 8px; }
.home-wx-scroll { display: flex; gap: 5px; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.home-wx-scroll::-webkit-scrollbar { display: none; }

@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .4; } }
.pulse { animation: pulse 1.2s infinite; }
.slide-up { animation: none; } /* CLS Önleme kilidi */

.rate-limit-banner { background: #FFF7ED; border: 1.5px solid #FDBA74; border-radius: 12px; padding: 10px 14px; margin-bottom: 8px; font-size: 12px; font-weight: 700; color: #9A3412; display: flex; align-items: flex-start; gap: 8px; line-height: 1.5; }

.field-type-toggle { display: flex; gap: 4px; margin-top: 2px; }
.field-type-btn    { flex: 1; border: 1.5px solid #E5E7EB; border-radius: 9px; padding: 8px 6px; font-size: 10px; font-weight: 700; background: #fff; cursor: pointer; color: #6B7280; text-align: center; transition: all .15s; font-family: inherit; }
.field-type-btn.active { border-color: #3B82F6; background: #EFF6FF; color: #1D4ED8; }

/* ── 14. KATI FORM TEMİZLİĞİ VE SÜZGEÇ KURALLARI ─────────── */
.form-card > p,
.form-card > span:not([class]),
.form-card > div > p,
#accuracy-bar,
.form-card .form-hint,
.form-card .form-note,
.field-hint,
.form-hint,
.input-hint,
.helper-text,
.suggestion-text,
.form-description,
.field-description,
.smart-tip,
.info-tip,
select option[disabled][hidden],
.crop-hint,
.soil-hint,
.irrig-hint,
.usage-hint {
  display: none !important;
}

/* ── 15. RESPONSIVE MEDİA QUERIES (ESNEK MEDYA KATMANLARI) ── */
@media (min-width: 768px) {
  .task-card       { padding: 14px 16px 12px; margin-bottom: 10px; }
  .tc-title        { font-size: 14px; }
  .tc-layer-agro-text   { font-size: 11px; }
  .tc-layer-farmer-text { font-size: 11.5px; }
  .tc-dose-name  { font-size: 13px; }
  .dpill          { font-size: 11px; padding: 3px 10px; }
  .tc-smart-advice { padding: 8px 11px; }
}

@media (min-width: 1024px) {
  .task-card       { padding: 16px 18px 14px; border-radius: 16px; }
  .tc-title        { font-size: 15px; }
}

@media (max-width: 480px) {
  #app           { padding-left: 0; padding-right: 0; }
  .cont          { padding: 10px 10px; gap: 8px; }
  .card          { padding: 12px; border-radius: 14px; }
  .form-card     { border-radius: 16px; }
  .hero          { padding: 12px; }
  .g2            { gap: 6px; }
  .g3            { gap: 4px; }
  .seed-area-row { gap: 3px; flex-wrap: nowrap; }
  .seed-box-lbl  { font-size: 8px; }
  .seed-area-row .inp { padding: 8px 5px; font-size: 11px; }
  .inp           { padding: 8px 10px; font-size: 12px; }
  .sel           { padding: 8px 10px; font-size: 11px; }
  .btn-save, .btn-add, .btn-ai { font-size: 14px; padding: 13px; }
  .sowing-date-row { gap: 4px; }
  .sow-sel       { padding: 8px 4px; font-size: 11px; }
  .tabs, .tab-bar{ gap: 1px; padding: 3px; border-radius: 10px; }
  .tab-btn       { font-size: 9px; padding: 6px 7px; }
  .hdr-logo      { font-size: 15px; }
  .task-card     { padding: 10px 12px; }
  .loc-strip-below { font-size: 11px; padding: 8px 12px; min-height: 36px; }
}

@media (max-width: 360px) {
  .cont          { padding: 8px; }
  .g2            { gap: 4px; }
  .seed-area-row .inp { font-size: 10px; padding: 7px 4px; }
  .seed-box-lbl  { font-size: 7.5px; }
  .sow-sel       { font-size: 10px; }
  .hdr-btn       { padding: 4px 8px; font-size: 10px; }
  .tab-btn       { font-size: 8px; padding: 5px 5px; }
}
/* ── ACCORDION — WillFarm v26.2 ─────────────────────────────
   Tüm ülkelerde geçerli, çiftçi görünümü için gürültü azaltma */
.wf-accordion-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 12px;
  cursor: pointer;
  user-select: none;
  border-radius: 8px 8px 0 0;
  transition: background 0.15s;
}
.wf-accordion-header:hover {
  filter: brightness(0.96);
}
.wf-accordion-body {
  overflow: hidden;
  transition: max-height 0.2s ease-out;
}
/* Görev kartı düzeni iyileştirmeleri */
.task-card .tc-verdict {
  margin-top: 6px;
}
.task-card .tc-phi-badge {
  font-size: 10px;
  background: #FEF3C7;
  border: 1px solid #FCD34D;
  border-radius: 4px;
  padding: 1px 7px;
  color: #92400E;
  font-weight: 700;
}

/* ── Auth Chip & Modal ─────────────────────────────────────── */
#wf-auth-chip button {
  white-space: nowrap;
  font-family: inherit;
}
#wf-auth-chip button:hover {
  opacity: 0.88;
}
/* Mobilde chip küçülsün */
@media (max-width: 380px) {
  #wf-auth-chip button {
    font-size: 11px !important;
    padding: 5px 10px !important;
  }
}

/* ── Masaüstü layout düzeltmeleri ───────────────────────────── */
@media (min-width: 600px) {
  /* App container max genişlik — mobil app hissi */
  #app {
    max-width: 680px;
    margin: 0 auto;
  }

  /* Tab bar — masaüstünde daha geniş, yazılar sığar */
  .tab-bar {
    gap: 4px;
    padding: 4px;
  }
  .tab-btn {
    font-size: 11px;
    padding: 8px 10px;
    white-space: nowrap;
  }

  /* Görev kartı yazı taşması */
  .tc-day-pill {
    max-width: 200px;
    white-space: nowrap;
  }
  .tc-title {
    white-space: normal;
    word-break: break-word;
  }
}

@media (min-width: 900px) {
  #app {
    max-width: 720px;
  }
  .tab-btn {
    font-size: 12px;
    padding: 8px 10px;
  }
}
