/* ===================================================
   Investment Portal — Responsive Stylesheet v4
   Mobile-first design
   =================================================== */
:root {
  --primary:  #0f2544;
  --primary2: #1e3a5f;
  --accent:   #f59e0b;
  --green:    #10b981;
  --blue:     #3b82f6;
  --red:      #ef4444;
  --purple:   #8b5cf6;
  --bg:       #f0f4f8;
  --card:     #ffffff;
  --border:   #e2e8f0;
  --text:     #1a202c;
  --text2:    #64748b;
  --radius:   10px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'IBM Plex Sans', sans-serif; background: var(--bg); color: var(--text); font-size: 14px; overflow-x: hidden; }
img { max-width: 100%; height: auto; }

/* ══════════════════════════════════════
   HEADER + MOBILE NAV
══════════════════════════════════════ */
.header {
  background: var(--primary);
  position: sticky; top: 0; z-index: 2000;
  box-shadow: 0 2px 16px rgba(0,0,0,0.35);
}
.header-inner {
  max-width: 1600px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px; height: 56px;
}
.logo { display: flex; align-items: center; gap: 10px; min-width: 0; }
.logo-icon {
  width: 34px; height: 34px; background: var(--accent);
  border-radius: 8px; display: flex; align-items: center;
  justify-content: center; font-size: 18px; flex-shrink: 0;
}
.logo-text { display: flex; flex-direction: column; min-width: 0; }
.logo-main { font-size: 14px; font-weight: 700; color: white; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.logo-sub  { font-size: 10px; color: rgba(255,255,255,0.5); display: none; }

/* Desktop nav */
.nav { display: none; gap: 2px; align-items: center; }
.nav-link {
  color: rgba(255,255,255,0.8); text-decoration: none;
  padding: 6px 12px; border-radius: 6px; font-size: 13px;
  font-weight: 500; transition: all 0.18s; white-space: nowrap;
}
.nav-link:hover, .nav-link.active { background: rgba(255,255,255,0.12); color: white; }
.admin-btn { background: var(--accent) !important; color: var(--primary) !important; font-weight: 700; }

/* Hamburger */
.hamburger {
  background: none; border: none; cursor: pointer;
  display: flex; flex-direction: column; gap: 5px;
  padding: 6px; border-radius: 6px; transition: background 0.15s;
}
.hamburger:hover { background: rgba(255,255,255,0.1); }
.hamburger span {
  display: block; width: 22px; height: 2px;
  background: white; border-radius: 2px; transition: all 0.25s;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile drawer */
.mobile-nav {
  display: none; position: fixed; top: 56px; left: 0; right: 0; bottom: 0;
  background: var(--primary); z-index: 1999; overflow-y: auto;
  flex-direction: column; padding: 20px 16px;
  animation: slideDown 0.2s ease;
}
.mobile-nav.open { display: flex; }
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.mobile-nav a {
  color: rgba(255,255,255,0.85); text-decoration: none;
  padding: 14px 16px; border-radius: 8px; font-size: 15px;
  font-weight: 500; border-bottom: 1px solid rgba(255,255,255,0.07);
  display: flex; align-items: center; gap: 10px;
}
.mobile-nav a:hover, .mobile-nav a.active { background: rgba(255,255,255,0.1); color: white; }
.mobile-nav .mob-admin {
  margin-top: 12px; background: var(--accent);
  color: var(--primary) !important; font-weight: 700;
  border-radius: 8px; border: none !important;
  justify-content: center;
}

/* Show desktop nav on larger screens */
@media (min-width: 768px) {
  .logo-sub  { display: block; }
  .logo-main { font-size: 15px; }
  .nav { display: flex; }
  .hamburger { display: none; }
  .mobile-nav { display: none !important; }
}

/* ══════════════════════════════════════
   STATS BAR
══════════════════════════════════════ */
.stats-bar {
  background: white; border-bottom: 1px solid var(--border);
  display: flex; align-items: stretch; flex-wrap: wrap;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
}
.sb-item {
  text-align: center; padding: 12px 16px;
  border-right: 1px solid var(--border);
  flex: 1; min-width: 100px;
}
.sb-item:last-child { border-right: none; }
.sb-num  { display: block; font-size: 22px; font-weight: 700; line-height: 1; }
.sb-lbl  { display: block; font-size: 11px; color: var(--text2); margin-top: 2px; }

@media (min-width: 600px) {
  .sb-num { font-size: 28px; }
  .sb-item { padding: 16px 24px; }
}

/* ══════════════════════════════════════
   MAP STRIP (index.php)
══════════════════════════════════════ */
.map-strip { position: relative; }
.map-strip-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 16px; background: white; border-bottom: 1px solid var(--border);
}
.map-strip-header h2 { font-size: 14px; font-weight: 700; color: var(--primary); }
.view-all-link { font-size: 13px; font-weight: 600; color: var(--accent); text-decoration: none; white-space: nowrap; }
#mainMap { width: 100%; height: 240px; }
@media (min-width: 600px) { #mainMap { height: 300px; } }
@media (min-width: 960px) { #mainMap { height: 340px; } }

/* Map legend */
.map-legend {
  position: absolute; bottom: 10px; left: 10px; z-index: 900;
  background: white; border-radius: 8px; padding: 6px 10px;
  display: flex; gap: 8px; align-items: center; font-size: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12); flex-wrap: wrap; max-width: calc(100% - 20px);
}
.leg-dot {
  width: 10px; height: 10px; border-radius: 50%;
  border: 2px solid white; box-shadow: 0 1px 3px rgba(0,0,0,0.3);
  display: inline-block; margin-right: 2px; vertical-align: middle;
}

/* ══════════════════════════════════════
   BOTTOM: FILTER + GRID (index.php)
══════════════════════════════════════ */
.bottom-section {
  padding: 16px;
}
/* Mobile: stacked */
.filter-sidebar {
  background: white; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px; margin-bottom: 16px;
}
.fs-title {
  font-size: 13px; font-weight: 700; color: var(--primary);
  margin-bottom: 0; display: flex; align-items: center; gap: 6px;
  cursor: pointer;
}
.fs-title .fs-arrow { margin-left: auto; transition: transform 0.2s; font-size: 12px; }
.fs-title.open .fs-arrow { transform: rotate(180deg); }
.fs-body { display: none; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.fs-body.open { display: block; }
.fs-group { margin-bottom: 11px; }
.fs-group label {
  display: block; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.4px;
  color: var(--text2); margin-bottom: 4px;
}
.fs-group input, .fs-group select {
  width: 100%; padding: 9px 10px;
  border: 1px solid var(--border); border-radius: 6px;
  font-size: 14px; font-family: inherit; background: white;
  color: var(--text); outline: none; -webkit-appearance: none;
  transition: border-color 0.15s;
}
.fs-group input:focus, .fs-group select:focus { border-color: var(--accent); }
.fs-btn {
  width: 100%; padding: 11px; background: var(--accent);
  color: var(--primary); border: none; border-radius: 6px;
  font-size: 14px; font-weight: 700; cursor: pointer; font-family: inherit;
}
.fs-reset {
  display: block; text-align: center; margin-top: 8px;
  font-size: 13px; color: var(--text2); text-decoration: none;
  padding: 6px;
}

/* Desktop: sidebar layout */
@media (min-width: 900px) {
  .bottom-section {
    max-width: 1500px; margin: 0 auto;
    display: grid; grid-template-columns: 220px 1fr;
    gap: 0; padding: 20px 24px 60px;
  }
  .filter-sidebar {
    margin-right: 20px; margin-bottom: 0;
    height: fit-content; position: sticky; top: 74px;
  }
  .fs-title { cursor: default; }
  .fs-title .fs-arrow { display: none; }
  .fs-body { display: block !important; }
}

/* ══════════════════════════════════════
   PROJECT CARDS GRID
══════════════════════════════════════ */
.projects-area { min-width: 0; }
.proj-count { font-size: 12px; color: var(--text2); margin-bottom: 10px; }
.proj-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
@media (min-width: 480px)  { .proj-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; } }
@media (min-width: 700px)  { .proj-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1100px) { .proj-grid { grid-template-columns: repeat(4, 1fr); gap: 14px; } }

.proj-card {
  background: white; border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  text-decoration: none; color: inherit;
  transition: box-shadow 0.18s, transform 0.18s; display: block;
}
.proj-card:hover { box-shadow: 0 6px 20px rgba(0,0,0,0.1); transform: translateY(-2px); }
.pc-img {
  height: 110px; background-size: cover; background-position: center;
  background-color: #e8eef4; position: relative;
  display: flex; align-items: center; justify-content: center;
}
.pc-status {
  position: absolute; top: 7px; right: 7px;
  font-size: 9px; font-weight: 700; color: white;
  padding: 2px 7px; border-radius: 10px;
}
.pc-body { padding: 10px 11px; }
.pc-sector { font-size: 9px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: 0.4px; margin-bottom: 3px; }
.pc-title  { font-size: 12px; font-weight: 600; color: var(--text); line-height: 1.3; margin-bottom: 6px; }
.pc-meta   { display: flex; gap: 5px; font-size: 10px; color: var(--text2); margin-bottom: 6px; flex-wrap: wrap; }
.pc-funding { font-size: 10px; color: var(--purple); margin-bottom: 6px; font-weight: 500; }
.pc-prog   { display: flex; align-items: center; gap: 5px; }
.pc-track  { flex: 1; height: 5px; background: #e8eef4; border-radius: 3px; overflow: hidden; }
.pc-fill   { height: 100%; border-radius: 3px; }
.pc-pct    { font-size: 10px; font-weight: 700; color: var(--text2); }
.no-results { grid-column: 1/-1; text-align: center; padding: 40px; color: var(--text2); }

/* ══════════════════════════════════════
   SPLIT LAYOUT (map left, list right)
   — only on desktop
══════════════════════════════════════ */
.split-wrap {
  display: flex; flex-direction: column;
}
.map-panel { position: relative; height: 300px; }
#mainMapSplit { width: 100%; height: 100%; }

.map-filter-bar {
  position: absolute; top: 8px; left: 8px; right: 8px;
  z-index: 900; display: flex; gap: 4px; flex-wrap: wrap;
}
.mfb-select, .mfb-input {
  padding: 7px 9px; border: none; border-radius: 6px;
  font-size: 12px; font-family: inherit; background: white;
  color: var(--text); outline: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15); cursor: pointer;
}
.mfb-select { min-width: 100px; }
.mfb-input  { width: 120px; }
.mfb-btn {
  padding: 7px 12px; background: var(--accent); color: var(--primary);
  border: none; border-radius: 6px; font-size: 12px; font-weight: 700;
  cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.mfb-reset {
  padding: 7px 9px; background: white; color: var(--red);
  border: none; border-radius: 6px; font-size: 12px; font-weight: 700;
  cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,0.15); text-decoration: none;
}
.map-legend-bar {
  position: absolute; bottom: 8px; left: 8px; z-index: 900;
  background: white; border-radius: 8px; padding: 6px 10px;
  display: flex; gap: 8px; align-items: center; font-size: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12); flex-wrap: wrap;
}

.list-panel { background: #f0f4f8; display: flex; flex-direction: column; }
.list-head  { padding: 10px 14px; background: white; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.list-head h2   { font-size: 13px; font-weight: 700; color: var(--primary); }
.list-head span { font-size: 11px; color: var(--text2); }
.project-list   { padding: 8px; }

/* Desktop split */
@media (min-width: 900px) {
  .split-wrap {
    flex-direction: row;
    height: calc(100vh - 56px - 90px);
    min-height: 500px;
  }
  .map-panel { flex: 1; height: auto; }
  #mainMapSplit { height: 100%; }
  .list-panel { width: 380px; flex-shrink: 0; border-left: 1px solid #d8e2ee; overflow: hidden; }
  .project-list { overflow-y: auto; flex: 1; }
}

/* ── Compact list cards ── */
.plc {
  background: white; border: 1px solid var(--border); border-radius: 8px;
  margin-bottom: 7px; text-decoration: none; color: inherit; display: block;
  transition: box-shadow 0.15s, border-color 0.15s; cursor: pointer; overflow: hidden;
}
.plc:hover  { box-shadow: 0 4px 14px rgba(0,0,0,0.09); border-color: #c5d3e0; }
.plc.active { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(245,158,11,0.2); }
.plc-img    { height: 80px; background-size: cover; background-position: center; background-color: #e8eef4; position: relative; }
.plc-img-inner { display: flex; align-items: center; justify-content: center; height: 100%; }
.plc-status { position: absolute; top: 7px; right: 7px; font-size: 9px; font-weight: 700; color: white; padding: 2px 6px; border-radius: 10px; }
.plc-body   { padding: 9px 11px; }
.plc-sector { font-size: 9px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: 0.4px; margin-bottom: 2px; }
.plc-title  { font-size: 12px; font-weight: 600; color: var(--text); line-height: 1.3; margin-bottom: 5px; }
.plc-meta   { display: flex; gap: 6px; font-size: 10px; color: var(--text2); margin-bottom: 5px; flex-wrap: wrap; }
.plc-prog   { display: flex; align-items: center; gap: 5px; }
.plc-track  { flex: 1; height: 4px; background: #e8eef4; border-radius: 2px; overflow: hidden; }
.plc-fill   { height: 100%; border-radius: 2px; }
.plc-pct    { font-size: 10px; font-weight: 700; color: var(--text2); width: 26px; text-align: right; }

/* ══════════════════════════════════════
   MAP.PHP — full map page
══════════════════════════════════════ */
.map-page-wrap {
  display: flex; flex-direction: column;
  height: calc(100vh - 56px);
}
.map-sidebar {
  width: 100%; max-height: 45vh;
  background: white; border-bottom: 1px solid var(--border);
  display: flex; flex-direction: column; overflow: hidden;
}
.map-sidebar-head { padding: 10px 14px; background: var(--primary); color: white; font-size: 13px; font-weight: 700; flex-shrink: 0; }
.map-sidebar-count { padding: 6px 14px; background: #f8fafc; border-bottom: 1px solid var(--border); font-size: 12px; color: var(--text2); flex-shrink: 0; }
.map-sidebar-filters { padding: 10px 12px; border-bottom: 1px solid var(--border); background: #f8fafc; flex-shrink: 0; display: flex; gap: 6px; flex-wrap: wrap; }
.map-sidebar-filters select,
.map-sidebar-filters input {
  flex: 1; min-width: 100px; padding: 7px 8px;
  border: 1px solid var(--border); border-radius: 6px;
  font-size: 12px; font-family: inherit; background: white;
  color: var(--text); outline: none;
}
.map-sidebar-filters button {
  padding: 7px 14px; background: var(--accent); color: var(--primary);
  border: none; border-radius: 6px; font-size: 12px; font-weight: 700; cursor: pointer;
}
.map-proj-list { overflow-y: auto; flex: 1; }
.mpl-item { padding: 9px 13px; border-bottom: 1px solid #f1f5f9; cursor: pointer; transition: background 0.15s; display: block; color: inherit; text-decoration: none; }
.mpl-item:hover, .mpl-item.active { background: #fff8eb; }
.mpl-title { font-size: 12px; font-weight: 600; margin-bottom: 3px; line-height: 1.3; }
.mpl-meta  { font-size: 11px; color: var(--text2); }
.mpl-prog  { display: flex; align-items: center; gap: 5px; margin-top: 4px; }
.mpl-prog-track { flex: 1; height: 4px; background: #e2e8f0; border-radius: 2px; overflow: hidden; }
.mpl-prog-fill  { height: 100%; border-radius: 2px; }

.map-main-area { flex: 1; position: relative; min-height: 300px; }
#fullMap { width: 100%; height: 100%; }

@media (min-width: 768px) {
  .map-page-wrap { flex-direction: row; }
  .map-sidebar {
    width: 280px; max-height: none;
    border-bottom: none; border-right: 1px solid var(--border);
  }
  .map-sidebar-filters { flex-direction: column; }
  .map-sidebar-filters select,
  .map-sidebar-filters input { width: 100%; }
}

/* ══════════════════════════════════════
   PROJECT DETAIL PAGE
══════════════════════════════════════ */
.detail-wrap { max-width: 1100px; margin: 0 auto; padding: 16px 14px 50px; }
.detail-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 860px) {
  .detail-wrap { padding: 24px 22px 60px; }
  .detail-grid { grid-template-columns: 1fr 340px; }
}
.dcard { background: white; border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin-bottom: 14px; }
.dcard h2 { font-size: 11px; font-weight: 700; color: var(--text2); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 2px solid var(--accent); }
.drow  { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid #f1f5f9; flex-wrap: wrap; }
.drow:last-child { border: none; }
.dkey  { font-weight: 600; color: var(--text2); font-size: 12px; width: 140px; flex-shrink: 0; }
.dval  { color: var(--text); font-size: 13px; flex: 1; min-width: 120px; }
.big-prog { height: 20px; background: #f1f5f9; border-radius: 10px; overflow: hidden; margin: 8px 0; }
.big-prog-fill { height: 100%; border-radius: 10px; display: flex; align-items: center; justify-content: center; color: white; font-size: 11px; font-weight: 700; }
.ph-item { padding: 10px 12px; background: #f8fafc; border-radius: 8px; margin-bottom: 7px; border-left: 3px solid var(--accent); }
#detailMap { height: 220px; border-radius: 8px; }
@media (min-width: 600px) { #detailMap { height: 260px; } }

/* ══════════════════════════════════════
   DASHBOARD PAGE
══════════════════════════════════════ */
.dash-page { max-width: 1400px; margin: 0 auto; padding: 16px 14px 50px; }
@media (min-width: 600px) { .dash-page { padding: 20px 20px 60px; } }

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px; margin-bottom: 18px;
}
@media (min-width: 480px) { .kpi-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px) { .kpi-grid { grid-template-columns: repeat(6, 1fr); gap: 14px; margin-bottom: 24px; } }

.kpi-card {
  background: white; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 12px;
  text-align: center; position: relative; overflow: hidden;
}
.kpi-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
}
.kpi-c1::before{background:var(--primary2)}.kpi-c2::before{background:var(--accent)}
.kpi-c3::before{background:var(--green)}.kpi-c4::before{background:var(--blue)}
.kpi-c5::before{background:var(--red)}.kpi-c6::before{background:var(--purple)}
.kpi-icon { font-size: 20px; margin-bottom: 5px; display: block; }
.kpi-num  { font-size: 22px; font-weight: 700; display: block; line-height: 1; }
.kpi-lbl  { font-size: 10px; color: var(--text2); margin-top: 3px; display: block; text-transform: uppercase; letter-spacing: 0.3px; }
@media (min-width: 600px) { .kpi-num { font-size: 28px; } .kpi-icon { font-size: 24px; } }

/* Chart grid — mobile: single col, desktop: multi */
.chart-row { display: grid; gap: 14px; margin-bottom: 14px; }
.chart-row-2  { grid-template-columns: 1fr; }
.chart-row-3  { grid-template-columns: 1fr; }
.chart-row-21 { grid-template-columns: 1fr; }
.chart-row-12 { grid-template-columns: 1fr; }
@media (min-width: 640px)  {
  .chart-row-2  { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 900px)  {
  .chart-row-3  { grid-template-columns: 1fr 1fr 1fr; }
  .chart-row-21 { grid-template-columns: 2fr 1fr; }
  .chart-row-12 { grid-template-columns: 1fr 2fr; }
  .chart-row { gap: 18px; margin-bottom: 18px; }
}

.chart-card { background: white; border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.chart-card h3 { font-size: 12px; font-weight: 700; color: var(--primary); margin-bottom: 14px; padding-bottom: 8px; border-bottom: 2px solid var(--accent); display: flex; align-items: center; gap: 5px; }
@media (min-width: 600px) { .chart-card { padding: 20px; } .chart-card h3 { font-size: 13px; } }

.chart-canvas-wrap { position: relative; height: 200px; }
.chart-canvas-wrap.tall  { height: 260px; }
.chart-canvas-wrap.short { height: 160px; }
@media (min-width: 600px) {
  .chart-canvas-wrap { height: 240px; }
  .chart-canvas-wrap.tall  { height: 300px; }
  .chart-canvas-wrap.short { height: 180px; }
}

/* Deadline boxes */
.deadline-summary { display: flex; gap: 10px; margin-bottom: 12px; }
.dl-box { flex: 1; padding: 12px 8px; border-radius: 8px; text-align: center; }
.dl-box .n { font-size: 22px; font-weight: 700; }
.dl-box .l { font-size: 10px; margin-top: 2px; text-transform: uppercase; letter-spacing: 0.3px; }

/* Contractors table — scrollable on mobile */
.contractors-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.contractors-table { width: 100%; border-collapse: collapse; font-size: 12px; min-width: 400px; }
.contractors-table th { padding: 7px 10px; text-align: left; background: #f8fafc; border-bottom: 2px solid var(--border); font-weight: 700; color: var(--text2); font-size: 11px; text-transform: uppercase; }
.contractors-table td { padding: 7px 10px; border-bottom: 1px solid #f1f5f9; }
.ct-bar-wrap { display: flex; align-items: center; gap: 5px; }
.ct-bar-track { flex: 1; height: 6px; background: #e8eef4; border-radius: 3px; overflow: hidden; min-width: 40px; }
.ct-bar-fill  { height: 100%; border-radius: 3px; background: var(--primary2); }

/* ══════════════════════════════════════
   NEWS PAGE
══════════════════════════════════════ */
.news-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 500px) { .news-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .news-grid { grid-template-columns: repeat(3, 1fr); gap: 18px; } }
.news-card { background: white; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: inherit; transition: box-shadow 0.15s; display: block; }
.news-card:hover { box-shadow: 0 6px 20px rgba(0,0,0,0.1); }
.news-img  { height: 160px; background-size: cover; background-position: center; background-color: var(--bg); }
.news-body { padding: 12px; }
.news-title { font-size: 13px; font-weight: 600; margin-bottom: 5px; line-height: 1.4; }
.news-date  { font-size: 11px; color: var(--text2); }

/* ══════════════════════════════════════
   FOOTER
══════════════════════════════════════ */
.footer { background: var(--primary); color: rgba(255,255,255,0.5); text-align: center; padding: 16px; font-size: 12px; }

/* ══════════════════════════════════════
   ADMIN PANEL
══════════════════════════════════════ */
.admin-layout { display: flex; min-height: 100vh; flex-direction: column; }
@media (min-width: 768px) { .admin-layout { flex-direction: row; } }

.admin-sidebar {
  width: 100%; background: var(--primary); color: white;
  flex-shrink: 0;
}
@media (min-width: 768px) { .admin-sidebar { width: 220px; } }

.admin-sidebar-logo { padding: 14px 16px; border-bottom: 1px solid rgba(255,255,255,0.1); font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: space-between; }

/* Mobile admin nav toggle */
.admin-nav-toggle {
  background: none; border: none; color: white; cursor: pointer;
  font-size: 18px; display: block;
}
@media (min-width: 768px) { .admin-nav-toggle { display: none; } }

.admin-nav { display: none; }
.admin-nav.open { display: block; }
@media (min-width: 768px) { .admin-nav { display: block; } }

.admin-nav a {
  display: flex; align-items: center; gap: 8px;
  padding: 11px 18px; color: rgba(255,255,255,0.65);
  text-decoration: none; font-size: 13px; transition: all 0.15s;
}
.admin-nav a:hover, .admin-nav a.active { background: rgba(255,255,255,0.1); color: white; }
.admin-nav .nav-section { padding: 8px 18px 3px; font-size: 10px; color: rgba(255,255,255,0.25); text-transform: uppercase; letter-spacing: 1px; }

.admin-main { flex: 1; background: var(--bg); padding: 16px; overflow: auto; }
@media (min-width: 600px) { .admin-main { padding: 26px; } }

.admin-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; flex-wrap: wrap; gap: 10px; }
.admin-topbar h1 { font-size: 17px; font-weight: 700; color: var(--primary); }

/* Stat boxes */
.dash-stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 18px; }
@media (min-width: 480px) { .dash-stat-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px) { .dash-stat-grid { grid-template-columns: repeat(6, 1fr); gap: 14px; } }

.dstat { background: white; border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 10px; text-align: center; }
.dstat .num { font-size: 24px; font-weight: 700; display: block; }
.dstat .lbl { font-size: 10px; color: var(--text2); margin-top: 3px; display: block; text-transform: uppercase; letter-spacing: 0.3px; }
.dstat.total{border-top:3px solid var(--primary)}.dstat.ongoing{border-top:3px solid #f59e0b}
.dstat.done{border-top:3px solid #10b981}.dstat.newp{border-top:3px solid #3b82f6}
.dstat.susp{border-top:3px solid #ef4444}.dstat.budget{border-top:3px solid #7c3aed}

/* Analysis grid */
.analysis-grid { display: grid; grid-template-columns: 1fr; gap: 14px; margin-bottom: 18px; }
@media (min-width: 700px) { .analysis-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1100px) { .analysis-grid { grid-template-columns: 1fr 1fr 1fr; } }
.acard { background: white; border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.acard h3 { font-size: 12px; font-weight: 700; color: var(--primary); margin-bottom: 12px; padding-bottom: 7px; border-bottom: 2px solid var(--accent); }
.bar-item { margin-bottom: 9px; }
.bar-label { display: flex; justify-content: space-between; font-size: 11px; margin-bottom: 3px; }
.bar-track { height: 7px; background: #f1f5f9; border-radius: 4px; overflow: hidden; }
.bar-fill  { height: 100%; border-radius: 4px; }

.btn { display: inline-block; padding: 8px 16px; border-radius: 6px; font-size: 13px; font-weight: 600; cursor: pointer; text-decoration: none; border: none; transition: all 0.15s; font-family: inherit; }
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: #0c1e38; }
.btn-accent  { background: var(--accent); color: var(--primary); }
.btn-accent:hover  { background: #d97706; }
.btn-danger  { background: var(--red); color: white; }
.btn-sm { padding: 5px 10px; font-size: 11px; }

.admin-card { background: white; border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin-bottom: 16px; }

/* Admin tables — scrollable on mobile */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 12px; min-width: 500px; }
.admin-table th { padding: 8px 10px; text-align: left; background: #f8fafc; border-bottom: 2px solid var(--border); font-weight: 700; color: var(--text2); font-size: 11px; text-transform: uppercase; letter-spacing: 0.3px; }
.admin-table td { padding: 8px 10px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
.admin-table tr:hover td { background: #fafbfc; }

.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; color: var(--text2); margin-bottom: 5px; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 10px 11px; border: 1px solid var(--border); border-radius: 6px;
  font-size: 14px; background: white; color: var(--text); outline: none;
  -webkit-appearance: none; transition: border-color 0.15s, box-shadow 0.15s; font-family: inherit;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px rgba(245,158,11,0.1);
}
.form-grid { display: grid; grid-template-columns: 1fr; gap: 0; }
.form-grid.three { grid-template-columns: 1fr; }
@media (min-width: 600px) {
  .form-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
  .form-grid.three { grid-template-columns: 1fr 1fr 1fr; }
}

.alert { padding: 11px 14px; border-radius: 6px; margin-bottom: 14px; font-size: 13px; }
.alert-success { background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
.alert-error   { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }

.stat-box { background: white; border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; text-align: center; }
.stat-box .num { font-size: 28px; font-weight: 700; }
.stat-box .lbl { font-size: 12px; color: var(--text2); margin-top: 3px; }

.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--primary); padding: 16px; }
.login-box { background: white; border-radius: 12px; padding: 28px 24px; width: 100%; max-width: 360px; }
.login-box h1 { text-align: center; font-size: 17px; color: var(--primary); margin-bottom: 6px; }
.login-box p  { text-align: center; color: var(--text2); font-size: 12px; margin-bottom: 20px; }

/* ══════════════════════════════════════
   UTILITY
══════════════════════════════════════ */
.page-wrap { max-width: 1100px; margin: 0 auto; padding: 16px 14px 50px; }
@media (min-width: 600px) { .page-wrap { padding: 24px 22px 60px; } }
