:root {
  --primary: #3ea32e;
  --primary-dark: #2f8221;
  --primary-light: #5cbe4a;
  --accent: #c98a40;
  --accent-light: #e0b070;
  --bg: #f2faf0;
  --bg-alt: #e0f5da;
  --surface: #ffffff;
  --text: #153a0d;
  --text-secondary: #256518;
  --text-light: #5c8f50;
  --border: #bce9b1;
  --border-dark: #8dd67d;
  --success: #2f8221;
  --font-display: 'Lora', serif;
  --font-body: 'Nunito', sans-serif;
  --shadow-sm: 0 8px 24px rgba(46, 130, 28, 0.12);
  --shadow-md: 0 12px 28px rgba(46, 130, 28, 0.14);
  --shadow-lg: 0 20px 48px rgba(46, 130, 28, 0.16);
}

body {
  background: #ffffff;
  font-weight: 600;
}

.page-content {
  padding: 32px;
}

.card,
.stat-card {
  border-color: var(--border);
}

.page-content,
th,
tr:hover td {
  background: var(--bg);
}

.stat-card,
.card {
  border-width: 2px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  min-height: 112px;
  padding: 20px;
  border: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  transition: var(--transition);
}

.stat-card > div:last-child {
  flex: 1;
  text-align: right;
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(46, 130, 28, 0.12);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-alt);
  font-size: 1.3rem;
  flex-shrink: 0;
}

.stat-icon img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.stat-icon.approved-icon {
  background: transparent;
}

.stat-icon.svg-icon-plain {
  background: transparent;
}

.stat-icon.approved-icon img {
  width: 46px;
  height: 46px;
}

.stat-icon.request-stat-icon img {
  width: 44px;
  height: 44px;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.stat-change {
  display: none;
}

.stat-change.up {
  color: var(--success);
}

.stat-change.down {
  color: var(--error);
}

.content-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
}

.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
}

.card-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
}

.card-body {
  padding: 20px 24px;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th {
  text-align: left;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

td {
  padding: 14px 16px;
  font-size: 0.88rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

tr:last-child td {
  border-bottom: none;
}

.dashboard-request-location {
  color: var(--primary);
  margin-right: 4px;
}

.dashboard-request-empty td {
  color: var(--text-secondary);
  padding: 28px 16px;
  text-align: center;
}

.dashboard-request-empty:hover td {
  background: var(--surface);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 700;
}

.status-badge.pending {
  background: rgba(232, 160, 32, 0.1);
  color: #92620a;
}

.status-badge.approved {
  background: rgba(74, 124, 89, 0.1);
  color: var(--success);
}

.status-badge.rejected {
  background: rgba(220, 38, 38, 0.1);
  color: var(--error);
}

.status-badge.active {
  background: rgba(59, 130, 246, 0.1);
  color: #1d4ed8;
}

.status-badge::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.map-placeholder {
  height: 300px;
  background: linear-gradient(135deg, #f2faf0, #e0f5da);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  border: 2px dashed var(--border-dark);
}

.map-placeholder-icon {
  font-size: 2.5rem;
}

.map-placeholder-note {
  color: var(--text-light);
  font-size: 0.78rem;
  text-align: center;
}

.nearby-location-field {
  display: grid;
  gap: 7px;
  margin-bottom: 14px;
}

.nearby-location-field span {
  color: var(--text-secondary);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nearby-location-field select {
  width: 100%;
  min-height: 44px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  padding: 10px 12px;
}

.dashboard-view-map {
  justify-content: center;
  margin-top: 14px;
  width: 100%;
}

.dashboard-view-map.is-loading {
  opacity: 0.72;
  pointer-events: none;
}

.dashboard-map-shell {
  border: 2px dashed var(--border-dark);
  border-radius: var(--radius-md);
  min-height: 360px;
  overflow: hidden;
  position: relative;
}

.dashboard-leaflet-map {
  height: 360px;
  min-height: 360px;
  width: 100%;
}

.dashboard-map-state {
  border: 0;
  border-radius: 0;
  height: 100%;
  inset: 0;
  position: absolute;
  z-index: 2;
}

.dashboard-map-state[hidden] {
  display: none;
}

.dashboard-map-shell .leaflet-control-zoom a {
  color: var(--primary-dark);
  font-weight: 900;
}

.dashboard-map-shell .leaflet-popup-content-wrapper {
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

.dashboard-map-popup {
  min-width: 150px;
}

.dashboard-map-popup strong,
.dashboard-map-popup span,
.dashboard-map-popup b {
  display: block;
}

.dashboard-map-popup strong {
  color: var(--text);
  font-family: var(--font-display);
  font-size: 0.95rem;
}

.dashboard-map-popup span {
  color: var(--text-secondary);
  font-size: 0.76rem;
  font-weight: 800;
  margin: 3px 0 7px;
}

.dashboard-map-popup b {
  color: var(--primary-dark);
  font-size: 0.86rem;
}

@media (max-width: 1024px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .content-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .page-content {
    padding: 24px 16px 20px;
  }

  .page-content h2 {
    font-size: 1.35rem !important;
  }

  .page-content p {
    font-size: 0.9rem;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 24px;
  }

  .stat-card {
    min-height: 96px;
    padding: 18px 14px;
    flex-direction: row;
    align-items: flex-start;
    gap: 12px;
    border-radius: 18px;
  }

  .stat-icon {
    width: 40px;
    height: 40px;
    font-size: 1.1rem;
  }

  .stat-value {
    font-size: 1.45rem;
  }

  .stat-label,
  .stat-change {
    font-size: 0.76rem;
  }

  .content-grid {
    gap: 18px;
  }

  .card {
    border-radius: 18px;
  }

  .card-header {
    padding: 16px 14px;
    gap: 12px;
  }

  .card-title {
    font-size: 1rem;
  }

  .card-header .btn {
    padding: 8px 12px !important;
    font-size: 0.75rem !important;
  }

  th,
  td {
    padding: 12px 14px;
    font-size: 0.8rem;
  }

  .table-wrap {
    -webkit-overflow-scrolling: touch;
  }

  .map-placeholder {
    height: 220px;
  }

  .dashboard-map-shell,
  .dashboard-leaflet-map {
    height: 300px;
    min-height: 300px;
  }
}
