/* ── AgriConnect Jigawa – Main Stylesheet ─────────────────────────────── */
:root {
  --green-dark:   #1A3C2B;
  --green-main:   #2D6A4F;
  --green-mid:    #40916C;
  --green-light:  #52B788;
  --green-pale:   #D8F3DC;
  --yellow:       #F4D03F;
  --orange:       #E67E22;
  --text-dark:    #1A1A1A;
  --text-mid:     #4A4A4A;
  --text-muted:   #757575;
  --bg-light:     #F8FAF9;
  --bg-white:     #FFFFFF;
  --border:       #D0E8D8;
  --shadow-sm:    0 1px 3px rgba(0,0,0,0.08);
  --shadow-md:    0 4px 12px rgba(0,0,0,0.10);
  --radius-sm:    6px;
  --radius-md:    10px;
  --radius-lg:    16px;
  --font-main:    'Segoe UI', system-ui, -apple-system, sans-serif;
}

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

body {
  font-family: var(--font-main);
  font-size: 16px;
  color: var(--text-dark);
  background: var(--bg-white);
  line-height: 1.6;
}

/* ── TYPOGRAPHY ──────────────────────────────────────────────────────── */
h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 700; line-height: 1.2; }
h2 { font-size: clamp(1.4rem, 3vw, 2rem);   font-weight: 700; line-height: 1.3; }
h3 { font-size: 1.2rem; font-weight: 600; }
h4 { font-size: 1rem;   font-weight: 600; }
p  { color: var(--text-mid); margin-bottom: 0.75rem; }
a  { color: var(--green-main); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

/* ── LAYOUT ──────────────────────────────────────────────────────────── */
.container { max-width: 1140px; margin: 0 auto; padding: 0 1.25rem; }
.section    { padding: 4rem 0; }
.section-sm { padding: 2.5rem 0; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1.25rem; }
.flex    { display: flex; align-items: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }  .mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }  .mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; } .mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; } .mb-4 { margin-bottom: 2rem; }

/* ── NAVBAR ──────────────────────────────────────────────────────────── */
.navbar {
  background: var(--green-dark);
  padding: 0.9rem 0;
  position: sticky; top: 0; z-index: 999;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.navbar-inner {
  display: flex; align-items: center;
  justify-content: space-between; gap: 1rem;
}
.navbar-brand {
  display: flex; align-items: center; gap: 0.5rem;
  text-decoration: none;
}
.brand-icon {
  width: 36px; height: 36px; border-radius: 8px;
  background: var(--green-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
}
.brand-name {
  font-size: 1.15rem; font-weight: 700;
  color: #fff; line-height: 1.1;
}
.brand-sub { font-size: 0.65rem; color: var(--green-pale); font-weight: 400; letter-spacing: 0.5px; }
.nav-links {
  display: flex; align-items: center; gap: 0.25rem;
  list-style: none;
}
.nav-links a {
  color: #cce8d4; font-size: 0.9rem; font-weight: 500;
  padding: 0.45rem 0.85rem; border-radius: var(--radius-sm);
  text-decoration: none; transition: background 0.2s, color 0.2s;
}
.nav-links a:hover, .nav-links a.active {
  background: var(--green-mid); color: #fff;
}
.nav-right { display: flex; align-items: center; gap: 0.5rem; }
.lang-btn {
  background: transparent; border: 1px solid #5a8a6a;
  color: #cce8d4; font-size: 0.8rem; padding: 0.3rem 0.65rem;
  border-radius: var(--radius-sm); cursor: pointer; transition: all 0.2s;
}
.lang-btn:hover { background: var(--green-mid); color: #fff; border-color: var(--green-mid); }
.nav-hamburger { display: none; background: none; border: none; cursor: pointer; padding: 4px; }
.nav-hamburger span { display: block; width: 22px; height: 2px; background: #fff; margin: 4px 0; border-radius: 2px; }

@media (max-width: 768px) {
  .nav-links { display: none; flex-direction: column; position: absolute;
    top: 100%; left: 0; right: 0; background: var(--green-dark);
    padding: 1rem; gap: 0.25rem; }
  .nav-links.open { display: flex; }
  .nav-hamburger { display: block; }
  .navbar { position: relative; }
}

/* ── BUTTONS ─────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.65rem 1.4rem; border-radius: var(--radius-sm);
  font-size: 0.95rem; font-weight: 600; cursor: pointer;
  border: 2px solid transparent; transition: all 0.2s; text-decoration: none;
  white-space: nowrap;
}
.btn-primary   { background: var(--green-main); color: #fff; border-color: var(--green-main); }
.btn-primary:hover { background: var(--green-dark); border-color: var(--green-dark); color: #fff; text-decoration: none; }
.btn-outline   { background: transparent; color: var(--green-main); border-color: var(--green-main); }
.btn-outline:hover { background: var(--green-main); color: #fff; text-decoration: none; }
.btn-white     { background: #fff; color: var(--green-main); border-color: #fff; }
.btn-white:hover { background: var(--green-pale); border-color: var(--green-pale); text-decoration: none; }
.btn-yellow    { background: var(--yellow); color: var(--green-dark); border-color: var(--yellow); }
.btn-yellow:hover { background: #e2c030; border-color: #e2c030; text-decoration: none; }
.btn-sm { padding: 0.4rem 0.9rem; font-size: 0.85rem; }
.btn-lg { padding: 0.85rem 1.8rem; font-size: 1.05rem; }
.btn-block { width: 100%; justify-content: center; }

/* ── CARDS ───────────────────────────────────────────────────────────── */
.card {
  background: var(--bg-white); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 1.25rem;
  box-shadow: var(--shadow-sm); transition: box-shadow 0.2s, transform 0.2s;
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.card-img { width: 100%; height: 180px; object-fit: cover;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0; margin: -1.25rem -1.25rem 1rem -1.25rem; width: calc(100% + 2.5rem); }
.card-tag {
  display: inline-block; font-size: 0.75rem; font-weight: 600;
  padding: 0.2rem 0.6rem; border-radius: 20px; margin-bottom: 0.5rem;
  background: var(--green-pale); color: var(--green-dark);
}
.card-tag.orange { background: #fdebd0; color: #784212; }
.card-tag.blue   { background: #d6eaf8; color: #154360; }

/* ── FORMS ───────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 1.1rem; }
.form-group label { display: block; font-size: 0.88rem; font-weight: 600;
  color: var(--text-mid); margin-bottom: 0.35rem; }
.form-control {
  width: 100%; padding: 0.65rem 0.9rem;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  font-size: 0.95rem; color: var(--text-dark); background: var(--bg-white);
  transition: border-color 0.2s, box-shadow 0.2s; outline: none;
  font-family: var(--font-main);
}
.form-control:focus { border-color: var(--green-main); box-shadow: 0 0 0 3px rgba(45,106,79,0.12); }
select.form-control { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23757575' stroke-width='1.5' fill='none'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.8rem center; padding-right: 2rem; }
textarea.form-control { resize: vertical; min-height: 100px; }
.form-hint { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.3rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }
.input-group { position: relative; }
.input-group .form-control { padding-left: 2.5rem; }
.input-group .input-icon { position: absolute; left: 0.75rem; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 1rem; }

/* ── HERO ────────────────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--green-dark) 0%, var(--green-main) 60%, var(--green-mid) 100%);
  color: #fff; padding: 5rem 0 4rem;
  position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; top: -50%; right: -10%;
  width: 500px; height: 500px; border-radius: 50%;
  background: rgba(255,255,255,0.04); pointer-events: none;
}
.hero-content { max-width: 600px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 0.4rem;
  background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.2);
  color: #d8f3dc; font-size: 0.82rem; font-weight: 600;
  padding: 0.3rem 0.8rem; border-radius: 20px; margin-bottom: 1.25rem;
}
.hero h1 { color: #fff; margin-bottom: 1rem; }
.hero p   { color: #b7dfc5; font-size: 1.05rem; margin-bottom: 1.75rem; }
.hero-btns { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.hero-stats {
  display: flex; gap: 2rem; margin-top: 3rem;
  padding-top: 2rem; border-top: 1px solid rgba(255,255,255,0.15);
  flex-wrap: wrap;
}
.hero-stat-num  { font-size: 1.8rem; font-weight: 700; color: #fff; }
.hero-stat-label { font-size: 0.82rem; color: #9dcfae; }

/* ── SECTION HEADERS ─────────────────────────────────────────────────── */
.section-header { text-align: center; max-width: 580px; margin: 0 auto 2.5rem; }
.section-badge {
  display: inline-block; background: var(--green-pale); color: var(--green-dark);
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.5px;
  padding: 0.25rem 0.75rem; border-radius: 20px; margin-bottom: 0.75rem; text-transform: uppercase;
}
.section-header h2 { color: var(--green-dark); margin-bottom: 0.75rem; }
.section-header p  { color: var(--text-muted); font-size: 1rem; }

/* ── FEATURE ICONS ───────────────────────────────────────────────────── */
.feature-icon {
  width: 52px; height: 52px; border-radius: var(--radius-md);
  background: var(--green-pale); color: var(--green-main);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; margin-bottom: 1rem;
}

/* ── PRODUCE CARDS (Marketplace) ─────────────────────────────────────── */
.produce-card { background: var(--bg-white); border: 1px solid var(--border);
  border-radius: var(--radius-md); overflow: hidden; transition: all 0.2s; }
.produce-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.produce-img { width: 100%; height: 160px; background: var(--green-pale);
  display: flex; align-items: center; justify-content: center; font-size: 3.5rem; }
.produce-body { padding: 1rem; }
.produce-name { font-weight: 700; font-size: 1rem; color: var(--text-dark); margin-bottom: 0.2rem; }
.produce-price { font-size: 1.2rem; font-weight: 700; color: var(--green-main); }
.produce-meta { font-size: 0.82rem; color: var(--text-muted); margin-top: 0.35rem; }
.produce-seller { display: flex; align-items: center; gap: 0.4rem;
  font-size: 0.82rem; color: var(--text-mid); margin-top: 0.5rem;
  padding-top: 0.5rem; border-top: 1px solid var(--border); }
.seller-avatar { width: 24px; height: 24px; border-radius: 50%;
  background: var(--green-main); color: #fff; font-size: 0.7rem;
  font-weight: 700; display: flex; align-items: center; justify-content: center; }

/* ── ADVISORY CARDS ──────────────────────────────────────────────────── */
.crop-card { border: 1px solid var(--border); border-radius: var(--radius-md);
  overflow: hidden; cursor: pointer; transition: all 0.2s; }
.crop-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.crop-header { padding: 1.5rem 1.25rem; text-align: center; }
.crop-emoji  { font-size: 3rem; margin-bottom: 0.5rem; }
.crop-name   { font-weight: 700; color: #fff; font-size: 1.1rem; }
.crop-body   { padding: 1rem 1.25rem; background: #fff; }
.crop-tip    { font-size: 0.85rem; color: var(--text-mid); }
.tip-row     { display: flex; flex-direction: column; gap: 0.1rem;
  font-size: 0.85rem; color: var(--text-mid); padding: 0.4rem 0;
  border-bottom: 1px solid var(--border); }
.tip-row:last-child { border: none; }
.tip-label   { font-weight: 600; color: var(--green-dark); }

.detail-row  { display: flex; gap: 1rem; padding: 0.7rem 0;
  border-bottom: 1px solid var(--border); align-items: flex-start; }
.detail-row:last-of-type { border: none; }
.detail-label { font-weight: 600; color: var(--green-dark); min-width: 200px;
  font-size: 0.95rem; flex-shrink: 0; }
.detail-value { font-size: 0.95rem; color: var(--text-mid); }
@media (max-width: 600px) {
  .detail-row { flex-direction: column; gap: 0.2rem; }
  .detail-label { min-width: auto; }
}

/* ── BADGES / TAGS ───────────────────────────────────────────────────── */
.badge { display: inline-block; padding: 0.2rem 0.6rem; border-radius: 20px;
  font-size: 0.75rem; font-weight: 600; }
.badge-green  { background: var(--green-pale); color: var(--green-dark); }
.badge-yellow { background: #fef9e7; color: #7d6608; }
.badge-orange { background: #fdebd0; color: #784212; }
.badge-red    { background: #fdedec; color: #922b21; }

/* ── ALERTS ──────────────────────────────────────────────────────────── */
.alert { padding: 0.85rem 1rem; border-radius: var(--radius-sm);
  font-size: 0.9rem; margin-bottom: 1rem; display: flex; align-items: flex-start; gap: 0.6rem; }
.alert-success { background: #eafaf1; color: #1e8449; border: 1px solid #a9dfbf; }
.alert-error   { background: #fdedec; color: #922b21; border: 1px solid #f1948a; }
.alert-info    { background: #eaf2fb; color: #154360; border: 1px solid #85c1e9; }

/* ── FILTER BAR ──────────────────────────────────────────────────────── */
.filter-bar {
  background: var(--bg-white); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 1rem 1.25rem;
  display: flex; gap: 1rem; flex-wrap: wrap; align-items: flex-end;
  box-shadow: var(--shadow-sm); margin-bottom: 1.5rem;
}
.filter-bar .form-group { margin-bottom: 0; min-width: 150px; flex: 1; }
.filter-search { flex: 2; min-width: 220px; }

/* ── STATS BAR ───────────────────────────────────────────────────────── */
.stats-bar {
  background: var(--green-dark); color: #fff;
  padding: 2.5rem 0;
}
.stat-item { text-align: center; }
.stat-num  { font-size: 2.2rem; font-weight: 700; color: var(--yellow); }
.stat-lbl  { font-size: 0.85rem; color: #9dcfae; margin-top: 0.2rem; }

/* ── HOW IT WORKS ────────────────────────────────────────────────────── */
.step-num {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--green-main); color: #fff;
  font-size: 1.1rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1rem;
}

/* ── TESTIMONIALS ────────────────────────────────────────────────────── */
.testimonial { background: var(--bg-light); border-left: 4px solid var(--green-main);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 1.25rem 1.25rem 1.25rem 1.5rem; }
.testimonial-text { font-style: italic; color: var(--text-mid); margin-bottom: 0.75rem; }
.testimonial-author { font-weight: 600; font-size: 0.88rem; color: var(--green-dark); }
.testimonial-role   { font-size: 0.8rem; color: var(--text-muted); }

/* ── FOOTER ──────────────────────────────────────────────────────────── */
.footer { background: var(--green-dark); color: #9dcfae; padding: 3rem 0 1.5rem; }
.footer-brand { color: #fff; font-size: 1.1rem; font-weight: 700; margin-bottom: 0.5rem; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 0.4rem; }
.footer-links a  { color: #7ab890; font-size: 0.9rem; text-decoration: none; transition: color 0.2s; }
.footer-links a:hover { color: #fff; }
.footer-head { color: #fff; font-size: 0.85rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 0.75rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1);
  margin-top: 2rem; padding-top: 1.25rem;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.82rem; flex-wrap: wrap; gap: 0.5rem; }
.footer-bottom a { color: #7ab890; }

/* ── AUTH PAGES ──────────────────────────────────────────────────────── */
.auth-page { min-height: 100vh; display: flex; align-items: center;
  background: var(--bg-light); padding: 2rem 1rem; }
.auth-card { background: var(--bg-white); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md); padding: 2.5rem; width: 100%; max-width: 460px; margin: 0 auto; }
.auth-logo { text-align: center; margin-bottom: 1.75rem; }
.auth-logo .brand-icon { width: 52px; height: 52px; font-size: 1.6rem; margin: 0 auto 0.5rem; }
.auth-title { text-align: center; font-size: 1.4rem; font-weight: 700;
  color: var(--green-dark); margin-bottom: 0.25rem; }
.auth-sub   { text-align: center; font-size: 0.88rem; color: var(--text-muted); margin-bottom: 1.75rem; }
.divider    { text-align: center; position: relative; color: var(--text-muted);
  font-size: 0.82rem; margin: 1.25rem 0; }
.divider::before, .divider::after { content: ''; position: absolute;
  top: 50%; width: 40%; height: 1px; background: var(--border); }
.divider::before { left: 0; } .divider::after { right: 0; }
.role-selector { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin-bottom: 1.25rem; }
.role-option { border: 2px solid var(--border); border-radius: var(--radius-sm);
  padding: 0.75rem; text-align: center; cursor: pointer; transition: all 0.2s; }
.role-option:hover { border-color: var(--green-light); }
.role-option.selected { border-color: var(--green-main); background: var(--green-pale); }
.role-option .role-icon { font-size: 1.5rem; margin-bottom: 0.25rem; }
.role-option .role-label { font-size: 0.85rem; font-weight: 600; color: var(--text-dark); }

/* ── DASHBOARD ───────────────────────────────────────────────────────── */
.dashboard-layout { display: grid; grid-template-columns: 240px 1fr; min-height: calc(100vh - 62px); }
.sidebar { background: var(--green-dark); padding: 1.5rem 0; }
.sidebar-menu { list-style: none; }
.sidebar-menu a { display: flex; align-items: center; gap: 0.6rem;
  color: #9dcfae; font-size: 0.9rem; padding: 0.7rem 1.25rem;
  text-decoration: none; transition: all 0.2s; border-left: 3px solid transparent; }
.sidebar-menu a:hover, .sidebar-menu a.active {
  color: #fff; background: rgba(255,255,255,0.08); border-left-color: var(--green-light); }
.sidebar-menu .menu-icon { font-size: 1.1rem; }
.sidebar-section { padding: 0.5rem 1.25rem; font-size: 0.72rem; font-weight: 700;
  color: #5a8a6a; text-transform: uppercase; letter-spacing: 0.5px; margin-top: 1rem; }
.main-content { background: var(--bg-light); padding: 1.75rem; overflow-y: auto; }
.page-header { margin-bottom: 1.5rem; }
.page-title  { font-size: 1.4rem; font-weight: 700; color: var(--green-dark); }
.stat-cards  { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.stat-card   { background: var(--bg-white); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 1.1rem; }
.stat-card-label { font-size: 0.82rem; color: var(--text-muted); font-weight: 600; }
.stat-card-value { font-size: 1.8rem; font-weight: 700; color: var(--green-dark); margin: 0.15rem 0; }
.stat-card-change { font-size: 0.78rem; color: #1e8449; }
.stat-card-change.down { color: #922b21; }
@media (max-width: 768px) {
  .dashboard-layout { grid-template-columns: 1fr; }
  .sidebar { display: none; }
}

/* ── PRICE TICKER ────────────────────────────────────────────────────── */
.price-ticker { background: var(--green-dark); padding: 0.5rem 0; overflow: hidden; }
.ticker-inner { display: flex; gap: 2.5rem; animation: ticker 30s linear infinite; white-space: nowrap; }
.ticker-item  { color: #9dcfae; font-size: 0.82rem; display: flex; align-items: center; gap: 0.4rem; }
.ticker-item strong { color: #fff; }
.ticker-item .up   { color: #58d68d; }
.ticker-item .down { color: #ec7063; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ── UTILS ───────────────────────────────────────────────────────────── */
.text-green  { color: var(--green-main); }
.text-muted  { color: var(--text-muted); }
.text-dark   { color: var(--green-dark); }
.bg-green-pale { background: var(--green-pale); }
.bg-light    { background: var(--bg-light); }
.rounded     { border-radius: var(--radius-md); }
.shadow      { box-shadow: var(--shadow-md); }
.divider-h   { height: 1px; background: var(--border); margin: 1.25rem 0; }
.page-hero   { background: var(--green-pale); padding: 2.5rem 0; margin-bottom: 2rem; }
.page-hero h1 { color: var(--green-dark); font-size: 1.9rem; margin-bottom: 0.35rem; }
.page-hero p  { color: var(--text-mid); margin: 0; }
.empty-state  { text-align: center; padding: 3rem 1rem; color: var(--text-muted); }
.empty-state .empty-icon { font-size: 3rem; margin-bottom: 0.75rem; }

/* ── HAUSA FONT DIRECTION ────────────────────────────────────────────── */
[lang="ha"] { font-family: var(--font-main); }

/* ── RESPONSIVE ──────────────────────────────────────────────────────── */
@media (max-width: 900px) { .hero { padding: 3.5rem 0 3rem; } }
@media (max-width: 600px) {
  .section { padding: 2.5rem 0; }
  .hero-stats { gap: 1.25rem; }
  .stats-bar .grid-4 { grid-template-columns: 1fr 1fr; }
}
