/* --- Color Palette & Fonts --- */
:root {
  --brand-orange: #F16623;
  --brand-blue: #2A4B8D;
  --text-dark: #343a40;
  --text-light: #6c757d;
  --background-grey: #f4f7fa;
  --container-white: #000000;
  --border-color: #e9ecef;
}

/* --- Basic Setup --- */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  margin: 0;
  background-color: var(--background-grey);
  color: var(--text-dark);
}

/* --- Main Layout --- */
.dashboard-layout {
  display: flex;
}

/* --- Blue Sidebar --- */
.sidebar-logo-container {
  padding: 0;
  margin: 0;
}

.sidebar-logo {
  width: 100%;
  display: block;
  margin: 0;
  padding: 0;
}

.sidebar {
  width: 240px;
  background-color: var(--brand-blue); /* Solid blue background */
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: fixed;
  padding-top: 0 !important;
  box-sizing: border-box;
  top: 0 !important;
}
.nav-menu {
  list-style: none;
  padding: 20px 0;
  margin: 0;
  flex-grow: 1;
}
.nav-section-header {
  color: rgba(255, 255, 255, 0.5);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 20px 25px 8px 25px;
  margin-top: 16px;
}
.nav-section-header:first-child {
  margin-top: 0;
}
.nav-item a {
  display: flex;
  align-items: center;
  padding: 12px 25px;
  color: rgba(255, 255, 255, 0.7); /* Lighter text for contrast */
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  transition: background-color 0.3s, color 0.3s;
  border-left: 4px solid transparent;
}
.nav-icon {
  margin-right: 15px;
  font-size: 20px;
}
.nav-item.active a, .nav-item a:hover {
  color: white; /* Active/hover color is bright white */
  background-color: rgba(0,0,0,0.2); /* Subtle dark highlight */
}
.nav-item.active a {
  border-left-color: var(--brand-orange); /* Orange indicator bar */
}
.sidebar-footer {
  padding: 10px 0 20px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: auto;
}
.sidebar-footer a {
  display: flex;
  align-items: center;
  padding: 12px 25px;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  transition: background-color 0.3s, color 0.3s;
}
.sidebar-footer a:hover {
  color: white;
  background-color: rgba(0,0,0,0.2);
}

/* --- Main Content Area --- */
.main-content {
  margin-left: 240px;
  width: calc(100% - 240px);
}

/* --- Orange Header --- */
.main-header {
  height: 80px;
  background-color: var(--brand-orange); /* Solid orange background */
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  position: fixed;
  width: calc(100% - 240px);
  top: 0;
  z-index: 10;
}
.header-logo {
  height: 60px; /* Larger logo for better visibility and balance */
}
.user-profile {
  width: auto;
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
  color: white; /* White text on orange background */
}
.user-profile .profile-text {
  max-width: 150px;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: baseline;
  margin-right: 4px;
  line-height: 1.2;
}
.user-profile .welcome-text {
  font-size: 12px;
  font-weight: 400;
  opacity: 0.9;
  margin-bottom: 2px;
  white-space: nowrap; /* Prevent text wrapping */
}
.user-profile .user-name {
.user-profile .api-status-indicators {
  width: 100%;
  
  margin-top: 4px;
}
  font-size: 16px;
  font-weight: 600;
  white-space: nowrap; /* Prevent text wrapping */
}
.profile-photo {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  flex-shrink: 0;
  border: 2px solid white;
  margin-right: 30px;
  flex-shrink: 0;
  flex-shrink: 0; /* Prevent image from shrinking */
}

.page-content {
  padding: 40px;
  margin-top: 80px;
}

/* --- Blog Feed --- */
.blog-feed h2 { 
  font-size: 24px; 
  margin-bottom: 20px; 
}
.feed-items { 
  display: grid; 
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); 
  gap: 20px; 
}
.feed-item { 
  background-color: var(--container-white); 
  border-radius: 8px; 
  overflow: hidden; 
  box-shadow: 0 2px 10px rgba(0,0,0,0.05); 
  cursor: pointer; 
  transition: transform 0.3s; 
}
.feed-item:hover { 
  transform: translateY(-5px); 
}
.feed-item img { 
  width: 100%; 
  height: 140px; 
  object-fit: cover; 
}
.item-title { 
  padding: 0; 
  font-weight: 600; 
}

/* --- Analytics Widgets --- */
.analytics-grid { 
  display: grid; 
  grid-template-columns: 1fr 1fr; 
  gap: 30px; 
  margin-top: 40px; 
}
.widget { 
  background-color: var(--container-white); 
  padding: 25px; 
  border-radius: 12px; 
  box-shadow: 0 4px 15px rgba(0,0,0,0.06); 
  margin-bottom: 30px; 
}
.widget-title { 
  font-size: 16px; 
  color: var(--text-light); 
  margin: 0 0 15px 0; 
}
.widget-main-value { 
  font-size: 38px; 
  font-weight: 700; 
}
.widget-main-value.orange { 
  color: var(--brand-orange); 
}
.widget-sub-value { 
  margin-top: 5px; 
  color: var(--text-light); 
}
.widget-sub-value.positive { 
  color: #28a745; 
}
.chart-placeholder { 
  height: 120px; 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  background-color: #f8f9fa; 
  border-radius: 8px; 
  color: var(--text-light); 
  font-style: italic; 
}

/* --- Responsive Design --- */
@media (max-width: 768px) {
.sidebar-logo-container {
  padding: 0;
  margin: 0;
}

.sidebar-logo {
  width: 100%;
  display: block;
  margin: 0;
  padding: 0;
}

  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
    padding-top: 0 !important;
  }
  .main-content {
    margin-left: 0;
    width: 100%;
  }
  .main-header {
    width: 100%;
    position: relative;
  }
  .page-content {
    margin-top: 0;
    padding: 20px;
  }
  .analytics-grid {
    grid-template-columns: 1fr;
  }
}

/* API Status Card */
.api-status-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    border-left: 4px solid var(--brand-orange);
}

.api-status-card .status-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--brand-orange), #FF8A50);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.api-status-card .status-content {
    flex: 1;
}

.api-status-card .status-content h3 {
    margin: 0 0 0.25rem 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
}

.api-status-card .status-content p {
    margin: 0;
    color: var(--text-light);
    font-size: 0.9rem;
}

.api-status-card .status-indicator {
    font-size: 1.2rem;
}

.api-status-card .status-indicator .fa-check-circle {
    color: #10B981 !important;
}

.api-status-card .status-indicator .fa-exclamation-circle {
    color: #EF4444 !important;
}

.api-status-card .status-indicator .fa-spinner {
    color: var(--brand-orange) !important;
}

/* Widgets Container - Two Column Layout */
.widgets-container {
  display: flex;
  gap: 20px;
  margin-top: 20px;
}

.widget-column {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.widget {
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 8px;
  padding: 20px;
}

.widget-title {
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 15px 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.widget-main-value {
  color: #fff;
  font-size: 32px;
  font-weight: 700;
  margin: 10px 0;
}

.widget-main-value.orange {
  color: #ff6b35;
}

.widget-sub-value {
  color: #888;
  font-size: 14px;
  margin-top: 5px;
}

.widget-sub-value.positive {
  color: #4caf50;
}

.chart-placeholder {
  background: #0a0a0a;
  border: 1px solid #333;
  border-radius: 4px;
  padding: 40px 20px;
  text-align: center;
  color: #666;
  font-size: 14px;
  margin-top: 10px;
}

/* Full Width Widgets */
.widget-full-width {
  width: 100%;
  margin-bottom: 20px;
}

/* Add spacing between sections */
.widgets-container {
  margin-bottom: 20px;
}
