/* NGO views - same layout as industry (side nav + top nav, dashboard header) */
.ngo-dashboard .page-header { margin-bottom: 0; }
.ngo-dashboard .page-subtitle {
  color: var(--color-text-muted);
  margin: 0.25rem 0 0 0;
  font-size: 0.9375rem;
}

.ngo-dashboard .dashboard-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.ngo-dashboard .dashboard-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.ngo-dashboard .dashboard-table-card {
  padding: var(--space-lg);
}

.ngo-dashboard .chart-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
  margin: 0 0 var(--space-md) 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ngo-dashboard .chart-title i { color: var(--color-primary); }

/* View tasks - summary stat cards */
.ngo-tasks-summary-cards { margin-bottom: var(--space-xl); }
.ngo-stat-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--space-md);
}
.ngo-stat-card {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-lg);
  background: var(--color-surface);
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
}
.ngo-stat-card .ngo-stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}
.ngo-stat-card.ngo-stat-total .ngo-stat-icon { background: rgba(34, 197, 94, 0.15); color: #16a34a; }
.ngo-stat-card.ngo-stat-planted .ngo-stat-icon { background: rgba(59, 130, 246, 0.15); color: #2563eb; }
.ngo-stat-card.ngo-stat-remaining .ngo-stat-icon { background: rgba(245, 158, 11, 0.15); color: #d97706; }
.ngo-stat-card .ngo-stat-body { display: flex; flex-direction: column; gap: 0.25rem; }
.ngo-stat-card .ngo-stat-value { font-size: 1.5rem; font-weight: 700; color: var(--color-text); }
.ngo-stat-card .ngo-stat-label { font-size: 0.8125rem; color: var(--color-text-muted); }

/* Modern dashboards (Planters, Tasks, Plants) */
.ngo-dashboard-modern .dashboard-header { margin-bottom: var(--space-xl); }
.ngo-modern-stats { margin-bottom: var(--space-xl); }

/* Main dashboard quick links */
.ngo-main-quick-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}
.ngo-quick-link {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  padding: var(--space-lg);
  background: var(--color-surface);
  border-radius: 12px;
  border: 1px solid var(--color-border);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}
.ngo-quick-link:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
  border-color: var(--color-primary);
  color: inherit;
}
.ngo-quick-link-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(22, 163, 74, 0.1));
  color: #16a34a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}
.ngo-quick-link:nth-child(2) .ngo-quick-link-icon { background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(37, 99, 235, 0.1)); color: #2563eb; }
.ngo-quick-link:nth-child(3) .ngo-quick-link-icon { background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(217, 119, 6, 0.1)); color: #d97706; }
.ngo-quick-link-label { font-weight: 600; font-size: 1rem; color: var(--color-text); }
.ngo-quick-link-desc { font-size: 0.8125rem; color: var(--color-text-muted); }
.ngo-main-charts { margin-bottom: var(--space-xl); }
.ngo-modern-stat-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-lg);
}
.ngo-modern-stat {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-lg);
  background: var(--color-surface);
  border-radius: 12px;
  border: 1px solid var(--color-border);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.ngo-modern-stat:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transform: translateY(-1px);
}
.ngo-modern-stat-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
}
.ngo-modern-stat-1 { background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(99, 102, 241, 0.15)); color: #2563eb; }
.ngo-modern-stat-2 { background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(22, 163, 74, 0.15)); color: #16a34a; }
.ngo-modern-stat-3 { background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(217, 119, 6, 0.15)); color: #d97706; }
.ngo-modern-stat .ngo-stat-planted { background: rgba(34, 197, 94, 0.2); color: #16a34a; }
.ngo-modern-stat .ngo-stat-remaining { background: rgba(245, 158, 11, 0.2); color: #d97706; }
.ngo-modern-stat-body { display: flex; flex-direction: column; gap: 0.25rem; min-width: 0; }
.ngo-modern-stat-value { font-size: 1.75rem; font-weight: 700; color: var(--color-text); line-height: 1.2; }
.ngo-modern-stat-label { font-size: 0.8125rem; color: var(--color-text-muted); font-weight: 500; }

.ngo-modern-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}
.ngo-modern-card {
  padding: var(--space-lg);
  background: var(--color-surface);
  border-radius: 12px;
  border: 1px solid var(--color-border);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
.ngo-modern-card .chart-title { margin-bottom: var(--space-md); }
.chart-wrap-fixed { position: relative; height: 260px; }
.chart-wrap-fixed canvas { max-height: 260px; }
.ngo-modern-table-card { margin-bottom: var(--space-lg); }
.ngo-modern-table-card .chart-title { margin-bottom: var(--space-md); }
.ngo-modern-table { width: 100%; border-collapse: collapse; }
.ngo-modern-table th,
.ngo-modern-table td { padding: 0.75rem 1rem; text-align: left; border-bottom: 1px solid var(--color-border); }
.ngo-modern-table th { font-size: 0.8125rem; font-weight: 600; color: var(--color-text-muted); text-transform: none; }
.ngo-modern-table tbody tr:hover { background: rgba(0, 0, 0, 0.02); }
.ngo-modern-list { min-height: 120px; }
.ngo-modern-ul { list-style: none; margin: 0; padding: 0; }
.ngo-modern-ul li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--color-border);
  gap: var(--space-md);
}
.ngo-modern-ul li:last-child { border-bottom: none; }
.ngo-modern-list-name { font-weight: 500; color: var(--color-text); }
.ngo-modern-list-badge { font-size: 0.8125rem; color: var(--color-text-muted); background: var(--color-bg); padding: 0.25rem 0.5rem; border-radius: 6px; }

/* View plants - all trees with filters */
.ngo-all-trees-card {
  padding: var(--space-lg);
  width: 100%;
  max-width: none;
  background: var(--color-surface);
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
}
.ngo-trees-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--color-border);
}
.ngo-trees-filters .filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.ngo-trees-filters .filter-label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-text-muted);
}
.ngo-trees-filters .filter-select {
  min-width: 140px;
}
.ngo-trees-filters .filter-actions {
  margin-left: auto;
}

/* View tasks - filter bar */
.ngo-tasks-filters-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--color-border);
}
.ngo-tasks-filters-bar .filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.ngo-tasks-filters-bar .filter-label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-text-muted);
}
.ngo-tasks-filters-bar .filter-select,
.ngo-tasks-filters-bar .filter-input {
  min-width: 140px;
}
.ngo-tasks-filters-bar .filter-input {
  padding: 0.4rem 0.6rem;
  font-size: 0.9375rem;
}
.ngo-tasks-filters-bar .filter-actions {
  margin-left: auto;
}

.ngo-trees-list .dashboard-table th,
.ngo-trees-list .dashboard-table td {
  white-space: nowrap;
}
.ngo-trees-list .dashboard-table td:nth-child(7) { white-space: normal; max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
.table-view-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem;
  font-size: 0.8125rem;
  text-decoration: none;
  white-space: nowrap;
}
.table-view-btn:hover { text-decoration: none; color: #fff; }
.status-badge.status-pending {
  background: rgba(100, 116, 139, 0.12);
  color: var(--color-text-muted);
}
.status-badge.status-unassigned {
  background: rgba(245, 158, 11, 0.15);
  color: #b45309;
}
.muted { color: var(--color-text-muted); font-size: 0.875rem; }

.ngo-dashboard .table-responsive {
  overflow-x: auto;
}

.ngo-dashboard .dashboard-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.ngo-dashboard .dashboard-table th,
.ngo-dashboard .dashboard-table td {
  padding: 0.5rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

.ngo-dashboard .dashboard-table th {
  font-weight: 600;
  color: var(--color-text-muted);
  background: var(--color-bg);
}

.ngo-dashboard .dashboard-table tbody tr:hover {
  background: var(--color-bg);
}

.ngo-dashboard .table-link {
  color: var(--color-primary);
  font-weight: 500;
  text-decoration: none;
}

.ngo-dashboard .table-link:hover { text-decoration: underline; }

.ngo-dashboard .status-badge {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: capitalize;
}

.ngo-dashboard .status-badge.status-assigned {
  background: #cce5ff;
  color: #004085;
}

.ngo-dashboard .status-badge.status-in_progress {
  background: #fff3cd;
  color: #856404;
}

.ngo-dashboard .status-badge.status-completed {
  background: #d4edda;
  color: #155724;
}

.ngo-dashboard .status-badge.status-verified {
  background: rgba(5, 150, 105, 0.12);
  color: var(--color-primary);
}

.ngo-dashboard .table-empty,
.ngo-dashboard .loading {
  padding: var(--space-md);
  color: var(--color-text-muted);
  font-size: 0.9375rem;
}

.ngo-tasks-list .table-responsive { margin-top: 0; }

/* NGO task detail - modern layout */
.ngo-task-content { margin-bottom: var(--space-xl); }

#view-ngo-task .dashboard-header .page-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.02em;
}
#view-ngo-task .dashboard-header .page-subtitle {
  color: var(--color-text-muted);
  font-size: 0.9375rem;
  margin-top: 0.25rem;
}

.ngo-task-detail-card {
  padding: var(--space-lg);
}

.ngo-task-meta {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

/* Task report (Plant details) - report style, modern UI */
.ngo-task-report {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}
.ngo-task-report-card,
.ngo-location-report-card {
  padding: var(--space-lg);
  width: 100%;
  max-width: none;
  background: var(--color-surface);
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition);
}
.ngo-task-report-card:hover,
.ngo-location-report-card:hover {
  box-shadow: var(--shadow);
}
.ngo-task-report .report-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-primary-dark);
  margin: 0 0 var(--space-lg) 0;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}
.ngo-location-report-card .report-section-title {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--color-text);
  margin: 0 0 var(--space-md) 0;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}
.report-grid-dense {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: var(--space-md) var(--space-lg);
  margin-bottom: var(--space-md);
}
.report-grid-dense .report-field-full { grid-column: 1 / -1; }
.report-row-single {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: var(--space-md) var(--space-lg);
  margin-top: var(--space-sm);
}
.report-row-single .report-field {
  flex: 1;
  min-width: 120px;
}
.report-row-single .report-field:first-child { flex: 2; min-width: 160px; }

/* Plant detail page - report style */
.ngo-plant-report { max-width: 1200px; }
.ngo-plant-summary-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}
.ngo-plant-chart-row {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}
@media (max-width: 720px) {
  .ngo-plant-chart-row { grid-template-columns: 1fr; }
}
.ngo-chart-card .chart-wrap { position: relative; height: 220px; }
.ngo-chart-card canvas { max-height: 220px; }
.ngo-task-details-inline .report-grid-dense { margin-top: 0.5rem; }
.ngo-task-map-card { margin-top: var(--space-lg); }
.ngo-plants-list-card { margin-top: var(--space-lg); }
.ngo-plants-table { width: 100%; }
.ngo-plants-table td:nth-child(4) { max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
.ngo-empty-plants { text-align: center; padding: var(--space-xl); color: var(--color-text-muted); }
.ngo-empty-plants i { font-size: 2rem; margin-bottom: 0.5rem; opacity: 0.6; }

.report-section {
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid var(--color-border);
}
.report-section .report-field-label {
  display: block;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin-bottom: 0.35rem;
}
.location-photos {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}
.location-photo-thumb {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  display: block;
}
.location-photos a:hover .location-photo-thumb { border-color: var(--color-primary); }
.location-docs-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.location-docs-list li { margin: 0.25rem 0; }
.location-docs-list a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--color-primary);
  text-decoration: none;
}
.location-docs-list a:hover { text-decoration: underline; }
.ngo-location-map {
  width: 100%;
  min-height: 200px;
  background: var(--color-bg-muted, #f0f0f0);
}
.report-field-value.muted { color: var(--color-text-muted); font-weight: 400; }

/* Planter View plants – map below table */
.planter-planting-details-map-card .chart-title { margin-bottom: 0.75rem; }
.planter-planting-details-map-container,
.ngo-planting-details-map-container,
.industry-planting-details-map-container {
  width: 100%;
  height: 360px;
  min-height: 280px;
  border-radius: var(--radius, 8px);
  overflow: hidden;
  background: var(--color-bg-muted, #f0f0f0);
}
.ngo-planting-details-map-card .chart-title { margin-bottom: 0.75rem; }

/* Empty state - modern */
.ngo-empty-locations .empty-state {
  text-align: center;
  padding: var(--space-xl);
}
.ngo-empty-locations .empty-state-icon {
  font-size: 3rem;
  color: var(--color-primary);
  opacity: 0.5;
  margin-bottom: var(--space-md);
  display: block;
}
.ngo-empty-locations .empty-state-text {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--color-text);
  margin: 0 0 var(--space-xs) 0;
}
.ngo-empty-locations .empty-state-hint {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  margin: 0;
}

/* Add tree location card - modern */
.ngo-add-location-card {
  padding: var(--space-lg);
  width: 100%;
  max-width: none;
  background: var(--color-surface);
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
}
.ngo-add-location-card .chart-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-text);
  margin: 0 0 var(--space-lg) 0;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}
.ngo-add-location-card .form-row { margin-bottom: var(--space-md); }
.ngo-add-location-card .btn-primary { margin-top: var(--space-sm); }

.ngo-dashboard .report-field-label {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  text-transform: capitalize;
}

.ngo-dashboard .report-field-value {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
}

.ngo-locations-title {
  font-size: 0.9375rem;
  font-weight: 600;
  margin: 0 0 var(--space-sm) 0;
  color: var(--color-text);
}

.ngo-locations-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.875rem;
}

.ngo-locations-list li {
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--color-border);
}

.ngo-locations-list li:last-child { border-bottom: none; }

.ngo-locations-list .location-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}
.ngo-locations-list .location-thumb {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  vertical-align: middle;
}
.ngo-locations-list .location-coords { font-weight: 500; }
.ngo-locations-list .location-planter,
.ngo-locations-list .location-seed { color: var(--color-text-muted); font-size: 0.8125rem; }
.ngo-locations-list .location-details { font-style: italic; color: var(--color-text-muted); font-size: 0.8125rem; }

/* Plant tree page */
.ngo-plant-tree-card {
  padding: var(--space-lg);
  width: 100%;
  max-width: none;
}
.ngo-plant-tree-card .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}
.ngo-plant-tree-card .form-group { margin-bottom: var(--space-md); }
.ngo-plant-tree-card .required { color: var(--color-danger, #c00); }
.ngo-plant-tree-card .form-message {
  margin: var(--space-md) 0;
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
}
.ngo-plant-tree-card .form-message.success { background: var(--color-success-bg, #e8f5e9); color: var(--color-success, #2e7d32); }
.ngo-plant-tree-card .form-message.error { background: var(--color-error-bg, #ffebee); color: var(--color-error, #c62828); }
@media (max-width: 520px) {
  .ngo-plant-tree-card .form-row { grid-template-columns: 1fr; }
}

.ngo-unassigned-card {
  padding: var(--space-lg);
  margin-top: var(--space-xl);
}
.ngo-unassigned-card .ngo-unassigned-desc {
  margin: 0 0 0.75rem 0;
  color: var(--text-muted, #64748b);
  font-size: 0.9375rem;
}
.ngo-unassigned-card .assign-task-select {
  display: inline-block;
  width: auto;
  min-width: 140px;
  margin-right: 0.5rem;
}
.ngo-unassigned-card .btn-sm {
  padding: 0.35rem 0.6rem;
  font-size: 0.8125rem;
}
.ngo-unassigned-card .assign-loc-btn {
  background: var(--color-success, #22c55e);
  color: #fff;
  border: none;
}
.ngo-unassigned-card .assign-loc-btn:hover {
  background: var(--color-success-dark, #16a34a);
  color: #fff;
}
.ngo-unassigned-controls {
  margin-bottom: 1rem;
}
.ngo-unassigned-show-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
}
.ngo-unassigned-show-row label {
  font-weight: 500;
  color: var(--color-text, #374151);
  margin: 0;
}
.ngo-unassigned-limit-input {
  width: 5rem;
  min-width: 4rem;
  text-align: center;
  padding: 0.35rem 0.5rem;
  font-size: 0.9375rem;
}
.ngo-unassigned-show-label {
  color: var(--color-text-muted, #6b7280);
  font-size: 0.9375rem;
}
.ngo-unassigned-check-all {
  margin-left: 0.5rem;
}
.ngo-unassigned-bulk {
  display: flex;
  align-items: center;
  gap: 0.5rem 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
  padding: 0.5rem 0;
}
.ngo-unassigned-bulk label { margin: 0; font-weight: 500; }
.ngo-unassigned-bulk .form-control { width: auto; min-width: 160px; }
.ngo-unassigned-table td { vertical-align: middle; }
.ngo-unassigned-table .th-checkbox,
.ngo-unassigned-table .td-checkbox { width: 2.25rem; text-align: center; }
.ngo-unassigned-table .th-checkbox input,
.ngo-unassigned-table .td-checkbox input { margin: 0; cursor: pointer; }
.ngo-unassigned-table .assign-client-select { margin-right: 0.5rem; }
.ngo-unassigned-table .td-assign { white-space: nowrap; }
.ngo-unassigned-table .assign-cell-inline { display: inline-flex; align-items: center; gap: 0.5rem; flex-wrap: nowrap; }
.ngo-unassigned-table .assign-cell-inline .form-control { width: auto; min-width: 140px; }
.ngo-unassigned-table .ngo-view-detail-btn { margin-left: 0.25rem; }

/* Client detail modal – modern, professional UI */
.ngo-client-detail-modal.admin-modal-overlay {
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 1.5rem;
  align-items: center;
  justify-content: center;
}
.ngo-client-detail-modal .ngo-client-detail-card {
  background: #fff;
  border-radius: 16px;
  max-width: 560px;
  width: 100%;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.05);
}
.ngo-client-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #e2e8f0;
  background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
}
.ngo-client-detail-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: #0f172a;
  letter-spacing: -0.02em;
}
.ngo-client-detail-close {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}
.ngo-client-detail-close:hover {
  background: #f1f5f9;
  color: #0f172a;
}
.ngo-client-detail-body {
  padding: 1.5rem;
  overflow-y: auto;
}
.ngo-client-detail-select-wrap { margin-bottom: 1.5rem; }
.ngo-client-detail-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #475569;
  margin-bottom: 0.5rem;
}
.ngo-client-detail-select-box {
  position: relative;
  display: block;
}
.ngo-client-detail-select-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 0.9375rem;
  pointer-events: none;
}
.ngo-client-detail-select {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.75rem;
  font-size: 0.9375rem;
  color: #0f172a;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.ngo-client-detail-select:hover { border-color: #cbd5e1; }
.ngo-client-detail-select:focus {
  outline: none;
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}
.ngo-client-detail-stats { margin-bottom: 1.5rem; }
.ngo-client-detail-stat-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}
.ngo-client-detail-stat {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  border-radius: 12px;
  border: 1px solid transparent;
  transition: transform 0.15s, box-shadow 0.15s;
}
.ngo-client-detail-stat:hover { transform: translateY(-1px); }
.ngo-client-detail-stat-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.ngo-client-detail-stat-planned {
  background: #eff6ff;
  border-color: #bfdbfe;
}
.ngo-client-detail-stat-planned .ngo-client-detail-stat-icon { background: #3b82f6; color: #fff; }
.ngo-client-detail-stat-planned .ngo-client-detail-stat-value { color: #1d4ed8; }
.ngo-client-detail-stat-planted {
  background: #ecfdf5;
  border-color: #a7f3d0;
}
.ngo-client-detail-stat-planted .ngo-client-detail-stat-icon { background: #10b981; color: #fff; }
.ngo-client-detail-stat-planted .ngo-client-detail-stat-value { color: #047857; }
.ngo-client-detail-stat-remaining {
  background: #fffbeb;
  border-color: #fde68a;
}
.ngo-client-detail-stat-remaining .ngo-client-detail-stat-icon { background: #f59e0b; color: #fff; }
.ngo-client-detail-stat-remaining .ngo-client-detail-stat-value { color: #b45309; }
.ngo-client-detail-stat-content { min-width: 0; }
.ngo-client-detail-stat-value { display: block; font-size: 1.375rem; font-weight: 700; line-height: 1.2; }
.ngo-client-detail-stat-label { font-size: 0.75rem; color: #64748b; font-weight: 500; text-transform: uppercase; letter-spacing: 0.03em; margin-top: 0.25rem; }
.ngo-client-detail-progress-wrap { margin-bottom: 1.5rem; }
.ngo-client-detail-progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}
.ngo-client-detail-progress-label { font-size: 0.8125rem; font-weight: 500; color: #475569; }
.ngo-client-detail-progress-pct { font-size: 0.9375rem; font-weight: 600; color: #10b981; }
.ngo-client-detail-progress-track {
  height: 8px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}
.ngo-client-detail-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #34d399);
  border-radius: 999px;
  transition: width 0.4s ease;
}
.ngo-client-detail-section-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: #334155;
  margin: 0 0 0.75rem 0;
}
.ngo-client-detail-chart-wrap { margin-bottom: 1.5rem; }
.ngo-client-detail-chart-container {
  position: relative;
  height: 200px;
  border-radius: 12px;
  background: #f8fafc;
  padding: 1rem;
}
.ngo-client-detail-table-wrap { margin-top: 0.5rem; }
.ngo-client-detail-table-inner { overflow-x: auto; border-radius: 10px; border: 1px solid #e2e8f0; }
.ngo-client-detail-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
}
.ngo-client-detail-table th,
.ngo-client-detail-table td { padding: 0.625rem 0.75rem; text-align: left; border-bottom: 1px solid #f1f5f9; }
.ngo-client-detail-table th {
  font-weight: 600;
  color: #475569;
  background: #f8fafc;
  white-space: nowrap;
}
.ngo-client-detail-table tr:last-child td { border-bottom: none; }
.ngo-client-detail-table tr:hover td { background: #f8fafc; }
.ngo-client-detail-badge {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.ngo-client-detail-badge-verified { background: #d1fae5; color: #065f46; }
.ngo-client-detail-badge-pending { background: #fef3c7; color: #92400e; }
.ngo-client-detail-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #10b981;
  font-weight: 500;
  text-decoration: none;
  font-size: 0.8125rem;
}
.ngo-client-detail-link:hover { text-decoration: underline; }
.ngo-client-detail-table-empty,
.ngo-client-detail-error {
  padding: 1rem;
  color: #64748b;
  font-size: 0.9375rem;
  margin: 0;
  border-radius: 10px;
  background: #f8fafc;
}
.ngo-client-detail-error { color: #dc2626; background: #fef2f2; }
.ngo-client-detail-loading { padding: 1rem; margin: 0; color: #64748b; font-size: 0.9375rem; }
.ngo-client-detail-empty {
  padding: 2rem 1.5rem;
  text-align: center;
  color: #64748b;
  font-size: 0.9375rem;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px dashed #e2e8f0;
}
.ngo-client-detail-empty-icon { font-size: 2rem; color: #cbd5e1; margin-bottom: 0.75rem; display: block; }
.ngo-client-detail-empty p { margin: 0; }
.ngo-client-detail-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid #e2e8f0;
  background: #f8fafc;
}
.ngo-client-detail-btn-close {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: #475569;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.ngo-client-detail-btn-close:hover {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #cbd5e1;
}

/* Add location card */
.ngo-add-location-card {
  padding: var(--space-lg);
}

.ngo-add-location-card .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

@media (max-width: 520px) {
  .ngo-add-location-card .form-row { grid-template-columns: 1fr; }
}

#ngo-add-location-form input[type="file"] { margin-top: 0.5rem; }

/* Planter page */
.ngo-planter-card {
  padding: var(--space-lg);
  width: 100%;
  max-width: none;
}
.ngo-planter-card .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}
.ngo-planter-card .form-message {
  margin: var(--space-md) 0;
  font-size: 0.9375rem;
}
.ngo-planter-card .form-message.success { background: var(--color-success-bg, #e8f5e9); color: var(--color-success, #2e7d32); padding: 0.5rem 0.75rem; border-radius: 6px; }
.ngo-planter-card .form-message.error { background: var(--color-error-bg, #ffebee); color: var(--color-error, #c62828); padding: 0.5rem 0.75rem; border-radius: 6px; }
.planter-photo-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-lg);
  align-items: start;
  margin-bottom: var(--space-md);
}
.planter-photo-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-sm);
}
.planter-photo-wrap {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--color-bg-muted, #f0f0f0);
  position: relative;
  flex-shrink: 0;
}
.planter-photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.planter-photo-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted, #666);
  font-size: 2rem;
}
.planter-photo-btn { margin-top: 0; }
.planter-fields-start { min-width: 0; }
.planter-photo-cell {
  width: 48px;
  text-align: center;
  vertical-align: middle;
}
.planter-thumb {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 50%;
  display: inline-block;
}
.planter-no-photo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-bg-muted, #f0f0f0);
  color: var(--color-text-muted, #666);
  font-size: 1rem;
}
.ngo-planter-list-card {
  padding: var(--space-lg);
  margin-top: var(--space-xl);
}
.ngo-planter-list-card .chart-title { margin-bottom: var(--space-md); }
@media (max-width: 640px) {
  .planter-photo-row { grid-template-columns: 1fr; }
  .ngo-planter-card .form-row { grid-template-columns: 1fr; }
}
