/* ================================================================
   Pruthashakti Profit Farming Portal — Main Stylesheet
   Brand: #1B5E20 | #2E7D32 | #4CAF50 | #1976D2 | #F5A623 | #6D4C41
================================================================ */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

/* ----------------------------------------------------------------
   CSS Variables
---------------------------------------------------------------- */
:root {
  /* Brand Palette */
  --clr-primary-dark:   #1B5E20;
  --clr-primary:        #2E7D32;
  --clr-primary-light:  #4CAF50;
  --clr-blue:           #1976D2;
  --clr-amber:          #F5A623;
  --clr-brown:          #6D4C41;

  /* Extended */
  --clr-primary-50:     #E8F5E9;
  --clr-primary-100:    #C8E6C9;
  --clr-primary-200:    #A5D6A7;
  --clr-blue-50:        #E3F2FD;
  --clr-amber-50:       #FFF8E1;
  --clr-brown-50:       #EFEBE9;
  --clr-red:            #D32F2F;
  --clr-red-50:         #FFEBEE;

  /* Neutrals */
  --clr-white:          #FFFFFF;
  --clr-bg:             #F3F7F3;
  --clr-surface:        #FFFFFF;
  --clr-border:         #DDE8DD;
  --clr-txt-1:          #1A2B1A;
  --clr-txt-2:          #4A644A;
  --clr-txt-3:          #8FAA8F;

  /* Sidebar */
  --sidebar-w:          262px;
  --header-h:           64px;

  /* Spacing */
  --s1: 4px;  --s2: 8px;  --s3: 12px;  --s4: 16px;
  --s5: 20px; --s6: 24px; --s7: 32px;  --s8: 48px;

  /* Radii */
  --r1: 4px; --r2: 8px; --r3: 12px;
  --r4: 16px; --r5: 24px; --rfull: 9999px;

  /* Shadows */
  --shadow-xs: 0 1px 3px rgba(27,94,32,0.07);
  --shadow-sm: 0 2px 8px rgba(27,94,32,0.10);
  --shadow-md: 0 4px 18px rgba(27,94,32,0.14);
  --shadow-lg: 0 8px 32px rgba(27,94,32,0.18);

  /* Transitions */
  --t1: 0.18s ease;
  --t2: 0.32s cubic-bezier(0.4,0,0.2,1);
}

/* ----------------------------------------------------------------
   Reset
---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; height: 100%; overflow: hidden; }
body {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--clr-bg);
  color: var(--clr-txt-1);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  height: 100%; overflow: hidden;
}a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: inherit; border: none; outline: none; }
input, select, textarea { font-family: inherit; outline: none; }
ul { list-style: none; }

/* ----------------------------------------------------------------
   Typography
---------------------------------------------------------------- */
h1 { font-size: 1.875rem; font-weight: 700; line-height: 1.2; }
h2 { font-size: 1.5rem;   font-weight: 700; line-height: 1.3; }
h3 { font-size: 1.125rem; font-weight: 600; line-height: 1.4; }
h4 { font-size: 1rem;     font-weight: 600; }
h5 { font-size: 0.875rem; font-weight: 600; }

/* ----------------------------------------------------------------
   Utilities
---------------------------------------------------------------- */
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-1 { flex: 1; }
.gap-2 { gap: var(--s2); } .gap-3 { gap: var(--s3); } .gap-4 { gap: var(--s4); }
.text-center { text-align: center; }
.fw-500 { font-weight: 500; } .fw-600 { font-weight: 600; } .fw-700 { font-weight: 700; }
.text-muted { color: var(--clr-txt-3); }
.text-primary { color: var(--clr-primary); }
.mt-4 { margin-top: var(--s4); } .mb-4 { margin-bottom: var(--s4); }
.mt-6 { margin-top: var(--s6); } .mb-6 { margin-bottom: var(--s6); }
.hidden { display: none !important; }
.w-full { width: 100%; }

/* Scrollbar */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--clr-primary-100); border-radius: var(--rfull); }
::-webkit-scrollbar-thumb:hover { background: var(--clr-primary-light); }

/* ================================================================
   BUTTONS
================================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: var(--s2); padding: 10px 20px;
  border-radius: var(--r2); font-size: 0.875rem; font-weight: 600;
  transition: all var(--t1); white-space: nowrap; border: none;
  cursor: pointer;
}
.btn-sm  { padding: 6px 14px;  font-size: 0.8rem;  border-radius: var(--r2); }
.btn-lg  { padding: 14px 28px; font-size: 1rem; }
.btn-block { width: 100%; justify-content: center; }
.btn-icon { width: 36px; height: 36px; padding: 0; border-radius: var(--r2); }

.btn-primary {
  background: var(--clr-primary);
  color: var(--clr-white);
  box-shadow: 0 2px 10px rgba(46,125,50,0.35);
}
.btn-primary:hover { background: var(--clr-primary-dark); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(46,125,50,0.45); }

.btn-outline {
  background: transparent; color: var(--clr-primary);
  border: 1.5px solid var(--clr-primary);
}
.btn-outline:hover { background: var(--clr-primary-50); }

.btn-amber {
  background: var(--clr-amber); color: var(--clr-white);
  box-shadow: 0 2px 10px rgba(245,166,35,0.35);
}
.btn-amber:hover { background: #DC8F0D; transform: translateY(-1px); }

.btn-blue {
  background: var(--clr-blue); color: var(--clr-white);
  box-shadow: 0 2px 10px rgba(25,118,210,0.3);
}
.btn-blue:hover { background: #1565C0; transform: translateY(-1px); }

.btn-ghost {
  background: var(--clr-bg); color: var(--clr-txt-2); border: 1px solid var(--clr-border);
}
.btn-ghost:hover { background: var(--clr-primary-50); color: var(--clr-primary); border-color: var(--clr-primary-light); }

.btn-danger { background: var(--clr-red); color: var(--clr-white); }
.btn-danger:hover { background: #B71C1C; }

/* ================================================================
   FORM ELEMENTS
================================================================ */
.form-group { margin-bottom: var(--s4); }
.form-label {
  display: block; font-size: 0.8125rem; font-weight: 500;
  color: var(--clr-txt-1); margin-bottom: var(--s1);
}
.form-control {
  display: block; width: 100%; padding: 10px 14px;
  border: 1.5px solid var(--clr-border); border-radius: var(--r2);
  font-size: 0.875rem; color: var(--clr-txt-1); background: var(--clr-white);
  transition: border-color var(--t1), box-shadow var(--t1);
}
.form-control:focus { border-color: var(--clr-primary-light); box-shadow: 0 0 0 3px rgba(76,175,80,0.15); }
.form-control::placeholder { color: var(--clr-txt-3); }
.form-control.is-invalid { border-color: var(--clr-red); }
.form-control:disabled { background: var(--clr-bg); cursor: not-allowed; }

textarea.form-control { resize: vertical; min-height: 90px; }

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='%238FAA8F' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px;
}

.input-group { position: relative; }
.input-icon {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--clr-txt-3); font-size: 0.9rem; pointer-events: none;
}
.input-group .form-control { padding-left: 38px; }
.input-suffix {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: var(--clr-txt-3); cursor: pointer; font-size: 0.9rem;
  display: flex; align-items: center; justify-content: center;
}

.invalid-feedback { font-size: 0.72rem; color: var(--clr-red); margin-top: 3px; }
.form-text       { font-size: 0.72rem; color: var(--clr-txt-3); margin-top: 3px; }

/* Form Row */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s4); }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }

/* ================================================================
   BADGES
================================================================ */
.badge {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 3px 9px; border-radius: var(--rfull);
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.3px; text-transform: uppercase;
}
.badge-success { background: var(--clr-primary-50);  color: var(--clr-primary-dark); }
.badge-warning { background: var(--clr-amber-50);    color: #9A5000; }
.badge-info    { background: var(--clr-blue-50);     color: #0D47A1; }
.badge-danger  { background: var(--clr-red-50);      color: var(--clr-red); }
.badge-muted   { background: #F5F5F5;                color: #616161; }
.badge-brown   { background: var(--clr-brown-50);    color: #4E342E; }

/* ================================================================
   CARDS
================================================================ */
.card {
  background: var(--clr-white); border-radius: var(--r4);
  box-shadow: var(--shadow-xs); border: 1px solid var(--clr-border); overflow: hidden;
}
.card-header {
  padding: var(--s4) var(--s6); border-bottom: 1px solid var(--clr-border);
  display: flex; align-items: center; justify-content: space-between;
}
.card-header h3 { font-size: 0.9375rem; font-weight: 600; color: var(--clr-txt-1); }
.card-body { padding: var(--s6); }
.card-footer { padding: var(--s4) var(--s6); border-top: 1px solid var(--clr-border); background: var(--clr-bg); }

/* Stat Card */
.stat-card {
  background: var(--clr-white); border-radius: var(--r4);
  padding: var(--s5); display: flex; align-items: center; gap: var(--s4);
  box-shadow: var(--shadow-xs); border: 1px solid var(--clr-border);
  transition: box-shadow var(--t1), transform var(--t1);
}
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.stat-icon {
  width: 52px; height: 52px; border-radius: var(--r3);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.35rem; flex-shrink: 0;
}
.stat-icon.green  { background: var(--clr-primary-50);  color: var(--clr-primary); }
.stat-icon.blue   { background: var(--clr-blue-50);      color: var(--clr-blue); }
.stat-icon.amber  { background: var(--clr-amber-50);     color: #9A5000; }
.stat-icon.brown  { background: var(--clr-brown-50);     color: var(--clr-brown); }
.stat-icon.red    { background: var(--clr-red-50);       color: var(--clr-red); }

.stat-info { flex: 1; min-width: 0; }
.stat-value { font-size: 1.75rem; font-weight: 800; color: var(--clr-txt-1); line-height: 1; }
.stat-label { font-size: 0.775rem; color: var(--clr-txt-3); margin-top: 3px; font-weight: 500; }
.stat-change { font-size: 0.72rem; font-weight: 600; margin-top: 4px; }
.stat-change.up   { color: var(--clr-primary); }
.stat-change.down { color: var(--clr-red); }

/* ================================================================
   TABS
================================================================ */
.tab-nav {
  display: flex; gap: 2px;
  border-bottom: 2px solid var(--clr-border);
  margin-bottom: var(--s6);
  overflow-x: auto;
}
.tab-nav::-webkit-scrollbar { height: 0; }
.tab-btn {
  display: flex; align-items: center; gap: var(--s2);
  padding: 10px 18px; background: none; border: none;
  border-bottom: 2px solid transparent; margin-bottom: -2px;
  font-size: 0.85rem; font-weight: 500; color: var(--clr-txt-3);
  transition: all var(--t1); white-space: nowrap; cursor: pointer;
}
.tab-btn:hover { color: var(--clr-primary); }
.tab-btn.active { color: var(--clr-primary); border-bottom-color: var(--clr-primary); font-weight: 600; }
.tab-badge {
  background: var(--clr-amber); color: var(--clr-white);
  font-size: 0.62rem; font-weight: 700; padding: 1px 6px;
  border-radius: var(--rfull); min-width: 18px; text-align: center;
}
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ================================================================
   TABLE
================================================================ */
.table-wrapper { overflow-x: auto; border-radius: var(--r3); border: 1px solid var(--clr-border); }
.table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.table thead { background: var(--clr-primary-50); }
.table th {
  padding: 11px 16px; text-align: left; font-size: 0.72rem; font-weight: 700;
  color: var(--clr-primary-dark); text-transform: uppercase; letter-spacing: 0.5px; white-space: nowrap;
}
.table td {
  padding: 12px 16px; border-bottom: 1px solid var(--clr-border);
  color: var(--clr-txt-1); vertical-align: middle;
}
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr { transition: background var(--t1); }
.table tbody tr:hover { background: var(--clr-primary-50); }

/* ================================================================
   PROGRESS
================================================================ */
.progress {
  height: 7px; background: var(--clr-border);
  border-radius: var(--rfull); overflow: hidden;
}
.progress-bar {
  height: 100%; border-radius: var(--rfull);
  background: var(--clr-primary-light); transition: width 0.5s ease;
}
.progress-bar.blue  { background: var(--clr-blue); }
.progress-bar.amber { background: var(--clr-amber); }
.progress-bar.red   { background: var(--clr-red); }

/* ================================================================
   MODAL
================================================================ */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(10,20,10,0.55);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000; padding: var(--s4);
  opacity: 0; pointer-events: none; transition: opacity var(--t2);
}
.modal-overlay.open { opacity: 1; pointer-events: all; }

.modal {
  background: var(--clr-white); border-radius: var(--r4);
  box-shadow: var(--shadow-lg); width: 100%; max-width: 640px;
  max-height: 92vh; overflow-y: auto;
  transform: translateY(24px); transition: transform var(--t2);
}
.modal-overlay.open .modal { transform: translateY(0); }

.modal-header {
  padding: var(--s5) var(--s6); border-bottom: 1px solid var(--clr-border);
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; background: var(--clr-white); z-index: 2;
}
.modal-title { font-size: 1.05rem; font-weight: 700; color: var(--clr-txt-1); }
.modal-close {
  background: var(--clr-bg); border: none; width: 32px; height: 32px;
  border-radius: var(--r2); display: flex; align-items: center; justify-content: center;
  color: var(--clr-txt-3); font-size: 0.9rem; transition: all var(--t1);
}
.modal-close:hover { background: var(--clr-primary-50); color: var(--clr-primary); }
.modal-body { padding: var(--s6); }
.modal-footer {
  padding: var(--s4) var(--s6); border-top: 1px solid var(--clr-border);
  display: flex; gap: var(--s2); justify-content: flex-end;
  background: var(--clr-bg);
}

/* Modal LG */
.modal.modal-lg { max-width: 820px; }

/* ================================================================
   SIDEBAR + APP LAYOUT
================================================================ */
.app-layout { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w); background: var(--clr-primary-dark);
  display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0; height: 100vh; z-index: 300;
  transition: transform var(--t2); overflow-y: auto; overflow-x: hidden;
}

/* Sidebar Logo */
.sidebar-logo {
  padding: 0 var(--s4); height: var(--header-h);
  display: flex; align-items: center; gap: var(--s3);
  border-bottom: 1px solid rgba(255,255,255,0.1); flex-shrink: 0;
}
.sidebar-logo-icon {
  width: 38px; height: 38px; background: var(--clr-primary-light);
  border-radius: var(--r2); display: flex; align-items: center;
  justify-content: center; flex-shrink: 0;
}
.sidebar-logo-icon img { width: 22px; height: 22px; }
.sidebar-logo-text { overflow: hidden; }
.sidebar-brand-name {
  font-size: 0.95rem; font-weight: 700; color: var(--clr-white);
  white-space: nowrap; line-height: 1.2;
}
.sidebar-brand-sub {
  font-size: 0.62rem; color: rgba(255,255,255,0.55); white-space: nowrap;
}

/* Sidebar Nav */
.sidebar-nav { flex: 1; padding: var(--s2) 0; }
.nav-section-label {
  padding: var(--s3) var(--s4) var(--s1);
  font-size: 0.62rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1.2px; color: rgba(255,255,255,0.35);
}
.nav-item {
  display: flex; align-items: center; gap: var(--s3);
  padding: 10px var(--s4); color: rgba(255,255,255,0.72);
  font-size: 0.865rem; font-weight: 500; cursor: pointer;
  transition: all var(--t1); position: relative; white-space: nowrap;
}
.nav-item:hover { background: rgba(255,255,255,0.07); color: var(--clr-white); }
.nav-item.active {
  background: rgba(76,175,80,0.18); color: var(--clr-primary-light); font-weight: 600;
}
.nav-item.active::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px; background: var(--clr-primary-light); border-radius: 0 3px 3px 0;
}
.nav-icon { font-size: 1rem; width: 20px; text-align: center; flex-shrink: 0; }
.nav-badge {
  margin-left: auto; background: var(--clr-amber); color: var(--clr-white);
  font-size: 0.62rem; font-weight: 700; padding: 1px 7px; border-radius: var(--rfull);
}

/* Sidebar User */
.sidebar-footer {
  padding: var(--s3) var(--s4); border-top: 1px solid rgba(255,255,255,0.1); flex-shrink: 0;
}
.sidebar-user {
  display: flex; align-items: center; gap: var(--s3);
  padding: var(--s2) var(--s3); border-radius: var(--r2); cursor: pointer;
  transition: background var(--t1);
}
.sidebar-user:hover { background: rgba(255,255,255,0.07); }
.sidebar-avatar {
  width: 36px; height: 36px; background: var(--clr-primary-light);
  border-radius: var(--rfull); display: flex; align-items: center;
  justify-content: center; font-size: 0.875rem; font-weight: 700;
  color: var(--clr-white); flex-shrink: 0;
}
.sidebar-user-name { font-size: 0.82rem; font-weight: 600; color: var(--clr-white); white-space: nowrap; }
.sidebar-user-role { font-size: 0.66rem; color: rgba(255,255,255,0.5); white-space: nowrap; }
.sidebar-logout-btn {
  margin-left: auto; background: none; border: none;
  color: rgba(255,255,255,0.45); font-size: 0.85rem; cursor: pointer;
  transition: color var(--t1);
}
.sidebar-logout-btn:hover { color: var(--clr-amber); }

/* Sidebar Overlay (mobile) */
.sidebar-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.45); z-index: 299;
}
.sidebar-overlay.open { display: block; }

/* ================================================================
   MAIN CONTENT
================================================================ */
.main-content {
  margin-left: var(--sidebar-w); flex: 1;
  display: flex; flex-direction: column;
  height: 100vh; overflow-y: auto; overflow-x: hidden;
  transition: margin-left var(--t2);
}

/* ================================================================
   HEADER
================================================================ */
.app-header {
  height: var(--header-h); background: var(--clr-white);
  border-bottom: 1px solid var(--clr-border);
  display: flex; align-items: center; gap: var(--s4);
  padding: 0 var(--s6); position: sticky; top: 0; z-index: 200;
  box-shadow: var(--shadow-xs); flex-shrink: 0;
}
.header-toggle {
  background: none; border: none; font-size: 1.15rem;
  color: var(--clr-txt-2); padding: 7px; border-radius: var(--r2);
  display: none; transition: all var(--t1); flex-shrink: 0;
}
.header-toggle:hover { background: var(--clr-bg); }
.header-breadcrumb { flex: 1; min-width: 0; }
.header-page-title { font-size: 1.05rem; font-weight: 700; color: var(--clr-txt-1); }
.header-page-sub   { font-size: 0.72rem; color: var(--clr-txt-3); }
.header-actions { display: flex; align-items: center; gap: var(--s2); flex-shrink: 0; }
.header-icon-btn {
  position: relative; background: var(--clr-bg); border: none;
  width: 38px; height: 38px; border-radius: var(--r2);
  display: flex; align-items: center; justify-content: center;
  color: var(--clr-txt-2); font-size: 0.95rem; transition: all var(--t1);
}
.header-icon-btn:hover { background: var(--clr-primary-50); color: var(--clr-primary); }
.notif-dot {
  position: absolute; top: 7px; right: 7px;
  width: 7px; height: 7px; background: var(--clr-amber);
  border-radius: var(--rfull); border: 2px solid var(--clr-white);
}
.header-user {
  display: flex; align-items: center; gap: var(--s2);
  padding: 4px 10px; border-radius: var(--r2); cursor: pointer;
  transition: background var(--t1);
}
.header-user:hover { background: var(--clr-bg); }
.header-avatar {
  width: 36px; height: 36px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--clr-primary), var(--clr-primary-light));
  border-radius: var(--rfull); display: flex; align-items: center;
  justify-content: center; font-size: 0.875rem; font-weight: 700; color: var(--clr-white);
}
.header-user-info { display: none; }
.header-user-name { font-size: 0.82rem; font-weight: 600; color: var(--clr-txt-1); line-height: 1.2; }
.header-user-role { font-size: 0.68rem; color: var(--clr-txt-3); }

/* ================================================================
   PAGE CONTENT
================================================================ */
.page-content { flex: 1; padding: var(--s6); }

/* Section header */
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: var(--s5); flex-wrap: wrap; gap: var(--s3);
}
.section-title { font-size: 1rem; font-weight: 700; color: var(--clr-txt-1); }
.section-sub   { font-size: 0.78rem; color: var(--clr-txt-3); margin-top: 1px; }

/* Stats Grid */
.stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: var(--s4); margin-bottom: var(--s6);
}

/* Content Grid */
.grid-2 { display: grid; grid-template-columns: 2fr 1fr; gap: var(--s5); }
.grid-equal { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s5); }

/* ================================================================
   SEARCH BAR
================================================================ */
.search-bar {
  display: flex; gap: var(--s3); margin-bottom: var(--s5); flex-wrap: wrap;
}
.search-wrapper { position: relative; flex: 1; min-width: 200px; }
.search-wrapper i {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--clr-txt-3); font-size: 0.875rem;
}
.search-input {
  width: 100%; padding: 9px 14px 9px 36px;
  border: 1.5px solid var(--clr-border); border-radius: var(--r2);
  font-size: 0.85rem; background: var(--clr-white);
  transition: border-color var(--t1); font-family: inherit;
}
.search-input:focus { border-color: var(--clr-primary-light); outline: none; box-shadow: 0 0 0 3px rgba(76,175,80,0.12); }
.filter-select {
  padding: 9px 32px 9px 12px; border: 1.5px solid var(--clr-border);
  border-radius: var(--r2); font-size: 0.82rem; background: var(--clr-white);
  color: var(--clr-txt-1); appearance: none; font-family: inherit;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='%238FAA8F' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; cursor: pointer;
  transition: border-color var(--t1);
}
.filter-select:focus { border-color: var(--clr-primary-light); outline: none; }

/* ================================================================
   TIMELINE (Activity / Visit Log)
================================================================ */
.timeline { position: relative; padding-left: 28px; }
.timeline::before {
  content: ''; position: absolute; left: 9px; top: 4px; bottom: 4px;
  width: 2px; background: var(--clr-border);
}
.timeline-item { position: relative; padding-bottom: var(--s5); }
.timeline-dot {
  position: absolute; left: -28px; top: 3px;
  width: 18px; height: 18px; border-radius: var(--rfull);
  background: var(--clr-primary-light); border: 3px solid var(--clr-white);
  box-shadow: 0 0 0 2px var(--clr-primary-light);
}
.timeline-dot.blue  { background: var(--clr-blue);  box-shadow: 0 0 0 2px var(--clr-blue); }
.timeline-dot.amber { background: var(--clr-amber); box-shadow: 0 0 0 2px var(--clr-amber); }
.timeline-dot.muted { background: var(--clr-txt-3); box-shadow: 0 0 0 2px var(--clr-txt-3); }
.timeline-time { font-size: 0.68rem; color: var(--clr-txt-3); margin-bottom: 2px; }
.timeline-text { font-size: 0.82rem; font-weight: 600; color: var(--clr-txt-1); }
.timeline-sub  { font-size: 0.75rem; color: var(--clr-txt-2); }

/* ================================================================
   PLAN SECTION (Consulting Plan Details)
================================================================ */
.plan-accordion {
  border: 1.5px solid var(--clr-border); border-radius: var(--r3);
  margin-bottom: var(--s3); overflow: hidden;
}
.plan-accordion-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--s3) var(--s4); background: var(--clr-bg); cursor: pointer;
  transition: background var(--t1); user-select: none;
}
.plan-accordion-header:hover { background: var(--clr-primary-50); }
.plan-accordion-title {
  display: flex; align-items: center; gap: var(--s3);
  font-size: 0.875rem; font-weight: 600; color: var(--clr-txt-1);
}
.plan-acc-icon {
  width: 30px; height: 30px; border-radius: var(--r2);
  display: flex; align-items: center; justify-content: center; font-size: 0.875rem;
}
.plan-acc-icon.blue  { background: var(--clr-blue-50);  color: var(--clr-blue); }
.plan-acc-icon.green { background: var(--clr-primary-50); color: var(--clr-primary); }
.plan-acc-icon.amber { background: var(--clr-amber-50);  color: #9A5000; }
.plan-acc-icon.brown { background: var(--clr-brown-50);  color: var(--clr-brown); }
.plan-accordion-body { padding: var(--s4); display: none; }
.plan-accordion.open .plan-accordion-body { display: block; }
.plan-accordion-chevron { transition: transform var(--t1); color: var(--clr-txt-3); }
.plan-accordion.open .plan-accordion-chevron { transform: rotate(180deg); }

/* Plan Progress Steps */
.plan-steps {
  display: flex; gap: 0; overflow-x: auto;
  margin-bottom: var(--s6); padding-bottom: var(--s2);
}
.plan-step { flex: 1; text-align: center; position: relative; min-width: 70px; }
.plan-step::after {
  content: ''; position: absolute; top: 13px; left: calc(50% + 14px);
  right: calc(-50% + 14px); height: 2px; background: var(--clr-border);
}
.plan-step:last-child::after { display: none; }
.step-dot {
  width: 28px; height: 28px; border-radius: var(--rfull);
  background: var(--clr-white); border: 2px solid var(--clr-border);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem; color: var(--clr-txt-3); margin: 0 auto 4px;
  position: relative; z-index: 1;
}
.plan-step.done .step-dot  { background: var(--clr-primary-light); border-color: var(--clr-primary-light); color: var(--clr-white); }
.plan-step.active .step-dot { background: var(--clr-white); border-color: var(--clr-primary); color: var(--clr-primary); box-shadow: 0 0 0 3px rgba(76,175,80,0.2); }
.step-label { font-size: 0.62rem; font-weight: 500; color: var(--clr-txt-3); }
.plan-step.done .step-label, .plan-step.active .step-label { color: var(--clr-primary); font-weight: 700; }

/* Farmer profile card in table */
.farmer-cell { display: flex; align-items: center; gap: var(--s3); }
.farmer-avatar-sm {
  width: 36px; height: 36px; border-radius: var(--rfull); flex-shrink: 0;
  background: linear-gradient(135deg, var(--clr-primary), var(--clr-primary-light));
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; font-weight: 700; color: var(--clr-white);
}
.farmer-name-cell { font-weight: 600; font-size: 0.85rem; color: var(--clr-txt-1); }
.farmer-id-cell   { font-size: 0.72rem; color: var(--clr-txt-3); }

/* Plan Component Mini Status */
.plan-mini-status { display: flex; gap: var(--s1); align-items: center; }
.plan-mini-item {
  width: 22px; height: 22px; border-radius: var(--r1);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.6rem; font-weight: 700; position: relative;
  cursor: default;
}
.plan-mini-item[title]:hover::after {
  content: attr(title);
  position: absolute; bottom: calc(100% + 4px); left: 50%; transform: translateX(-50%);
  background: var(--clr-txt-1); color: var(--clr-white);
  font-size: 0.62rem; white-space: nowrap; padding: 2px 7px;
  border-radius: var(--r1); pointer-events: none; z-index: 10;
}
.plan-mini-item.done   { background: var(--clr-primary-50);  color: var(--clr-primary); }
.plan-mini-item.active { background: var(--clr-amber-50);    color: #9A5000; }
.plan-mini-item.pending{ background: #F5F5F5;                 color: var(--clr-txt-3); }

/* Plan Card (consulting plan cards view) */
.plan-card {
  background: var(--clr-white); border: 1px solid var(--clr-border);
  border-radius: var(--r4); padding: var(--s5);
  transition: all var(--t1);
}
.plan-card:hover { box-shadow: var(--shadow-md); border-color: var(--clr-primary-light); transform: translateY(-2px); }
.plan-card-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: var(--s4); }
.plan-card-farmer { display: flex; align-items: center; gap: var(--s3); }
.plan-card-avatar {
  width: 44px; height: 44px; border-radius: var(--rfull); flex-shrink: 0;
  background: linear-gradient(135deg, var(--clr-primary), var(--clr-primary-light));
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; font-weight: 700; color: var(--clr-white);
}
.plan-card-name    { font-weight: 700; font-size: 0.9rem; color: var(--clr-txt-1); }
.plan-card-village { font-size: 0.72rem; color: var(--clr-txt-3); margin-top: 1px; }
.plan-components { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s2); margin-top: var(--s4); }
.plan-comp-item {
  background: var(--clr-bg); border-radius: var(--r2); padding: var(--s2) var(--s3);
  display: flex; align-items: center; gap: var(--s2); border: 1px solid var(--clr-border);
}
.plan-comp-icon { font-size: 0.8rem; }
.plan-comp-label { font-size: 0.72rem; font-weight: 500; color: var(--clr-txt-2); flex: 1; }
.plan-comp-status { font-size: 0.6rem; font-weight: 700; }
.plan-comp-status.done    { color: var(--clr-primary); }
.plan-comp-status.ongoing { color: #9A5000; }
.plan-comp-status.pending { color: var(--clr-txt-3); }

/* Plan Cards Grid */
.plan-cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--s5); }

/* ================================================================
   REPORT CHART (CSS-only bar chart)
================================================================ */
.bar-chart { display: flex; gap: var(--s3); align-items: flex-end; height: 120px; }
.bar-col { display: flex; flex-direction: column; align-items: center; gap: var(--s2); flex: 1; }
.bar { width: 100%; background: var(--clr-primary-100); border-radius: var(--r1) var(--r1) 0 0; min-height: 4px; transition: background var(--t1); }
.bar:hover { background: var(--clr-primary-light); }
.bar-label { font-size: 0.65rem; color: var(--clr-txt-3); white-space: nowrap; }
.bar-value { font-size: 0.68rem; font-weight: 700; color: var(--clr-txt-2); }

/* ================================================================
   TOAST
================================================================ */
.toast-container {
  position: fixed; bottom: var(--s6); right: var(--s6);
  z-index: 2000; display: flex; flex-direction: column; gap: var(--s2);
}
.toast {
  display: flex; align-items: center; gap: var(--s3);
  padding: 12px var(--s4); background: var(--clr-white);
  border-radius: var(--r3); box-shadow: var(--shadow-lg);
  border-left: 4px solid var(--clr-primary);
  min-width: 270px; max-width: 380px;
  animation: toastIn 0.3s ease;
}
.toast.success { border-left-color: var(--clr-primary); }
.toast.error   { border-left-color: var(--clr-red); }
.toast.warning { border-left-color: var(--clr-amber); }
.toast-icon { font-size: 1rem; }
.toast.success .toast-icon { color: var(--clr-primary); }
.toast.error   .toast-icon { color: var(--clr-red); }
.toast.warning .toast-icon { color: var(--clr-amber); }
.toast-msg { font-size: 0.85rem; font-weight: 500; flex: 1; }
.toast-close { background: none; border: none; color: var(--clr-txt-3); cursor: pointer; font-size: 0.8rem; }
@keyframes toastIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* Spinner */
.spinner {
  width: 16px; height: 16px; display: inline-block;
  border: 2px solid rgba(255,255,255,0.35); border-top-color: #fff;
  border-radius: 50%; animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ================================================================
   LOGIN PAGE
================================================================ */
.login-wrapper { min-height: 100vh; display: flex; }

.login-brand {
  flex: 0 0 44%; display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: var(--s8) var(--s7);
  background: linear-gradient(150deg, var(--clr-primary-dark) 0%, var(--clr-primary) 55%, #388E3C 100%);
  position: relative; overflow: hidden;
}
.login-brand::before {
  content: ''; position: absolute; top: -100px; right: -80px;
  width: 320px; height: 320px; background: rgba(255,255,255,0.04); border-radius: 50%;
}
.login-brand::after {
  content: ''; position: absolute; bottom: -120px; left: -80px;
  width: 280px; height: 280px; background: rgba(255,255,255,0.05); border-radius: 50%;
}
.brand-logo-wrap {
  width: 80px; height: 80px; background: rgba(255,255,255,0.15);
  border-radius: var(--r5); display: flex; align-items: center; justify-content: center;
  margin-bottom: var(--s5); border: 1px solid rgba(255,255,255,0.2);
  backdrop-filter: blur(10px); z-index: 1;
}
.brand-logo-wrap img { width: 46px; height: 46px; }
.brand-name { font-size: 1.7rem; font-weight: 800; color: var(--clr-white); text-align: center; z-index: 1; }
.brand-sub  {
  font-size: 0.82rem; color: rgba(255,255,255,0.7); text-align: center;
  margin-top: var(--s1); margin-bottom: var(--s7); z-index: 1; line-height: 1.6;
}
.brand-features { width: 100%; max-width: 320px; z-index: 1; }
.brand-feature {
  display: flex; align-items: flex-start; gap: var(--s3);
  margin-bottom: var(--s4); color: rgba(255,255,255,0.85); font-size: 0.85rem;
}
.brand-feat-icon {
  width: 28px; height: 28px; background: rgba(255,255,255,0.15);
  border-radius: var(--r2); display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; flex-shrink: 0; margin-top: 1px;
}
.brand-version {
  margin-top: auto; padding-top: var(--s6);
  font-size: 0.68rem; color: rgba(255,255,255,0.38); text-align: center; z-index: 1;
}

.login-panel {
  flex: 1; display: flex; align-items: center; justify-content: center;
  padding: var(--s7) var(--s6); background: var(--clr-white);
}
.login-form-wrap { width: 100%; max-width: 430px; }

.login-mobile-logo {
  display: none; align-items: center; gap: var(--s3); margin-bottom: var(--s7);
}
.login-mobile-logo-icon {
  width: 46px; height: 46px; background: var(--clr-primary);
  border-radius: var(--r3); display: flex; align-items: center; justify-content: center;
}
.login-mobile-logo-icon img { width: 28px; height: 28px; }
.login-mobile-brand { font-size: 1rem; font-weight: 800; color: var(--clr-primary-dark); line-height: 1.2; }
.login-mobile-sub   { font-size: 0.68rem; color: var(--clr-txt-3); }

.login-greeting h2 { font-size: 1.75rem; font-weight: 800; color: var(--clr-txt-1); }
.login-greeting p  { font-size: 0.875rem; color: var(--clr-txt-3); margin-top: var(--s1); }
.login-greeting { margin-bottom: var(--s6); }

.role-cards { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s2); margin-bottom: var(--s5); }
.role-card {
  border: 1.5px solid var(--clr-border); border-radius: var(--r3);
  padding: var(--s3) var(--s4); cursor: pointer;
  transition: all var(--t1); display: flex; align-items: center;
  gap: var(--s2); font-size: 0.8rem; font-weight: 500; color: var(--clr-txt-2);
}
.role-card:hover { border-color: var(--clr-primary-light); background: var(--clr-primary-50); }
.role-card.selected { border-color: var(--clr-primary); background: var(--clr-primary-50); color: var(--clr-primary); }
.role-card-icon { font-size: 1.1rem; }

.login-btn {
  width: 100%; padding: 14px; font-size: 1rem; font-weight: 700;
  background: linear-gradient(135deg, var(--clr-primary) 0%, #43A047 100%);
  color: var(--clr-white); border: none; border-radius: var(--r2);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  gap: var(--s2); margin-top: var(--s4);
  transition: all var(--t1); box-shadow: 0 4px 16px rgba(46,125,50,0.4);
}
.login-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 22px rgba(46,125,50,0.5); }
.login-btn:active { transform: translateY(0); }
.login-btn:disabled { opacity: 0.7; cursor: not-allowed; transform: none; }

.forgot-link {
  display: block; text-align: right; font-size: 0.8rem;
  color: var(--clr-primary); font-weight: 500; float: right; margin-top: 1px;
}
.forgot-link:hover { color: var(--clr-primary-dark); }

.login-footer {
  margin-top: var(--s7); text-align: center;
  font-size: 0.72rem; color: var(--clr-txt-3);
}

/* ================================================================
   RESPONSIVE
================================================================ */
@media (max-width: 1200px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
}

@media (max-width: 1024px) {
  .sidebar { transform: translateX(calc(-1 * var(--sidebar-w))); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .header-toggle { display: flex; }
  .header-user-info { display: block; }
}

@media (max-width: 768px) {
  .login-brand { display: none; }
  .login-mobile-logo { display: flex; }
  .login-panel { align-items: flex-start; padding-top: var(--s8); }
  .header-user-info { display: none; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .page-content { padding: var(--s4); }
  .plan-cards-grid { grid-template-columns: 1fr; }
  .grid-equal { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .stats-grid { grid-template-columns: 1fr; }
  .role-cards { grid-template-columns: 1fr 1fr; }
  .modal-footer { flex-direction: column-reverse; }
  .modal-footer .btn { width: 100%; }
  .plan-components { grid-template-columns: 1fr; }
}

/* ================================================================
   PROFESSIONAL UPGRADE v2 — Overlays and enhancements
================================================================ */

/* ── Typography + font ───────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');
body { font-family: 'Inter', 'Poppins', -apple-system, sans-serif; font-size: 15px; }
h1,h2,h3,h4,h5 { font-family: 'Poppins', 'Inter', sans-serif; }

/* Extended color tokens */
:root {
  --clr-primary-mid:    #388E3C;
  --clr-primary-200:    #A5D6A7;
  --clr-blue-dark:      #1565C0;
  --clr-blue-light:     #42A5F5;
  --clr-amber-dark:     #D97706;
  --clr-amber-100:      #FEF3C7;
  --clr-brown-100:      #D7CCC8;
  --clr-red-light:      #EF4444;
  --clr-purple:         #7C3AED;
  --clr-purple-50:      #F5F3FF;
  --clr-txt-4:          #9CA3AF;
  --clr-border-2:       #D1DDD1;
  --clr-bg-2:           #E8EFE8;
  --shadow-xl: 0 20px 60px rgba(0,0,0,0.15), 0 8px 24px rgba(27,94,32,0.12);
  --t3: 0.4s cubic-bezier(0.4,0,0.2,1);
}

/* ── Sidebar gradient upgrade ─────────────────────────────────── */
.sidebar {
  background: linear-gradient(180deg,#152815 0%,#1B5E20 40%,#1E6B24 100%) !important;
}
.sidebar-logo { background: rgba(0,0,0,0.18) !important; border-bottom: 1px solid rgba(255,255,255,0.07) !important; }
.sidebar-logo-icon {
  background: linear-gradient(135deg,var(--clr-primary-light),var(--clr-primary-mid)) !important;
  box-shadow: 0 2px 8px rgba(76,175,80,0.4);
}
.nav-item { border-radius: 8px !important; margin: 1px 8px !important; }
.nav-item.active {
  background: linear-gradient(90deg,rgba(76,175,80,0.22),rgba(76,175,80,0.09)) !important;
  border: 1px solid rgba(76,175,80,0.2) !important;
  color: #81C784 !important;
}
.nav-item.active .nav-icon { color: #81C784 !important; }
.sidebar-avatar {
  background: linear-gradient(135deg,var(--clr-primary-light),var(--clr-primary-mid)) !important;
  box-shadow: 0 2px 8px rgba(76,175,80,0.3);
}

/* ── Header upgrade ───────────────────────────────────────────── */
.app-header {
  box-shadow: 0 1px 3px rgba(27,94,32,0.08), 0 1px 10px rgba(0,0,0,0.04) !important;
  border-bottom-color: #E8F0E8 !important;
}
.header-page-title { font-size: 1.05rem; font-weight: 700; }
.header-avatar {
  background: linear-gradient(135deg,var(--clr-primary),var(--clr-primary-light)) !important;
  box-shadow: 0 2px 8px rgba(46,125,50,0.35) !important;
}

/* ── Stat Card professional upgrade ──────────────────────────── */
.stat-card {
  position: relative; overflow: hidden;
  border-radius: 14px !important;
  transition: all 0.28s cubic-bezier(0.4,0,0.2,1) !important;
  box-shadow: 0 2px 8px rgba(27,94,32,0.07), 0 1px 3px rgba(0,0,0,0.05) !important;
}
.stat-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg,var(--clr-primary-light),var(--clr-primary));
}
.stat-card.blue::before  { background: linear-gradient(90deg,#64B5F6,var(--clr-blue)); }
.stat-card.amber::before { background: linear-gradient(90deg,#FFD54F,var(--clr-amber)); }
.stat-card.brown::before { background: linear-gradient(90deg,#A1887F,var(--clr-brown)); }
.stat-card:hover { box-shadow: 0 8px 24px rgba(27,94,32,0.16), 0 3px 8px rgba(0,0,0,0.08) !important; transform: translateY(-2px); }
.stat-value { font-size: 2rem !important; font-weight: 800 !important; letter-spacing: -0.5px; }
.stat-icon {
  border-radius: 12px !important;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

/* ── Card upgrade ─────────────────────────────────────────────── */
.card { border-radius: 14px !important; box-shadow: 0 2px 8px rgba(27,94,32,0.07) !important; border-color: #E4EDE4 !important; }
.card:hover { box-shadow: 0 4px 16px rgba(27,94,32,0.11) !important; }
.card-header {
  background: linear-gradient(90deg, rgba(27,94,32,0.03) 0%, transparent 60%) !important;
  border-bottom-color: #EAF2EA !important;
}

/* ── Button upgrade ───────────────────────────────────────────── */
.btn-primary {
  background: linear-gradient(135deg,#2E7D32 0%,#388E3C 100%) !important;
  box-shadow: 0 3px 10px rgba(46,125,50,0.35), 0 1px 3px rgba(46,125,50,0.2) !important;
}
.btn-primary:hover { box-shadow: 0 5px 18px rgba(46,125,50,0.5) !important; }
.btn-amber  { background: linear-gradient(135deg,#F59E0B 0%,#D97706 100%) !important; box-shadow: 0 3px 10px rgba(245,158,11,0.35) !important; }
.btn-blue   { background: linear-gradient(135deg,#1976D2 0%,#1565C0 100%) !important; box-shadow: 0 3px 10px rgba(25,118,210,0.30) !important; }
.btn-danger { background: linear-gradient(135deg,#EF4444 0%,#DC2626 100%) !important; box-shadow: 0 3px 10px rgba(220,38,38,0.30) !important; }
.btn        { letter-spacing: 0.01em; position: relative; overflow: hidden; }
.btn::after { content: ''; position: absolute; inset: 0; background: rgba(255,255,255,0); transition: background 0.15s ease; }
.btn:hover::after { background: rgba(255,255,255,0.08); }
.btn-sm { font-size: 0.775rem !important; padding: 6px 13px !important; }

/* ── Table upgrade ───────────────────────────────────────────── */
.table th {
  font-size: 0.67rem !important; letter-spacing: 0.7px !important;
  font-weight: 800 !important; text-transform: uppercase !important;
  background: linear-gradient(90deg,rgba(232,245,233,0.9),rgba(232,245,233,0.4)) !important;
  color: #1B5E20 !important; border-bottom: 2px solid #C8E6C9 !important;
}
.table td { font-size: 0.8375rem !important; padding: 12px 16px !important; }
.table tbody tr:hover td { background: rgba(232,245,233,0.55) !important; }

/* ── Badge upgrade ───────────────────────────────────────────── */
.badge { font-size: 0.67rem !important; letter-spacing: 0.4px !important; font-weight: 800 !important; border-radius: 999px !important; }
.badge-success { background: #E8F5E9 !important; color: #1B5E20 !important; border: 1px solid #C8E6C9 !important; }
.badge-warning { background: #FFFBEB !important; color: #B45309 !important; border: 1px solid #FDE68A !important; }
.badge-info    { background: #EFF6FF !important; color: #1D4ED8 !important; border: 1px solid #BFDBFE !important; }
.badge-danger  { background: #FEF2F2 !important; color: #DC2626 !important; border: 1px solid #FECACA !important; }

/* ── Form controls upgrade ───────────────────────────────────── */
.form-control {
  border: 1.5px solid #D1DDD1 !important;
  border-radius: 8px !important;
  font-size: 0.875rem !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease !important;
}
.form-control:focus {
  border-color: #4CAF50 !important;
  box-shadow: 0 0 0 3px rgba(76,175,80,0.12) !important;
}
.form-label { font-size: 0.77rem !important; font-weight: 600 !important; letter-spacing: 0.03em !important; text-transform: uppercase !important; color: #374151 !important; }

/* ── Modal upgrade ───────────────────────────────────────────── */
.modal { border-radius: 20px !important; }
.modal-header {
  background: linear-gradient(90deg,rgba(27,94,32,0.04) 0%,#fff 50%) !important;
  border-bottom-color: #EAF2EA !important;
  padding: 18px 24px !important;
}
.modal-close { border-radius: 8px !important; }
.modal-body { padding: 24px !important; }
.modal-footer { border-radius: 0 0 20px 20px !important; }

/* ── Form Section Component ──────────────────────────────────── */
.form-section {
  background: var(--clr-white); border-radius: 12px;
  border: 1.5px solid var(--clr-border); margin-bottom: 18px; overflow: hidden;
}
.form-section-header {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px;
  background: linear-gradient(90deg,rgba(27,94,32,0.04) 0%,transparent 100%);
  border-bottom: 1px solid var(--clr-border);
}
.form-section-icon {
  width: 32px; height: 32px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.82rem; flex-shrink: 0;
}
.form-section-icon.green  { background: #E8F5E9; color: #2E7D32; }
.form-section-icon.blue   { background: #E3F2FD; color: #1976D2; }
.form-section-icon.amber  { background: #FFFBEB; color: #D97706; }
.form-section-icon.brown  { background: #EFEBE9; color: #6D4C41; }
.form-section-icon.purple { background: #F5F3FF; color: #7C3AED; }
.form-section-title { font-size: 0.875rem; font-weight: 700; color: #111827; }
.form-section-sub   { font-size: 0.7rem; color: #9CA3AF; margin-top: 1px; }
.form-section-body  { padding: 18px; }

/* ── Form Grid ───────────────────────────────────────────────── */
.form-row   { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
@media(max-width:700px){ .form-row,.form-row-3 { grid-template-columns: 1fr; } }

/* ── Option Chips ────────────────────────────────────────────── */
.option-group { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.option-chip {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 14px; border: 1.5px solid #DDE8DD;
  border-radius: 999px; font-size: 0.8rem; font-weight: 500;
  color: #4A644A; cursor: pointer; transition: all 0.15s ease;
  user-select: none;
}
.option-chip input { display: none; }
.option-chip:hover { border-color: #4CAF50; color: #2E7D32; background: #E8F5E9; }
.option-chip.selected { border-color: #2E7D32; color: #2E7D32; background: #E8F5E9; font-weight: 700; }

/* Readiness slider track */
.slider-track {
  display: flex; border-radius: 999px; overflow: hidden;
  border: 1.5px solid #DDE8DD; height: 38px;
}
.slider-option {
  flex: 1; display: flex; align-items: center; justify-content: center;
  font-size: 0.775rem; font-weight: 600; cursor: pointer;
  transition: all 0.15s ease; border: none; background: transparent;
}
.slider-option:not(:last-child) { border-right: 1.5px solid #DDE8DD; }
.slider-option:hover { background: #E8F5E9; }
.slider-option.active-low    { background: #FEF2F2; color: #DC2626; }
.slider-option.active-medium { background: #FFFBEB; color: #D97706; }
.slider-option.active-high   { background: #E8F5E9; color: #2E7D32; }

/* ── Multi-step Wizard ───────────────────────────────────────── */
.wizard-header {
  background: linear-gradient(135deg,#1A3A1A 0%,#1B5E20 50%,#2E7D32 100%);
  padding: 24px 28px 32px; position: relative; overflow: hidden;
}
.wizard-header::before {
  content: ''; position: absolute; top: -40px; right: -40px;
  width: 180px; height: 180px; background: rgba(255,255,255,0.04); border-radius: 50%;
}
.wizard-header::after {
  content: ''; position: absolute; bottom: -60px; left: -20px;
  width: 150px; height: 150px; background: rgba(255,255,255,0.04); border-radius: 50%;
}
.wizard-title {
  font-size: 1.2rem; font-weight: 800; color: #fff;
  font-family: 'Poppins', sans-serif; position: relative; z-index: 1;
}
.wizard-subtitle {
  font-size: 0.77rem; color: rgba(255,255,255,0.65);
  margin-top: 3px; position: relative; z-index: 1;
}

/* Step indicator */
.step-indicator {
  display: flex; align-items: flex-start;
  margin-top: 22px; position: relative; z-index: 1;
  overflow-x: auto; padding-bottom: 4px; gap: 0;
}
.step-indicator::-webkit-scrollbar { height: 0; }
.wizard-step {
  display: flex; flex-direction: column; align-items: center;
  min-width: 72px; flex: 1; position: relative; cursor: pointer;
}
.wizard-step:not(:last-child)::after {
  content: ''; position: absolute; top: 13px;
  left: calc(50% + 12px); right: calc(-50% + 12px);
  height: 2px; background: rgba(255,255,255,0.2);
}
.wizard-step.done:not(:last-child)::after  { background: rgba(76,175,80,0.7); }
.ws-dot {
  width: 26px; height: 26px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.35);
  background: rgba(255,255,255,0.1);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.65rem; font-weight: 700; color: rgba(255,255,255,0.55);
  transition: all 0.25s ease; position: relative; z-index: 1;
}
.wizard-step.done   .ws-dot { background: #4CAF50; border-color: #4CAF50; color: #fff; }
.wizard-step.active .ws-dot { background: #fff; border-color: #fff; color: #2E7D32; box-shadow: 0 0 0 4px rgba(255,255,255,0.2); }
.ws-label {
  font-size: 0.58rem; font-weight: 600; color: rgba(255,255,255,0.45);
  margin-top: 5px; text-align: center; line-height: 1.3; white-space: nowrap;
}
.wizard-step.active .ws-label { color: #fff; font-weight: 800; }
.wizard-step.done   .ws-label { color: rgba(255,255,255,0.7); }

/* Wizard panes */
.wizard-body   { padding: 24px 28px; }
.wizard-pane   { display: none; }
.wizard-pane.active { display: block; animation: fadeSlide 0.25s ease; }
@keyframes fadeSlide { from{opacity:0;transform:translateX(12px)} to{opacity:1;transform:translateX(0)} }

.wizard-footer {
  padding: 14px 28px; border-top: 1px solid #DDE8DD;
  display: flex; align-items: center; justify-content: space-between;
  background: #F3F7F3; gap: 12px;
  flex-shrink: 0;
}
.wizard-progress { flex: 1; display: flex; align-items: center; gap: 12px; }
.wizard-progress-bar-wrap { flex: 1; background: #DDE8DD; border-radius: 999px; height: 4px; }
.wizard-progress-fill {
  height: 4px; background: linear-gradient(90deg,#4CAF50,#2E7D32);
  border-radius: 999px; transition: width 0.4s cubic-bezier(0.4,0,0.2,1);
}
.wizard-step-text { font-size: 0.7rem; font-weight: 700; color: #8FAA8F; white-space: nowrap; }

/* ── Review Panel ────────────────────────────────────────────── */
.review-section-title {
  font-size: 0.72rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.7px; color: #2E7D32; padding: 8px 0;
  margin-bottom: 8px; border-bottom: 2px solid #C8E6C9;
  display: flex; align-items: center; gap: 8px;
}
.review-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.review-item { background: #F3F7F3; border-radius: 8px; padding: 10px 12px; border: 1px solid #DDE8DD; }
.review-label { font-size: 0.63rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: #8FAA8F; margin-bottom: 2px; }
.review-value { font-size: 0.83rem; font-weight: 600; color: #1A2B1A; }
@media(max-width:560px){ .review-grid { grid-template-columns: 1fr; } }

/* ── Form hint / error ───────────────────────────────────────── */
.form-hint { font-size: 0.7rem; color: #8FAA8F; margin-top: 3px; }
.required-star { color: #DC2626; margin-left: 2px; }
.input-group .input-icon { font-size: 0.8rem; }

/* ── Page section smooth transition ──────────────────────────── */
.page-section { animation: pageIn 0.22s ease; }
@keyframes pageIn { from{opacity:0;transform:translateY(6px)} to{opacity:1;transform:translateY(0)} }

/* ================================================================
   LOGIN METHOD TABS
================================================================ */
.login-method-tabs {
  display: flex;
  background: #F3F7F3;
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 22px;
  border: 1.5px solid #DDE8DD;
  gap: 3px;
}
.login-tab {
  flex: 1;
  padding: 9px 12px;
  border: none;
  border-radius: 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: #8FAA8F;
  background: transparent;
  transition: all 0.18s ease;
}
.login-tab:hover { color: #2E7D32; background: rgba(255,255,255,0.7); }
.login-tab.active {
  background: #fff;
  color: #1B5E20;
  box-shadow: 0 1px 6px rgba(27,94,32,0.13), 0 1px 2px rgba(0,0,0,0.06);
}
.login-tab.active i { color: #2E7D32; }

.login-method-panel { display: none; animation: fadeSlideIn 0.22s ease; }
.login-method-panel.active { display: block; }
@keyframes fadeSlideIn { from{opacity:0;transform:translateY(8px)} to{opacity:1;transform:translateY(0)} }

/* ── OTP Boxes ───────────────────────────────────────────────── */
.otp-boxes {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin: 10px 0 18px;
}
.otp-box {
  width: 48px;
  height: 54px;
  text-align: center;
  font-size: 1.25rem;
  font-weight: 800;
  font-family: 'Poppins', monospace;
  border: 2px solid #DDE8DD;
  border-radius: 10px;
  background: #fff;
  color: #1A2B1A;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
  outline: none;
  caret-color: #2E7D32;
}
.otp-box:focus {
  border-color: #4CAF50;
  box-shadow: 0 0 0 3px rgba(76,175,80,0.15);
  transform: scale(1.06);
}
.otp-box.filled {
  border-color: #2E7D32;
  background: #E8F5E9;
  color: #1B5E20;
}
.otp-box.error {
  border-color: #DC2626;
  background: #FEF2F2;
  animation: shake 0.35s ease;
}
@keyframes shake {
  0%,100%{transform:translateX(0)}
  20%{transform:translateX(-5px)}
  40%{transform:translateX(5px)}
  60%{transform:translateX(-4px)}
  80%{transform:translateX(4px)}
}
@media(max-width:400px){
  .otp-box { width:40px; height:46px; font-size:1.1rem; }
  .otp-boxes { gap:7px; }
}

/* ================================================================
   COMPREHENSIVE PROFESSIONAL REVIEW v3
   Full-width Forms · Mobile Responsive · Professional Colors
   ─ All rules use specificity or !important to override prior layers
================================================================ */

/* ── 1. Body & App Background ─────────────────────────────────── */
body { background: #EDF3ED !important; }
.main-content { background: #F0F5F0; }
.app-layout { background: #EDF3ED; }

/* ── 2. Page Content — Properly Full-Width ────────────────────── */
.page-content {
  padding: clamp(14px, 2.5vw, 28px) clamp(14px, 2.5vw, 28px) !important;
  width: 100% !important;
  box-sizing: border-box !important;
}
.page-section { width: 100% !important; box-sizing: border-box !important; }
.page-section.hidden { display: none !important; }

/* ── 3. Stats Grid — Fully Responsive ────────────────────────── */
.stats-grid {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 16px !important;
  margin-bottom: 24px !important;
  width: 100% !important;
}
@media (max-width: 1200px) { .stats-grid { grid-template-columns: repeat(2, 1fr) !important; } }
@media (max-width: 560px)  { .stats-grid { grid-template-columns: 1fr !important; gap: 12px !important; } }

/* Stat card full-width child stretch */
.stat-card { width: 100% !important; box-sizing: border-box !important; }

/* ── 4. Content Grids Responsive ──────────────────────────────── */
.grid-2 { display: grid !important; grid-template-columns: 2fr 1fr !important; gap: 20px !important; width: 100% !important; }
@media (max-width: 1100px) { .grid-2 { grid-template-columns: 1fr !important; } }
.grid-equal { display: grid !important; grid-template-columns: 1fr 1fr !important; gap: 20px !important; width: 100% !important; }
@media (max-width: 640px)  { .grid-equal { grid-template-columns: 1fr !important; } }

/* ── 5. Cards Professional ────────────────────────────────────── */
.card {
  background: #FFFFFF !important;
  border: 1px solid #E4EDE4 !important;
  border-radius: 16px !important;
  box-shadow: 0 2px 6px rgba(27,94,32,0.06), 0 1px 2px rgba(0,0,0,0.04) !important;
  width: 100% !important; box-sizing: border-box !important;
}
.card:hover { box-shadow: 0 4px 16px rgba(27,94,32,0.10), 0 2px 4px rgba(0,0,0,0.05) !important; }
.card-header {
  padding: 16px 22px !important;
  background: linear-gradient(90deg, rgba(27,94,32,0.03) 0%, #FAFCFA 60%) !important;
  border-bottom: 1px solid #EDF3ED !important;
}
.card-body { padding: 22px !important; }
.card-footer { padding: 14px 22px !important; background: #FAFCFA !important; border-top: 1px solid #EDF3ED !important; }

/* ── 6. Forms — Full Width, Professional ─────────────────────── */
.form-group {
  margin-bottom: 18px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}
.form-group:last-child { margin-bottom: 0 !important; }
.form-control, .input-group, .search-input, .filter-select {
  width: 100% !important;
  box-sizing: border-box !important;
}
.form-control {
  padding: 11px 14px !important;
  height: 44px !important;
  border: 1.5px solid #D1DDD1 !important;
  border-radius: 9px !important;
  font-size: 0.875rem !important;
  background: #FFFFFF !important;
  color: #111827 !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease !important;
}
.form-control:focus {
  border-color: #2E7D32 !important;
  box-shadow: 0 0 0 3px rgba(46,125,50,0.12) !important;
  outline: none !important;
}
.form-control::placeholder { color: #B0BFB0 !important; }
.form-control.is-invalid { border-color: #DC2626 !important; box-shadow: 0 0 0 3px rgba(220,38,38,0.1) !important; }
textarea.form-control { height: auto !important; min-height: 88px !important; resize: vertical !important; }
select.form-control { height: 44px !important; padding-right: 36px !important; cursor: pointer !important; }
.input-group .form-control { padding-left: 42px !important; }

.form-label {
  display: block !important;
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  color: #1F2937 !important;
  letter-spacing: 0.05em !important;
  text-transform: uppercase !important;
  margin-bottom: 7px !important;
}
.form-hint, .form-text {
  font-size: 0.71rem !important;
  color: #9CA3AF !important;
  margin-top: 5px !important;
  display: block !important;
}
.invalid-feedback {
  font-size: 0.71rem !important;
  color: #DC2626 !important;
  margin-top: 5px !important;
  display: block !important;
}

/* Form rows — responsive grid */
.form-row {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 18px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}
.form-row-3 {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 16px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}
@media (max-width: 768px) {
  .form-row   { grid-template-columns: 1fr 1fr !important; gap: 14px !important; }
  .form-row-3 { grid-template-columns: 1fr 1fr !important; gap: 13px !important; }
}
@media (max-width: 500px) {
  .form-row, .form-row-3 { grid-template-columns: 1fr !important; gap: 12px !important; }
}

/* ── 7. Form Section Component — Full Width ───────────────────── */
.form-section {
  width: 100% !important;
  box-sizing: border-box !important;
  border-radius: 14px !important;
  border: 1px solid #E4EDE4 !important;
  background: #FFFFFF !important;
  box-shadow: 0 1px 4px rgba(27,94,32,0.05) !important;
  margin-bottom: 20px !important;
  overflow: hidden !important;
}
.form-section-header {
  padding: 14px 20px !important;
  background: linear-gradient(90deg, rgba(27,94,32,0.04) 0%, transparent 100%) !important;
  border-bottom: 1px solid #EDF3ED !important;
}
.form-section-body {
  padding: 20px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}
.form-section-title { font-size: 0.875rem !important; font-weight: 700 !important; color: #111827 !important; }
.form-section-sub   { font-size: 0.7rem !important; color: #9CA3AF !important; margin-top: 2px !important; }

/* ── 8. Wizard — Full Width + Responsive ─────────────────────── */
.wizard-header { padding: 22px clamp(16px,4vw,32px) 30px !important; }
.wizard-body {
  padding: clamp(16px,3vw,26px) clamp(16px,4vw,30px) !important;
  width: 100% !important;
  box-sizing: border-box !important;
}
.wizard-pane { width: 100% !important; box-sizing: border-box !important; }
.wizard-footer { padding: 14px clamp(16px,4vw,28px) !important; flex-wrap: wrap !important; }

/* Register card — flat bottom connects visually to fixed footer */
#page-register .card {
  border-radius: 18px 18px 0 0 !important;
  margin-bottom: 0 !important;
}

/* Register page — pad bottom so content clears fixed footer */
#page-register {
  padding-bottom: 130px !important;
}

/* Wizard footer — body-level, guaranteed fixed to viewport bottom */
#regWizardFooter {
  position: fixed !important;
  bottom: 0 !important;
  left: var(--sidebar-w) !important;
  right: 0 !important;
  z-index: 9999 !important;
  border-radius: 0 !important;
  border: none !important;
  border-top: 2px solid #C8E6C9 !important;
  box-shadow: 0 -4px 24px rgba(27,94,32,0.15) !important;
}

@media (max-width: 1024px) {
  #regWizardFooter { left: 0 !important; }
}

/* Wizard step on small screens */
@media (max-width: 640px) {
  .wizard-step { min-width: 48px !important; }
  .ws-label { font-size: 0.46rem !important; white-space: nowrap; }
  .wizard-title { font-size: 1rem !important; }
  .wizard-subtitle { font-size: 0.72rem !important; }
}
@media (max-width: 420px) {
  .ws-dot { width: 22px !important; height: 22px !important; font-size: 0.58rem !important; }
  .wizard-step { min-width: 40px !important; }
  .wizard-step:not(:last-child)::after { top: 11px !important; }
  .ws-label { font-size: 0.42rem !important; }
  .wizard-footer { gap: 8px !important; }
}

/* ── 9. Modals — Full Width + Bottom Sheet Mobile ─────────────── */
.modal-overlay { padding: 16px !important; }
.modal {
  max-width: 700px !important;
  width: 100% !important;
  border-radius: 18px !important;
  box-sizing: border-box !important;
}
.modal.modal-lg { max-width: 900px !important; }
.modal-header { padding: 18px 24px !important; }
.modal-body { padding: 24px !important; width: 100% !important; box-sizing: border-box !important; }
.modal-footer { padding: 16px 24px !important; border-radius: 0 0 18px 18px !important; }
@media (max-width: 600px) {
  .modal-overlay { padding: 0 !important; align-items: flex-end !important; }
  .modal { border-radius: 20px 20px 0 0 !important; max-height: 95dvh !important; }
  .modal-footer { border-radius: 0 !important; flex-direction: column-reverse !important; }
  .modal-footer .btn { width: 100% !important; justify-content: center !important; }
}

/* ── 10. Table — Better Mobile ────────────────────────────────── */
.table-wrapper {
  overflow-x: auto !important;
  border-radius: 12px !important;
  -webkit-overflow-scrolling: touch;
}
.table { min-width: 680px; width: 100% !important; }
.table th { padding: 12px 16px !important; white-space: nowrap !important; }
.table td { font-size: 0.84rem !important; }

/* ── 11. Search Bar — Fully Responsive ───────────────────────── */
.search-bar { flex-wrap: wrap !important; width: 100% !important; gap: 10px !important; }
.search-wrapper { flex: 1 1 200px !important; min-width: 0 !important; }
.filter-select  { flex: 0 1 150px !important; min-width: 120px !important; width: auto !important; }
@media (max-width: 560px) {
  .search-wrapper { flex: 1 1 100% !important; }
  .filter-select  { flex: 1 1 calc(50% - 5px) !important; }
}

/* ── 12. Section Header — Stack on Mobile ─────────────────────── */
.section-header { width: 100% !important; box-sizing: border-box !important; }
@media (max-width: 600px) {
  .section-header { flex-direction: column !important; align-items: stretch !important; gap: 12px !important; }
  .section-header > div:last-child { display: flex !important; gap: 8px !important; flex-wrap: wrap !important; }
  .section-header .btn { flex: 1 !important; justify-content: center !important; }
}

/* ── 13. Progress Bars ─────────────────────────────────────────── */
.progress { background: #E4EDE4 !important; height: 8px !important; border-radius: 999px !important; }
.progress-bar { height: 8px !important; border-radius: 999px !important; }

/* ── 14. Header Professional ──────────────────────────────────── */
.app-header {
  background: #FFFFFF !important;
  border-bottom: 1px solid #E8EEE8 !important;
  box-shadow: 0 1px 4px rgba(27,94,32,0.07) !important;
}
@media (max-width: 1024px) { .header-toggle { display: flex !important; } }

/* ── 15. Login Page — Full Width + Professional Mobile ─────────── */
.login-wrapper { min-height: 100svh !important; display: flex !important; }
.login-brand {
  flex: 0 0 44% !important;
  background: linear-gradient(155deg, #152815 0%, #1B5E20 40%, #2E7D32 75%, #388E3C 100%) !important;
}
.login-panel {
  flex: 1 !important;
  background: #FFFFFF !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: clamp(24px,5vh,64px) clamp(20px,5vw,60px) !important;
}
.login-form-wrap {
  width: 100% !important;
  max-width: 460px !important;
  box-sizing: border-box !important;
}
.login-greeting h2 { font-size: clamp(1.4rem, 3.5vw, 1.85rem) !important; font-weight: 800 !important; color: #111827 !important; }
.login-greeting p  { font-size: 0.875rem !important; color: #6B7280 !important; }
.login-btn {
  height: 52px !important;
  font-size: 0.95rem !important;
  letter-spacing: 0.01em !important;
  border-radius: 10px !important;
  background: linear-gradient(135deg, #1B5E20 0%, #2E7D32 50%, #388E3C 100%) !important;
  box-shadow: 0 4px 20px rgba(27,94,32,0.40) !important;
  margin-top: 6px !important;
}
.login-btn:hover { box-shadow: 0 6px 28px rgba(27,94,32,0.52) !important; transform: translateY(-1px) !important; }
.login-btn:active { transform: none !important; }
.login-btn:disabled { opacity: 0.65 !important; transform: none !important; }
.forgot-link { font-size: 0.78rem !important; font-weight: 600 !important; color: #2E7D32 !important; }
.forgot-link:hover { color: #1B5E20 !important; }
.login-footer { font-size: 0.73rem !important; color: #9CA3AF !important; margin-top: 32px !important; }

@media (max-width: 768px) {
  .login-brand { display: none !important; }
  .login-mobile-logo { display: flex !important; }
  .login-panel { padding: clamp(24px,5vh,48px) clamp(16px,5vw,32px) !important; align-items: flex-start !important; }
  .login-form-wrap { max-width: 100% !important; }
}
@media (max-width: 420px) {
  .login-panel { padding: 28px 16px !important; }
  .otp-box { width: 38px !important; height: 44px !important; font-size: 1rem !important; }
  .otp-boxes { gap: 6px !important; }
}

/* ── 16. OTP boxes responsive container ──────────────────────── */
.otp-boxes { width: 100% !important; justify-content: center !important; }

/* ── 17. Option Chips responsive ─────────────────────────────── */
.option-group { width: 100% !important; box-sizing: border-box !important; }

/* ── 18. Buttons — General Improvements ──────────────────────── */
.btn { font-family: 'Inter', 'Poppins', sans-serif !important; }
.btn-primary {
  background: linear-gradient(135deg, #1B5E20 0%, #2E7D32 60%, #388E3C 100%) !important;
  box-shadow: 0 3px 12px rgba(27,94,32,0.35) !important;
}
.btn-primary:hover { box-shadow: 0 5px 20px rgba(27,94,32,0.50) !important; }

/* ── 19. Sidebar Mobile ───────────────────────────────────────── */
@media (max-width: 1024px) {
  .sidebar { transform: translateX(calc(-1 * var(--sidebar-w))) !important; }
  .sidebar.open { transform: translateX(0) !important; }
  .main-content { margin-left: 0 !important; }
}

/* ── 20. Plan cards grid responsive ──────────────────────────── */
.plan-cards-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
  gap: 20px !important;
  width: 100% !important;
}
@media (max-width: 560px) { .plan-cards-grid { grid-template-columns: 1fr !important; } }
.plan-card { width: 100% !important; box-sizing: border-box !important; }

/* ── 21. Typography refinements ──────────────────────────────── */
.section-title { font-size: 1.05rem !important; font-weight: 700 !important; color: #111827 !important; }
.section-sub   { font-size: 0.78rem !important; color: #6B7280 !important; }
.card-header h3 { font-size: 0.9375rem !important; font-weight: 700 !important; color: #111827 !important; }
.header-page-title { font-size: 1.0rem !important; font-weight: 700 !important; color: #111827 !important; }
.header-page-sub   { font-size: 0.72rem !important; color: #6B7280 !important; }

/* ── 22. Mobile general cleanups ─────────────────────────────── */
@media (max-width: 768px) {
  .header-user-info { display: none !important; }
}
@media (max-width: 560px) {
  .page-content { padding: 14px !important; }
  .card-body { padding: 16px !important; }
  .card-header { padding: 14px 16px !important; }
  .section-header { margin-bottom: 16px !important; }
  .stats-grid { margin-bottom: 16px !important; }
  .login-method-tabs { margin-bottom: 18px !important; }
}

/* ── 23. Scrollable pages — no horizontal overflow ─────────────── */
body, .app-layout, .main-content, .page-content {
  overflow-x: hidden !important;
}

/* ── 24. Review grid responsive ──────────────────────────────── */
.review-grid { grid-template-columns: 1fr 1fr !important; width: 100% !important; box-sizing: border-box !important; }
@media (max-width: 600px) { .review-grid { grid-template-columns: 1fr !important; } }
.review-item { box-sizing: border-box !important; }

/* ── 25. OTP Step 2 — CSS-class replacements for inline styles ─── */
.otp-sent-strip {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 18px; padding: 12px 16px;
  background: #E8F5E9; border-radius: 12px; border: 1px solid #C8E6C9;
  width: 100%; box-sizing: border-box;
}
.otp-sent-icon { color: #2E7D32; font-size: 1.05rem; flex-shrink: 0; }
.otp-sent-title { font-size: 0.8rem; font-weight: 700; color: #1B5E20; }
.otp-sent-sub   { font-size: 0.72rem; color: #4A644A; margin-top: 1px; }
.otp-sent-num   { font-weight: 700; }
.otp-change-btn {
  margin-left: auto; font-size: 0.72rem; font-weight: 700;
  color: #1976D2; background: none; border: none; cursor: pointer;
  text-decoration: underline; white-space: nowrap; font-family: inherit;
  padding: 0;
}
.otp-timer-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 18px; width: 100%; box-sizing: border-box;
}
.otp-timer-text { font-size: 0.78rem; color: #8FAA8F; }
.otp-timer-val  { font-weight: 700; color: #D97706; }
.otp-resend-btn {
  font-size: 0.78rem; font-weight: 700; color: #1976D2;
  background: none; border: none; cursor: pointer;
  font-family: inherit; opacity: 0.4; pointer-events: none; padding: 0;
  display: flex; align-items: center; gap: 4px;
}

/* ── 26. Login Security Note ─────────────────────────────────── */
.login-security-note {
  display: flex; align-items: center; gap: 10px;
  margin-top: 20px; padding: 12px 16px;
  background: #E8F5E9; border-radius: 10px; border: 1px solid #C8E6C9;
  width: 100%; box-sizing: border-box;
}
.login-security-note i { color: #2E7D32; font-size: 0.85rem; flex-shrink: 0; }
.login-security-note span { font-size: 0.72rem; color: #1B5E20; line-height: 1.4; }

/* ── 27. Required star ───────────────────────────────────────── */
.required-star { color: #DC2626; font-weight: 700; margin-left: 2px; }

/* ── 28. Input icon sizing ───────────────────────────────────── */
.input-icon { font-size: 0.875rem !important; color: #9CA3AF !important; }
.input-group .form-control { width: 100% !important; }

/* ── 29. Wizard card full width override ─────────────────────── */
#page-register > .section-header + .card {
  width: 100% !important;
  max-width: 100% !important;
}

/* ── 30. Nav badge color refinement ─────────────────────────── */
.nav-badge { background: #F59E0B !important; color: #fff !important; font-size: 0.6rem !important; }

/* ── 31. Page section smooth animation ──────────────────────── */
.page-section:not(.hidden) { animation: pageIn 0.2s ease both; }

/* ── 32. Toast container mobile ─────────────────────────────── */
@media (max-width: 560px) {
  .toast-container { bottom: 12px !important; right: 12px !important; left: 12px !important; }
  .toast { min-width: 0 !important; width: 100% !important; max-width: 100% !important; }
}

/* ── 33. Tab nav scrollable on mobile ───────────────────────── */
.tab-nav { overflow-x: auto !important; -webkit-overflow-scrolling: touch; white-space: nowrap !important; }
.tab-btn { white-space: nowrap !important; }

/* ── Photo Upload Zone ────────────────────────────────────────── */
.photo-upload-zone {
  position: relative; border: 2px dashed #C8E6C9; border-radius: 12px;
  background: #F8FBF8; cursor: pointer; overflow: hidden;
  transition: border-color 0.2s, background 0.2s;
}
.photo-upload-zone:hover { border-color: #2E7D32; background: #EFF8EF; }
.photo-upload-zone.drag-over { border-color: #1976D2; background: #EFF6FF; }
.photo-upload-zone.has-image { border-style: solid; border-color: #4CAF50; }
.photo-upload-zone.error { border-color: #DC2626; background: #FEF2F2; }

/* Full-width farmer photo */
.photo-upload-preview {
  min-height: 120px; display: flex; align-items: center; justify-content: center;
  position: relative;
}
.photo-upload-preview img.photo-thumb {
  width: 100%; height: 140px; object-fit: cover; display: block; border-radius: 10px;
}
.photo-upload-placeholder {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 20px; color: #9CA3AF; text-align: center;
}
.photo-upload-placeholder i { font-size: 2rem; color: #C8E6C9; }
.photo-upload-placeholder span { font-size: 0.82rem; font-weight: 500; color: #6B7280; }
.photo-upload-placeholder small { font-size: 0.7rem; color: #9CA3AF; }
.photo-upload-input {
  position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%;
}
.photo-remove-btn {
  position: absolute; top: 8px; right: 8px; z-index: 10;
  background: rgba(220,38,38,0.85); color: #fff; border: none; border-radius: 50%;
  width: 26px; height: 26px; display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; cursor: pointer; transition: background 0.2s;
}
.photo-remove-btn:hover { background: #DC2626; }

/* Small grid photos (Step 3) */
.photo-multi-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 6px;
}
.photo-upload-zone.photo-sm .photo-upload-preview { min-height: 90px; }
.photo-upload-zone.photo-sm .photo-upload-preview img.photo-thumb { height: 90px; }
.photo-upload-zone.photo-sm .photo-upload-placeholder { padding: 12px 8px; gap: 4px; }
.photo-upload-zone.photo-sm .photo-upload-placeholder i { font-size: 1.4rem; }
.photo-upload-zone.photo-sm .photo-upload-placeholder span { font-size: 0.7rem; }
.photo-sm-label { text-align: center; font-size: 0.68rem; font-weight: 600; color: #6B7280; padding: 4px 0 6px; }
@media (max-width: 600px) { .photo-multi-grid { grid-template-columns: repeat(2, 1fr); } }

/* ── GPS Map Button ───────────────────────────────────────────── */
.gps-map-btn {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  background: #1976D2; color: #fff; border: none; border-radius: 6px;
  padding: 4px 10px; font-size: 0.75rem; font-weight: 600; cursor: pointer;
  display: flex; align-items: center; gap: 5px; white-space: nowrap;
  transition: background 0.2s; z-index: 2;
}
.gps-map-btn:not([disabled]):hover { background: #1565C0; }
.gps-map-btn[disabled] { background: #9CA3AF; cursor: not-allowed; }

/* ── Map Modal ────────────────────────────────────────────────── */
.map-coords-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; background: #EFF6FF; border-bottom: 1px solid #BFDBFE;
  font-size: 0.8rem; font-weight: 600; color: #1E40AF;
}
.map-frame-wrap { position: relative; min-height: 200px; }
.map-no-coords {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 12px;
  background: #F8FBF8; color: #9CA3AF; text-align: center; padding: 24px;
}
.map-no-coords i { font-size: 2.5rem; color: #C8E6C9; }
.map-no-coords p { font-size: 0.85rem; line-height: 1.6; }

/* ── Location GPS Strip ───────────────────────────────────────── */
.loc-gps-strip {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px; border-radius: 12px; margin-bottom: 4px;
  background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 100%);
  border: 1.5px solid #BFDBFE; width: 100%; box-sizing: border-box;
}
.loc-gps-icon {
  width: 40px; height: 40px; border-radius: 10px; flex-shrink: 0;
  background: #1976D2; color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 1rem;
}
.loc-gps-label { font-size: 0.68rem; font-weight: 700; color: #1976D2; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 2px; }
.loc-gps-title { font-size: 0.875rem; font-weight: 700; color: #1E3A5F; }
.loc-gps-sub   { font-size: 0.72rem; color: #3B82F6; margin-top: 1px; }
.loc-gps-text  { flex: 1; min-width: 0; }

.loc-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 18px 0; color: #9CA3AF; font-size: 0.75rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.08em;
}
.loc-divider::before, .loc-divider::after {
  content: ''; flex: 1; height: 1px; background: #E4EDE4;
}

/* ── Aadhaar toggle button ────────────────────────────────────── */
.aadhaar-toggle {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: #9CA3AF; cursor: pointer;
  font-size: 0.9rem; padding: 4px; display: flex; align-items: center;
}
.aadhaar-toggle:hover { color: #2E7D32; }

/* ── Farmer ID field ─────────────────────────────────────────── */
.farmer-id-input { font-family: 'Courier New', monospace; font-size: 0.88rem; letter-spacing: 0.05em; background: #F8FBF8 !important; color: #1B5E20; font-weight: 600; }
.farmer-id-input:not([readonly]) { background: #fff !important; color: #111; }
.farmer-id-toggle {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: #9CA3AF; cursor: pointer;
  font-size: 0.82rem; padding: 4px; display: flex; align-items: center;
}
.farmer-id-toggle:hover { color: #1976D2; }
.farmer-id-toggle.active i { color: #1976D2; }

@media (max-width: 560px) {
  .loc-gps-strip { flex-wrap: wrap; gap: 10px; }
  .loc-gps-strip .btn { width: 100%; justify-content: center; }
}

/* ── 34. Wizard Footer — Prominent Progress Bar ──────────────── */
.wizard-footer {
  padding: 16px clamp(16px,4vw,28px) !important;
  flex-direction: column !important;
  gap: 14px !important;
  background: #FAFCFA !important;
  border-top: 1.5px solid #E4EDE4 !important;
}
.wizard-progress {
  width: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
}
.wiz-progress-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}
.wiz-step-label {
  font-size: 0.82rem;
  font-weight: 800;
  color: #1B5E20;
  letter-spacing: 0.01em;
  font-family: 'Poppins', sans-serif;
}
.wiz-step-pct {
  font-size: 0.78rem;
  font-weight: 700;
  color: #388E3C;
  background: #E8F5E9;
  border: 1px solid #C8E6C9;
  border-radius: 999px;
  padding: 2px 10px;
  letter-spacing: 0.02em;
}
.wiz-progress-track {
  width: 100%;
  height: 10px;
  background: #DDE8DD;
  border-radius: 999px;
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.08);
}
@keyframes progress-shimmer {
  0%   { left: -70%; }
  100% { left: 130%; }
}
@keyframes progress-glow {
  0%,100% { box-shadow: 0 0 6px 1px currentColor; }
  50%      { box-shadow: 0 0 14px 3px currentColor; }
}
.wiz-progress-fill {
  height: 100%;
  border-radius: 999px;
  position: relative;
  overflow: hidden;
  transition: width 0.55s cubic-bezier(0.4, 0, 0.2, 1),
              background 0.55s ease;
  /* default — overridden by JS */
  background: linear-gradient(90deg, #EF5350, #D32F2F);
}
/* Shimmer sweep */
.wiz-progress-fill::after {
  content: '';
  position: absolute;
  top: 0; left: -70%; bottom: 0;
  width: 55%;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.45) 50%, transparent 100%);
  transform: skewX(-18deg);
  animation: progress-shimmer 1.6s ease-in-out infinite;
}
.wiz-footer-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  width: 100%;
  flex-wrap: wrap;
}
.wiz-footer-actions .btn { min-width: 120px; justify-content: center; }
@media (max-width: 480px) {
  .wiz-footer-actions { flex-direction: column-reverse; }
  .wiz-footer-actions .btn { width: 100% !important; }
}
