/* ============================================================
   🧭 ADMIN.CSS
   Design System - Professional Dashboard (Sidebar + Reports)
   ============================================================ */

:root {
  --admin-bg: #F8F9FA;
  --sidebar-bg: #112D4E; /* Dark Blue from 60-30-10 */
  --sidebar-text: #94A3B8;
  --sidebar-hover: #1E3A8A;
  --accent-orange: #FF9900;
  --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --sidebar-width: 260px;
  --header-height: 70px;
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
  background-color: var(--admin-bg);
  font-family: 'Inter', sans-serif;
  color: #1E293B;
  margin: 0;
  padding: 0;
  display: flex; /* Sidebar + Main */
  min-height: 100vh;
}

/* --- 🧭 SIDEBAR --- */
.sidebar {
  width: var(--sidebar-width);
  background-color: var(--sidebar-bg);
  color: white;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transition: var(--transition-smooth);
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 100;
}

.sidebar-header {
  padding: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header .logo-text {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.sidebar-nav {
  padding: 1.5rem 0;
  flex: 1;
  overflow-y: auto;
}

.nav-group-title {
  padding: 0 1.5rem;
  margin-bottom: 0.75rem;
  font-size: 0.65rem;
  font-weight: 700;
  color: #64748B;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.5rem;
  color: var(--sidebar-text);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.938rem;
  transition: var(--transition-smooth);
}

.sidebar-nav a i {
  width: 20px;
  text-align: center;
}

.sidebar-nav a:hover, .sidebar-nav a.active {
  background-color: rgba(255, 255, 255, 0.05);
  color: white;
}

.sidebar-nav a.active {
  border-left: 4px solid var(--accent-orange);
  background-color: rgba(255, 153, 0, 0.05);
}

/* --- 🖥️ MAIN CONTENT --- */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

.top-header {
  height: var(--header-height);
  background: white;
  display: flex;
  align-items: center;
  padding: 0 2rem;
  justify-content: space-between;
  border-bottom: 1px solid #E2E8F0;
  position: sticky;
  top: 0;
  z-index: 90;
}

.container {
  padding: 2rem;
  max-width: 1400px;
  margin: 0;
}

/* --- 📊 DASHBOARD CARDS --- */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.kpi-card {
  background: white;
  padding: 1.5rem;
  border-radius: 16px;
  box-shadow: var(--card-shadow);
  display: flex;
  align-items: center;
  gap: 1.25rem;
  border: 1px solid transparent;
  transition: var(--transition-smooth);
}

.kpi-card:hover {
  transform: translateY(-2px);
  border-color: #E2E8F0;
}

.kpi-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.icon-blue { background: rgba(59, 130, 246, 0.1); color: #3B82F6; }
.icon-orange { background: rgba(255, 153, 0, 0.1); color: var(--accent-orange); }
.icon-green { background: rgba(16, 185, 129, 0.1); color: #10B981; }
.icon-purple { background: rgba(139, 92, 246, 0.1); color: #8B5CF6; }

.kpi-info h3 {
  margin: 0;
  font-size: 0.75rem;
  color: #64748B;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.kpi-info p {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 800;
  color: #1E293B;
}

/* --- 📈 CHARTS & ACTIVITY --- */
.dashboard-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.5rem;
}

.card {
  background: white;
  padding: 1.5rem;
  border-radius: 16px;
  box-shadow: var(--card-shadow);
  margin-bottom: 1.5rem;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.card-title {
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
  color: var(--sidebar-bg); /* Explicitly Dark Blue */
}

/* --- 🧡 ACCENT ELEMENTS (ORANGE) --- */
.btn-orange-full {
  background-color: var(--accent-orange);
  color: #112D4E;
  padding: 0.75rem 1.5rem;
  border-radius: 10px;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition-smooth);
}

.btn-orange-full:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 153, 0, 0.3);
}

.text-orange { color: var(--accent-orange); }

/* --- 📝 RECENT FEED --- */
.activity-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.activity-item {
  display: flex;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid #F1F5F9;
}

.activity-item:last-child { border: none; }

.activity-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--admin-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--sidebar-bg);
}

.activity-content p {
  margin: 0;
  font-size: 0.875rem;
  color: #1E293B; /* Ensure contrast */
}

.activity-content small {
  color: #64748B;
  font-size: 0.75rem;
}

/* --- 🛡️ BANNERS --- */
.admin-banner {
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  border: 1px solid transparent;
}

.banner-warning { background: #FFFBEB; color: #92400E; border-color: #FDE68A; }
.banner-error { background: #FEF2F2; color: #991B1B; border-color: #FECACA; }

/* 🔹 FIX: INFO CARD CONTRAST */
.info-card h3 {
  margin: 0 0 0.75rem 0;
  font-size: 0.75rem;
  color: #64748B; /* Darker slate for labels */
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.info-card p {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: #1E293B; /* Dark Blue for values */
}

/* --- Responsividade --- */
@media (max-width: 1024px) {
  .dashboard-grid { grid-template-columns: 1fr; }
  .sidebar { width: 80px; }
  .sidebar .nav-text, .sidebar .logo-text, .sidebar .nav-group-title { display: none; }
  .sidebar-nav a { justify-content: center; padding: 1rem; }
}

@media (max-width: 768px) {
  body { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; }
  .kpi-grid { grid-template-columns: 1fr; }
}