/* ============================================================
   ASPMES - Anambra State Project Monitoring System
   Main Stylesheet - Dark Government Theme
   ============================================================ */
:root {
  --sidebar-width: 265px;
  --topbar-height: 60px;
  --primary: #1a8a4a;
  --primary-dark: #136636;
  --primary-light: #22aa5e;
  --gold: #d4a017;
  --gold-light: #f0bc2e;
  --anambra-green: #006633;

  /* Dark theme overrides */
  --bs-body-bg: #0f1923;
  --bs-body-color: #cdd9e5;
  --card-bg: #162231;
  --card-border: rgba(255,255,255,0.07);
  --sidebar-bg: #0d1926;
  --sidebar-hover: rgba(26,138,74,0.15);
  --sidebar-active-bg: rgba(26,138,74,0.2);
  --sidebar-active-border: var(--primary);
  --topbar-bg: #0d1926;
  --input-bg: #1a2d40;
  --table-hover: rgba(255,255,255,0.03);
}

/* ===== BASE ===== */
*, *::before, *::after { box-sizing: border-box; }
body {
  font-family: 'Nunito', system-ui, sans-serif;
  font-size: 0.9rem;
  background: var(--bs-body-bg);
  color: var(--bs-body-color);
  min-height: 100vh;
}
h1,h2,h3,h4,h5,h6 { font-family: 'Playfair Display', Georgia, serif; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
a { color: var(--primary-light); }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #0d1926; }
::-webkit-scrollbar-thumb { background: #2a4060; border-radius: 3px; }

/* ===== SIDEBAR ===== */
.sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  border-right: 1px solid rgba(255,255,255,0.06);
  display: flex;
  flex-direction: column;
  z-index: 1050;
  overflow-y: auto;
  overflow-x: hidden;
  transition: transform 0.3s ease;
}
.sidebar-header {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.sidebar-logo { display: flex; align-items: center; gap: 10px; }
.logo-icon {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: #fff; flex-shrink: 0;
}
.logo-name { font-family: 'Playfair Display', serif; font-size: 18px; font-weight: 700; color: #fff; line-height: 1; }
.logo-sub { font-size: 10px; color: #6b8aad; letter-spacing: 0.8px; margin-top: 2px; }
.sidebar-close { background: none; border: none; color: #6b8aad; font-size: 16px; cursor: pointer; padding: 4px; }

.sidebar-user-card {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 20px;
  background: rgba(255,255,255,0.03);
}
.user-avatar-sm {
  width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--gold));
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: #fff; flex-shrink: 0;
}
.user-name-sm { font-size: 12px; font-weight: 700; color: #e0ebf5; line-height: 1.2; margin-bottom: 3px; }
.badge-sm { font-size: 9px !important; padding: 2px 6px !important; }
.sidebar-divider { border-color: rgba(255,255,255,0.06); margin: 0; }
.sidebar-nav { padding: 8px 10px; flex: 1; }
.nav-section {
  font-size: 9.5px; font-weight: 700; letter-spacing: 1.2px;
  text-transform: uppercase; color: #4a6580;
  padding: 6px 10px 4px; margin-top: 4px;
}
.sidebar-nav .nav-link {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 8px;
  color: #8bacc8; font-size: 13px; font-weight: 500;
  text-decoration: none; margin-bottom: 2px;
  transition: all 0.18s ease; border-left: 3px solid transparent;
}
.sidebar-nav .nav-link i { font-size: 15px; flex-shrink: 0; }
.sidebar-nav .nav-link:hover { background: var(--sidebar-hover); color: #cfe2f3; }
.sidebar-nav .nav-link.active {
  background: var(--sidebar-active-bg);
  color: var(--primary-light);
  border-left-color: var(--primary);
  font-weight: 700;
}
.sidebar-nav .nav-link .badge { font-size: 9px; }

/* ===== OVERLAY ===== */
.sidebar-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.55); z-index: 1040;
}

/* ===== MAIN WRAPPER ===== */
.main-wrapper {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  display: flex; flex-direction: column;
  transition: margin-left 0.3s ease;
}

/* ===== TOPBAR ===== */
.topbar {
  height: var(--topbar-height);
  background: var(--topbar-bg);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  display: flex; align-items: center;
  padding: 0 20px; gap: 12px;
  position: sticky; top: 0; z-index: 900;
  flex-shrink: 0;
}
.topbar-toggle {
  background: none; border: none; color: #6b8aad;
  font-size: 22px; cursor: pointer; padding: 4px 6px;
  border-radius: 6px; display: none;
  transition: color 0.2s;
}
.topbar-toggle:hover { color: #fff; background: rgba(255,255,255,0.06); }
.topbar-title { font-size: 15px; font-weight: 600; color: #cfe2f3; }
.topbar-title small { font-family: 'Nunito', sans-serif; font-size: 11px; }
.topbar-brand { font-size: 16px; color: #cfe2f3; }
.btn-topbar {
  background: none; border: none; color: #6b8aad;
  padding: 6px 10px; border-radius: 8px; cursor: pointer;
  transition: all 0.18s;
}
.btn-topbar:hover { background: rgba(255,255,255,0.07); color: #cfe2f3; }
.topbar-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--gold));
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: #fff;
}

/* ===== PAGE CONTENT ===== */
.page-content {
  padding: 24px 28px;
  flex: 1;
}
.page-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 24px; flex-wrap: wrap; gap: 12px;
}
.page-header-title h4 { font-size: 22px; color: #e0ebf5; margin-bottom: 2px; }
.page-header-title p { color: #6b8aad; font-size: 12px; margin: 0; }

/* ===== CARDS ===== */
.card {
  background: var(--card-bg) !important;
  border: 1px solid var(--card-border) !important;
  border-radius: 12px !important;
}
.card-header {
  background: rgba(255,255,255,0.03) !important;
  border-bottom: 1px solid var(--card-border) !important;
  padding: 14px 20px !important;
}
.card-header h5, .card-header h6 { margin: 0; font-size: 15px; color: #cfe2f3; }
.card-body { padding: 20px; }

/* ===== STAT CARDS ===== */
.stat-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 20px;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s, border-color 0.2s;
}
.stat-card:hover { transform: translateY(-2px); border-color: rgba(255,255,255,0.15); }
.stat-card::before {
  content: ''; position: absolute;
  top: 0; left: 0; right: 0; height: 3px;
  border-radius: 12px 12px 0 0;
}
.stat-card.border-success::before { background: #22bb66; }
.stat-card.border-primary::before { background: #0d6efd; }
.stat-card.border-warning::before { background: #ffc107; }
.stat-card.border-danger::before  { background: #dc3545; }
.stat-card.border-info::before    { background: #0dcaf0; }
.stat-card.border-gold::before    { background: var(--gold); }
.stat-card .stat-label { font-size: 10px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: #6b8aad; }
.stat-card .stat-value { font-family: 'Playfair Display', serif; font-size: 32px; font-weight: 700; color: #e0ebf5; line-height: 1.1; margin: 6px 0 3px; }
.stat-card .stat-sub   { font-size: 11px; color: #4a6580; }
.stat-card .stat-icon  { position: absolute; top: 16px; right: 16px; font-size: 2.5rem; opacity: 0.1; }
.stat-card .stat-change{ font-size: 11px; margin-top: 4px; }

/* ===== TABLES ===== */
.table { color: var(--bs-body-color); }
.table thead th {
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid rgba(255,255,255,0.08) !important;
  font-size: 10px; font-weight: 700; letter-spacing: 1px;
  text-transform: uppercase; color: #4a6580;
  padding: 10px 14px; white-space: nowrap;
}
.table tbody tr { border-bottom: 1px solid rgba(255,255,255,0.04); }
.table tbody tr:hover td { background: var(--table-hover); }
.table tbody td { padding: 12px 14px; vertical-align: middle; font-size: 13px; border: none; }
.table tbody tr:last-child { border-bottom: none; }

/* ===== PROGRESS BARS ===== */
.progress { background: rgba(255,255,255,0.08); border-radius: 6px; }
.progress-bar { border-radius: 6px; transition: width 0.8s ease; }

/* ===== FORMS ===== */
.form-control, .form-select {
  background: var(--input-bg) !important;
  border: 1px solid rgba(255,255,255,0.1) !important;
  color: #cdd9e5 !important;
  border-radius: 8px !important;
  font-size: 13px;
}
.form-control:focus, .form-select:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px rgba(26,138,74,0.2) !important;
}
.form-label { font-size: 11px; font-weight: 700; letter-spacing: 0.8px; text-transform: uppercase; color: #6b8aad; margin-bottom: 5px; }
.form-control::placeholder { color: #3a556a !important; }
.input-group-text { background: rgba(255,255,255,0.05) !important; border-color: rgba(255,255,255,0.1) !important; color: #6b8aad !important; }

/* ===== BUTTONS ===== */
.btn { border-radius: 8px !important; font-size: 13px; font-weight: 600; }
.btn-primary { background: var(--primary) !important; border-color: var(--primary) !important; }
.btn-primary:hover { background: var(--primary-dark) !important; }
.btn-outline-primary { color: var(--primary-light) !important; border-color: var(--primary) !important; }
.btn-outline-primary:hover { background: var(--primary) !important; color: #fff !important; }

/* ===== BADGES ===== */
.badge { font-size: 10px; padding: 4px 8px; border-radius: 6px; font-weight: 700; }

/* ===== NOTIFICATIONS ===== */
.notif-dropdown {
  width: 360px; max-height: 480px;
  background: #0d1926 !important;
  border: 1px solid rgba(255,255,255,0.08) !important;
}
.notif-header { border-bottom: 1px solid rgba(255,255,255,0.06); background: rgba(255,255,255,0.02); }
.notif-body { overflow-y: auto; max-height: 380px; }
.notif-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 16px; border-bottom: 1px solid rgba(255,255,255,0.04);
  text-decoration: none; color: inherit; transition: background 0.15s;
}
.notif-item:hover { background: rgba(255,255,255,0.04); }
.notif-item.unread { background: rgba(26,138,74,0.05); }
.notif-title { font-size: 12px; font-weight: 700; color: #cfe2f3; line-height: 1.3; }
.notif-msg   { font-size: 11px; margin-top: 2px; line-height: 1.4; }
.notif-time  { font-size: 10px; margin-top: 3px; }

/* ===== LGA CARDS ===== */
.lga-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 10px; padding: 14px;
  cursor: pointer; transition: all 0.2s;
  text-decoration: none; color: inherit;
  display: block;
}
.lga-card:hover { border-color: var(--primary); transform: translateY(-2px); }
.lga-card-name { font-size: 13px; font-weight: 700; color: #cfe2f3; margin-bottom: 6px; }
.lga-card-meta { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.lga-card-count { font-size: 10px; color: #4a6580; }
.lga-card-pct { font-size: 14px; font-weight: 700; }

/* ===== PROJECT CARD ===== */
.project-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px; padding: 18px;
  margin-bottom: 14px;
  transition: all 0.2s;
}
.project-card:hover { border-color: rgba(255,255,255,0.15); }
.project-card.delayed { border-left: 4px solid #dc3545; }
.project-card.completed { border-left: 4px solid #22bb66; }
.project-card.ongoing { border-left: 4px solid #0d6efd; }
.project-card-code { font-size: 10px; color: #4a6580; font-family: monospace; }
.project-card-name { font-size: 15px; font-weight: 700; color: #e0ebf5; margin: 3px 0 6px; }
.project-meta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.project-meta-item { font-size: 11px; color: #6b8aad; display: flex; align-items: center; gap: 4px; }

/* ===== ALERTS ===== */
.alert { border-radius: 10px !important; font-size: 13px; border: 1px solid transparent; }
.alert-danger  { background: rgba(220,53,69,0.12)  !important; border-color: rgba(220,53,69,0.25)  !important; color: #f0a8ae !important; }
.alert-warning { background: rgba(255,193,7,0.12)  !important; border-color: rgba(255,193,7,0.25)  !important; color: #ffe083 !important; }
.alert-success { background: rgba(34,187,102,0.12) !important; border-color: rgba(34,187,102,0.25) !important; color: #80e8b0 !important; }
.alert-info    { background: rgba(13,202,240,0.12) !important; border-color: rgba(13,202,240,0.25) !important; color: #7de5f3 !important; }

/* ===== UPLOAD AREA ===== */
.upload-area {
  border: 2px dashed rgba(255,255,255,0.15);
  border-radius: 10px; padding: 30px 20px;
  text-align: center; cursor: pointer;
  transition: all 0.2s;
}
.upload-area:hover { border-color: var(--primary); background: rgba(26,138,74,0.05); }
.upload-area i { font-size: 36px; color: #4a6580; margin-bottom: 10px; display: block; }

/* ===== PHOTO PREVIEWS ===== */
.photo-previews { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.photo-thumb {
  width: 80px; height: 70px; border-radius: 8px;
  object-fit: cover; border: 1px solid rgba(255,255,255,0.1);
}
.photo-thumb-placeholder {
  width: 80px; height: 70px; border-radius: 8px;
  background: rgba(255,255,255,0.05);
  display: flex; align-items: center; justify-content: center;
  border: 1px dashed rgba(255,255,255,0.15); font-size: 22px;
  color: #4a6580; cursor: pointer;
}

/* ===== INDICATOR PROGRESS ===== */
.indicator-row {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 8px; padding: 12px 16px;
  margin-bottom: 10px;
}
.indicator-name { font-size: 12px; font-weight: 700; color: #cfe2f3; margin-bottom: 6px; }
.indicator-values { display: flex; justify-content: space-between; font-size: 11px; color: #4a6580; margin-bottom: 6px; }

/* ===== MILESTONE TIMELINE ===== */
.timeline { position: relative; padding-left: 30px; }
.timeline::before { content:''; position:absolute; left:12px; top:0; bottom:0; width:2px; background:rgba(255,255,255,0.08); }
.timeline-item { position: relative; margin-bottom: 20px; }
.timeline-dot {
  position: absolute; left: -24px; top: 4px;
  width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid;
}
.timeline-dot.completed { background: #22bb66; border-color: #22bb66; }
.timeline-dot.pending   { background: var(--card-bg); border-color: #4a6580; }
.timeline-dot.missed    { background: #dc3545; border-color: #dc3545; }
.timeline-content h6 { font-size: 13px; color: #cfe2f3; margin-bottom: 2px; }
.timeline-content small { font-size: 11px; color: #4a6580; }

/* ===== REPORT STATUS FLOW ===== */
.status-flow {
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; flex-wrap: wrap; margin-top: 8px;
}
.status-step {
  display: flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 99px;
  background: rgba(255,255,255,0.05); color: #4a6580;
}
.status-step.done { background: rgba(34,187,102,0.15); color: #80e8b0; }
.status-step.current { background: rgba(255,193,7,0.15); color: #ffe083; }
.status-step .arrow { color: #4a6580; margin: 0 2px; }

/* ===== WEEKLY REPORT FORM ===== */
.report-summary-card {
  background: rgba(26,138,74,0.08);
  border: 1px solid rgba(26,138,74,0.2);
  border-radius: 10px; padding: 16px;
  margin-bottom: 14px;
}

/* ===== LOGIN PAGE ===== */
.login-wrapper {
  min-height: 100vh; display: flex;
  align-items: center; justify-content: center;
  background: var(--bs-body-bg);
}
.login-bg-pattern {
  position: fixed; inset: 0; z-index: 0; overflow: hidden;
  background: radial-gradient(ellipse at 10% 50%, rgba(26,138,74,0.07) 0%, transparent 55%),
              radial-gradient(ellipse at 90% 50%, rgba(212,160,23,0.05) 0%, transparent 55%);
}
.login-card {
  position: relative; z-index: 1;
  width: 440px; max-width: 95vw;
  background: var(--card-bg);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 40px;
}
.login-header { text-align: center; margin-bottom: 28px; }
.login-logo-wrap {
  width: 76px; height: 76px; border-radius: 50%;
  background: rgba(26,138,74,0.15);
  border: 2px solid rgba(26,138,74,0.4);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 34px; margin-bottom: 14px;
}
.login-title { font-family: 'Playfair Display', serif; font-size: 22px; color: #e0ebf5; margin-bottom: 3px; }
.login-sub { font-size: 11px; color: #4a6580; letter-spacing: 1px; text-transform: uppercase; }
.login-divider { border-color: rgba(255,255,255,0.07); margin: 22px 0; }
.demo-accounts {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 8px; padding: 12px 16px;
  margin-top: 16px; font-size: 11px; color: #4a6580;
}
.demo-accounts strong { color: #6b8aad; }
.demo-accounts .demo-row { display: flex; justify-content: space-between; margin-bottom: 3px; }

/* ===== MOBILE RESPONSIVE ===== */
@media (max-width: 991.98px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.show { transform: translateX(0); }
  .sidebar-overlay.show { display: block; }
  .main-wrapper { margin-left: 0 !important; }
  .topbar-toggle { display: block !important; }
  .page-content { padding: 16px; }
}
@media (max-width: 575.98px) {
  .page-content { padding: 12px; }
  .stat-card .stat-value { font-size: 24px; }
  .login-card { padding: 28px 20px; }
  .table-responsive { font-size: 11px; }
}

/* ===== UTILITIES ===== */
.text-gold { color: var(--gold) !important; }
.border-gold { border-color: var(--gold) !important; }
.bg-card { background: var(--card-bg) !important; }
.rounded-lg { border-radius: 12px !important; }
.fs-xs { font-size: 11px; }
.monospace { font-family: 'Courier New', monospace; }
.cursor-pointer { cursor: pointer; }

/* Dropdown dark overrides */
.dropdown-menu { background: #0d1926 !important; border: 1px solid rgba(255,255,255,0.08) !important; }
.dropdown-item { color: #8bacc8 !important; font-size: 13px; }
.dropdown-item:hover { background: rgba(255,255,255,0.06) !important; color: #cfe2f3 !important; }
.dropdown-divider { border-color: rgba(255,255,255,0.06) !important; }
.dropdown-header { color: #4a6580 !important; }

/* Modal dark overrides */
.modal-content { background: var(--card-bg) !important; border: 1px solid rgba(255,255,255,0.08) !important; }
.modal-header { border-bottom: 1px solid rgba(255,255,255,0.06) !important; }
.modal-footer { border-top: 1px solid rgba(255,255,255,0.06) !important; }
.btn-close { filter: invert(1); opacity: 0.5; }

/* Tabs */
.nav-tabs { border-bottom: 1px solid rgba(255,255,255,0.08) !important; }
.nav-tabs .nav-link { color: #6b8aad !important; border: none !important; padding: 8px 16px !important; font-size: 13px; font-weight: 600; }
.nav-tabs .nav-link:hover { color: #cfe2f3 !important; background: rgba(255,255,255,0.04) !important; border-radius: 6px 6px 0 0 !important; }
.nav-tabs .nav-link.active { color: var(--primary-light) !important; border-bottom: 2px solid var(--primary) !important; background: transparent !important; }

/* Chart legend */
.chart-legend { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 12px; }
.legend-item { display: flex; align-items: center; gap: 6px; font-size: 11px; color: #6b8aad; }
.legend-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
