/* ===== Horizon Resources GY — Global Styles ===== */
*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
  background: #f3f4f6;
  color: #111827;
}

a { color: #0d6e3b; text-decoration: none; }
a:hover { text-decoration: underline; }

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

/* ─── Sidebar ─────────────────────────────────────────── */
.sidebar {
  width: 240px;
  background: #0a2540;
  color: white;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 100;
  transition: transform 0.3s;
}

.sidebar-brand {
  padding: 24px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.sidebar-brand h1 {
  font-size: 16px;
  font-weight: 700;
  margin: 0;
  color: #fff;
  line-height: 1.3;
}
.sidebar-brand span {
  font-size: 12px;
  color: rgba(255,255,255,0.5);
}

.sidebar-nav { flex: 1; padding: 16px 0; overflow-y: auto; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 20px;
  font-size: 14px;
  color: rgba(255,255,255,0.7);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  border-radius: 0;
  text-decoration: none;
}
.nav-item:hover { background: rgba(255,255,255,0.07); color: #fff; text-decoration: none; }
.nav-item.active { background: rgba(13,110,59,0.3); color: #4ade80; border-right: 3px solid #4ade80; }
.nav-icon { font-size: 16px; width: 20px; text-align: center; }

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 12px;
  color: rgba(255,255,255,0.4);
}
.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.user-avatar {
  width: 30px;
  height: 30px;
  background: #0d6e3b;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: white;
}
.btn-logout {
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.6);
  border: none;
  padding: 7px 12px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  width: 100%;
  text-align: left;
  transition: background 0.15s;
}
.btn-logout:hover { background: rgba(220,38,38,0.3); color: #fca5a5; }

/* ─── Main Content ────────────────────────────────────── */
.main-content {
  margin-left: 240px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.topbar {
  background: white;
  padding: 16px 28px;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
}
.topbar h2 { margin: 0; font-size: 18px; font-weight: 600; color: #0a2540; }
.topbar-actions { display: flex; gap: 12px; align-items: center; }

.content-area { padding: 28px; flex: 1; }

/* ─── Stats Cards ─────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.stat-card {
  background: white;
  border-radius: 12px;
  padding: 20px 22px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  border-left: 4px solid #0d6e3b;
}
.stat-card.accent-blue  { border-left-color: #3b82f6; }
.stat-card.accent-amber { border-left-color: #f59e0b; }
.stat-card.accent-purple { border-left-color: #8b5cf6; }
.stat-value { font-size: 32px; font-weight: 800; color: #0a2540; line-height: 1; }
.stat-label { font-size: 12px; color: #6b7280; margin-top: 4px; text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; }
.stat-sub   { font-size: 11px; color: #9ca3af; margin-top: 6px; }

/* ─── Filters & Toolbar ───────────────────────────────── */
.toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.filter-btn {
  padding: 8px 16px;
  border-radius: 20px;
  border: 1.5px solid #d1d5db;
  background: white;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
  color: #374151;
  font-weight: 500;
}
.filter-btn:hover { border-color: #0d6e3b; color: #0d6e3b; }
.filter-btn.active { background: #0d6e3b; color: white; border-color: #0d6e3b; }
.search-box {
  padding: 8px 14px;
  border: 1.5px solid #d1d5db;
  border-radius: 20px;
  font-size: 13px;
  outline: none;
  min-width: 220px;
  transition: border-color 0.2s;
}
.search-box:focus { border-color: #0d6e3b; }

/* ─── RFP Cards Grid ──────────────────────────────────── */
.rfp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
}

.rfp-card {
  background: white;
  border-radius: 12px;
  padding: 20px 22px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  border: 1px solid #e5e7eb;
  transition: box-shadow 0.2s, transform 0.2s;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.rfp-card:hover { box-shadow: 0 6px 24px rgba(0,0,0,0.10); transform: translateY(-2px); }

.rfp-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.rfp-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 8px;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}
.badge-ministry   { background: #dbeafe; color: #1d4ed8; }
.badge-oil        { background: #fef3c7; color: #92400e; }
.badge-new        { background: #dcfce7; color: #166534; position: absolute; top: 14px; right: 14px; }

.rfp-title { font-size: 15px; font-weight: 700; color: #0a2540; line-height: 1.4; margin: 0; }
.rfp-source { font-size: 12px; color: #6b7280; font-weight: 500; }
.rfp-source a { color: #0d6e3b; }
.rfp-description { font-size: 13px; color: #4b5563; line-height: 1.6; }

.rfp-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 12px;
  color: #6b7280;
}
.rfp-meta span { display: flex; align-items: center; gap: 4px; }

.rfp-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  font-size: 11px;
  background: #f3f4f6;
  color: #374151;
  padding: 3px 8px;
  border-radius: 12px;
  font-weight: 500;
}

/* ─── Empty / Loading States ──────────────────────────── */
.empty-state {
  text-align: center;
  padding: 80px 20px;
  color: #6b7280;
}
.empty-icon { font-size: 48px; margin-bottom: 16px; }
.empty-state h3 { font-size: 18px; font-weight: 600; margin: 0 0 8px; color: #374151; }

.skeleton-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; }
.skeleton-card { background: white; border-radius: 12px; padding: 20px; box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
.skeleton-line { background: linear-gradient(90deg, #f3f4f6, #e5e7eb, #f3f4f6); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: 4px; margin-bottom: 10px; }
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }

/* ─── Buttons ─────────────────────────────────────────── */
.btn {
  padding: 9px 18px;
  border-radius: 8px;
  border: none;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn:hover { opacity: 0.9; }
.btn:active { transform: scale(0.98); }
.btn-green  { background: #0d6e3b; color: white; }
.btn-outline { background: white; color: #374151; border: 1.5px solid #d1d5db; }
.btn-sm { padding: 6px 12px; font-size: 12px; }

/* ─── Last Updated Banner ─────────────────────────────── */
.update-banner {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 13px;
  color: #166534;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ─── Responsive ──────────────────────────────────────── */
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .rfp-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
