/* ============================================================
   HBMD Admin Dashboard – Custom Stylesheet
   Theme: Forest Green + Professional Dark Sidebar
   ============================================================ */

:root {
  --primary: #2d7d46;
  --primary-dark: #1e5c32;
  --primary-light: #e8f5ec;
  --accent: #4CAF50;
  --accent-light: #81C784;
  --sidebar-bg: #0f2419;
  --sidebar-text: #b8d4bf;
  --sidebar-active: #2d7d46;
  --sidebar-hover: rgba(255,255,255,0.06);
  --sidebar-width: 260px;
  --navbar-height: 64px;
  --body-bg: #f0f4f1;
  --card-bg: #ffffff;
  --text-primary: #1a2e1f;
  --text-muted: #6b7a6f;
  --border-color: #dde8df;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
  --radius: 12px;
  --radius-sm: 8px;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--body-bg);
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.6;
}

/* ── Layout ─────────────────────────────────────────────── */
.wrapper { display: flex; min-height: 100vh; }

.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: margin-left 0.3s ease;
}

.content-area {
  flex: 1;
  padding: 24px;
  margin-top: var(--navbar-height);
}

/* ── Sidebar ─────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  transition: transform 0.3s ease;
}

.sidebar-header {
  padding: 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar-logo { display: flex; align-items: center; gap: 12px; }

.logo-icon {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; color: white;
  box-shadow: 0 4px 12px rgba(45,125,70,0.4);
}

.logo-title {
  display: block;
  font-size: 18px; font-weight: 700;
  color: white; letter-spacing: 0.5px;
}

.logo-subtitle {
  display: block;
  font-size: 10px; color: var(--sidebar-text);
  letter-spacing: 0.3px;
}

.sidebar-menu { flex: 1; padding: 16px 0; }

.menu-section { margin-bottom: 8px; }

.menu-label {
  display: block;
  font-size: 10px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 1px; color: rgba(184,212,191,0.5);
  padding: 8px 20px 4px;
}

.sidebar .nav-link {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 20px;
  color: var(--sidebar-text);
  border-radius: 0;
  transition: all 0.2s;
  font-size: 13.5px;
  font-weight: 400;
  text-decoration: none;
  border-left: 3px solid transparent;
}

.sidebar .nav-link i { font-size: 16px; width: 18px; text-align: center; }

.sidebar .nav-link:hover {
  background: var(--sidebar-hover);
  color: #fff;
  border-left-color: rgba(76,175,80,0.4);
}

.sidebar .nav-link.active {
  background: rgba(45,125,70,0.25);
  color: #fff;
  font-weight: 500;
  border-left-color: var(--accent);
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid rgba(255,255,255,0.06);
  display: flex; align-items: center; gap: 10px;
}

.admin-avatar {
  width: 36px; height: 36px;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--accent-light); font-size: 16px;
}

.admin-name { display: block; color: #fff; font-size: 13px; font-weight: 500; }
.admin-role { background: rgba(76,175,80,0.2); color: var(--accent-light); font-size: 10px; }
.admin-details { flex: 1; }

.btn-logout {
  width: 32px; height: 32px;
  background: rgba(255,255,255,0.06);
  border: none; border-radius: 8px;
  color: var(--sidebar-text);
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s; text-decoration: none;
}

.btn-logout:hover { background: rgba(220,53,69,0.2); color: #dc3545; }

.sidebar-toggle-btn {
  background: none; border: none;
  color: var(--sidebar-text); font-size: 20px;
  cursor: pointer; padding: 4px;
}

/* ── Top Navbar ──────────────────────────────────────────── */
.top-navbar {
  position: fixed;
  top: 0; right: 0;
  left: var(--sidebar-width);
  height: var(--navbar-height);
  background: white;
  border-bottom: 1px solid var(--border-color);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px;
  z-index: 999;
  box-shadow: 0 1px 8px rgba(0,0,0,0.05);
  transition: left 0.3s ease;
}

.navbar-left { display: flex; align-items: center; gap: 16px; }
.navbar-right { display: flex; align-items: center; gap: 16px; }

.page-title h5 { font-size: 16px; font-weight: 600; color: var(--text-primary); }
.breadcrumb { font-size: 11px; }
.breadcrumb-item a { color: var(--primary); text-decoration: none; }

.navbar-time { font-size: 12px; color: var(--text-muted); }

.btn-admin-user {
  background: var(--primary-light);
  border: 1px solid var(--border-color);
  color: var(--primary-dark);
  font-size: 13px; font-weight: 500;
  border-radius: 30px;
  padding: 6px 14px;
  display: flex; align-items: center; gap: 8px;
}

.btn-admin-user:hover { background: var(--primary); color: white; }

.user-avatar {
  width: 28px; height: 28px;
  background: var(--primary);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 13px;
}

/* ── Footer ──────────────────────────────────────────────── */
.admin-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
  background: white;
}

/* ── Cards ───────────────────────────────────────────────── */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.card-header {
  background: transparent;
  border-bottom: 1px solid var(--border-color);
  padding: 16px 20px;
  font-weight: 600; font-size: 14px;
}

/* ── Stat Cards ──────────────────────────────────────────── */
.stat-card {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 20px;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.stat-card .stat-icon {
  width: 52px; height: 52px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; margin-bottom: 12px;
}

.stat-card .stat-value {
  font-size: 28px; font-weight: 700;
  line-height: 1; margin-bottom: 4px;
}

.stat-card .stat-label {
  font-size: 12px; color: var(--text-muted);
  font-weight: 500; text-transform: uppercase; letter-spacing: 0.5px;
}

.stat-card .stat-trend {
  font-size: 11px; margin-top: 8px;
  display: flex; align-items: center; gap: 4px;
}

/* Stat card variants */
.stat-green .stat-icon { background: #e8f5ec; color: var(--primary); }
.stat-green .stat-value { color: var(--primary); }
.stat-blue .stat-icon { background: #e3f2fd; color: #1976D2; }
.stat-blue .stat-value { color: #1976D2; }
.stat-orange .stat-icon { background: #fff3e0; color: #F57C00; }
.stat-orange .stat-value { color: #F57C00; }
.stat-purple .stat-icon { background: #f3e5f5; color: #7B1FA2; }
.stat-purple .stat-value { color: #7B1FA2; }
.stat-teal .stat-icon { background: #e0f7fa; color: #00838F; }
.stat-teal .stat-value { color: #00838F; }

/* ── Tables ──────────────────────────────────────────────── */
.table-custom { font-size: 13px; }
.table-custom th {
  background: var(--primary-light);
  color: var(--primary-dark);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid var(--border-color);
  padding: 10px 12px;
}
.table-custom td { padding: 10px 12px; vertical-align: middle; }
.table-custom tbody tr:hover { background: #f8fbf9; }

/* ── Badges ──────────────────────────────────────────────── */
.badge-pending { background: #FFF3E0; color: #E65100; border: 1px solid #FFCC80; }
.badge-approved { background: #E8F5E9; color: #2E7D32; border: 1px solid #A5D6A7; }
.badge-planter { background: #E3F2FD; color: #1565C0; }
.badge-monitor { background: #F3E5F5; color: #6A1B9A; }
.badge-admin { background: #FCE4EC; color: #880E4F; }

/* ── Compliance Grid ─────────────────────────────────────── */
.compliance-uploaded { background: #E8F5E9; border-left: 4px solid #4CAF50; }
.compliance-pending { background: #FFF3E0; border-left: 4px solid #FF9800; }

/* ── Progress Bar ────────────────────────────────────────── */
.compliance-bar { height: 8px; border-radius: 4px; background: #e9ecef; overflow: hidden; }
.compliance-bar-fill { height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--primary), var(--accent)); transition: width 1s ease; }

/* ── Gallery ─────────────────────────────────────────────── */
.gallery-card { border-radius: var(--radius); overflow: hidden; cursor: pointer; transition: transform 0.2s; }
.gallery-card:hover { transform: scale(1.02); }
.gallery-card img { width: 100%; height: 180px; object-fit: cover; }

/* ── Login Page ──────────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  background: linear-gradient(135deg, #0f2419 0%, #1e5c32 50%, #2d7d46 100%);
  display: flex; align-items: center; justify-content: center;
}

.login-card {
  background: white;
  border-radius: 20px;
  padding: 48px 40px;
  width: 100%; max-width: 420px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.login-logo {
  width: 72px; height: 72px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 20px;
  display: flex; align-items: center; justify-content: center;
  font-size: 36px; color: white;
  margin: 0 auto 24px;
  box-shadow: 0 8px 24px rgba(45,125,70,0.4);
}

/* ── Map ─────────────────────────────────────────────────── */
#plantationMap { height: 65vh; border-radius: var(--radius); }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 992px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .top-navbar { left: 0; }
}

/* ── Utilities ───────────────────────────────────────────── */
.page-header { margin-bottom: 24px; }
.page-header h4 { font-weight: 700; color: var(--text-primary); }
.section-title { font-size: 13px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 12px; }
.empty-state { text-align: center; padding: 48px; color: var(--text-muted); }
.empty-state i { font-size: 48px; display: block; margin-bottom: 16px; }
.avatar-sm { width: 32px; height: 32px; border-radius: 50%; background: var(--primary-light); color: var(--primary); display: inline-flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 600; }
.search-box { max-width: 320px; }
.search-box .input-group-text { background: white; border-right: none; color: var(--text-muted); }
.search-box .form-control { border-left: none; }
.search-box .form-control:focus { box-shadow: none; border-color: #dee2e6; }
.action-bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; flex-wrap: wrap; gap: 12px; }


