:root {
  --primary-color: #0891b2;    /* Refined teal */
  --secondary-color: #0e7490;  /* Darker teal for depth */
  --accent-color: #ef4444;     /* Vibrant red accent */
  --text-primary: #1e293b;     /* Deep slate for text */
  --text-secondary: #64748b;   /* Muted gray for secondary text */
  --bg-light: #f8fafc;         /* Very light gray for backgrounds */
  --card-bg: #ffffff;          /* White for cards */
  --sidebar-bg: #0f172a;       /* Dark slate for sidebar */
  --sidebar-active: #1e293b;   /* Slightly lighter for active items */
  --success-color: #10b981;    /* Green for success elements */
  --warning-color: #f59e0b;    /* Orange for warning elements */
  --info-color: #3b82f6;       /* Blue for info elements */
}

body {
  background-color: var(--bg-light);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  min-height: 100vh;
  display: flex;
  margin: 0;
  padding: 0;
}

/* Sidebar Styles */
.sidebar {
  width: 280px;
  background-color: var(--sidebar-bg);
  color: #fff;
  height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
  overflow-y: auto;
  transition: all 0.3s ease;
  z-index: 1000;
}

.sidebar-brand {
  padding: 1.5rem;
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-brand h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
}

.sidebar-brand .logo {
  font-size: 1.8rem;
  margin-right: 10px;
  color: var(--primary-color);
}

.sidebar-menu {
  padding: 1rem 0;
}

.sidebar-menu h5 {
  color: #94a3b8;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 0.5rem 1.5rem;
  margin-top: 1rem;
}

.menu-item {
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  color: #cbd5e1;
  text-decoration: none;
  transition: all 0.2s ease;
  border-left: 4px solid transparent;
}

.menu-item.active {
  background-color: var(--sidebar-active);
  color: #fff;
  border-left: 4px solid var(--primary-color);
}

.menu-item:hover {
  background-color: rgba(255, 255, 255, 0.05);
  color: #fff;
}

.menu-item i {
  margin-right: 0.75rem;
  font-size: 1.1rem;
  width: 20px;
  text-align: center;
}

/* Main Content */
.main-content {
  flex: 1;
  margin-left: 280px;
  padding: 2rem;
  transition: all 0.3s ease;
}

.toggle-sidebar {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 1001;
  background-color: var(--primary-color);
  color: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: none;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.page-header {
  margin-bottom: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.page-title {
  margin: 0;
  font-weight: 700;
  font-size: 1.75rem;
  color: var(--text-primary);
}

.header-actions {
  display: flex;
  gap: 1rem;
}

.search-bar {
  position: relative;
  margin-right: 1rem;
}

.search-bar input {
  padding: 0.5rem 1rem 0.5rem 2.5rem;
  border-radius: 20px;
  border: 1px solid #e2e8f0;
  width: 250px;
  font-size: 0.9rem;
}

.search-bar i {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
}

.user-profile img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

/* Dashboard Cards */
.dashboard-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.card {
  background: var(--card-bg);
  border: none;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

.card-body {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.card-stats {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}

.card-icon-wrapper {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 1rem;
}

.card-icon {
  font-size: 1.5rem;
  color: white;
}

.icon-primary { background-color: var(--primary-color); }
.icon-success { background-color: var(--success-color); }
.icon-warning { background-color: var(--warning-color); }
.icon-info { background-color: var(--info-color); }
.icon-secondary { background-color: var(--text-secondary); }
.icon-dark { background-color: var(--text-primary); }

.card-stats-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
  color: var(--text-primary);
}

.card-stats-content p {
  font-size: 0.9rem;
  margin: 0.25rem 0 0;
  color: var(--text-secondary);
}

.card-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.card-text {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.btn {
  padding: 0.65rem 1.5rem;
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-success {
  background-color: var(--success-color);
  border-color: var(--success-color);
}

.btn-warning {
  background-color: var(--warning-color);
  border-color: var(--warning-color);
}

.btn-info {
  background-color: var(--info-color);
  border-color: var(--info-color);
}

/* Stats Summary */
.stats-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 1rem;
}

.stat-icon i {
  font-size: 1.5rem;
  color: white;
}

.stat-details h4 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
}

.stat-details p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin: 0.25rem 0 0;
}

/* Quick Actions */
.quick-actions {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  margin-bottom: 2rem;
}

.quick-actions h3 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1.2rem;
  font-weight: 600;
}

.actions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.action-button {
  border: 1px solid #e2e8f0;
  background: linear-gradient(to bottom, #ffffff, #f8fafc);
  border-radius: 8px;
  padding: 1rem;
  text-align: center;
  transition: all 0.2s ease;
}

.action-button:hover {
  background: linear-gradient(to bottom, #f8fafc, #f1f5f9);
  border-color: #cbd5e1;
  transform: translateY(-2px);
}

.action-button i {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--primary-color);
}

.action-button p {
  margin: 0;
  font-weight: 500;
  font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 992px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.active {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0;
  }

  .toggle-sidebar {
    display: flex;
  }

  .stats-summary {
    grid-template-columns: repeat(2, 1fr);
  }

  .actions-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .header-actions {
    width: 100%;
    justify-content: space-between;
  }

  .search-bar {
    width: 100%;
    margin-right: 0;
  }

  .search-bar input {
    width: 100%;
  }

  .dashboard-cards {
    grid-template-columns: 1fr;
  }

  .stats-summary {
    grid-template-columns: 1fr;
  }

  .actions-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 576px) {
  .main-content {
    padding: 1.5rem 1rem;
  }
}

/* Footer */
footer {
  padding: 1.5rem 0;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.9rem;
  border-top: 1px solid #e2e8f0;
  margin-top: 2rem;
}

footer span {
  color: var(--primary-color);
  font-weight: 600;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  background-color: #f8f9fa;
}

.toggle-sidebar {
  display: none;
  position: fixed;
  top: 15px;
  left: 15px;
  background-color: #343a40;
  color: white;
  border: none;
  padding: 10px 15px;
  font-size: 20px;
  z-index: 1001;
  border-radius: 5px;
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 250px;
  height: 100vh;
  background-color: #343a40;
  color: white;
  padding: 20px;
  overflow-y: auto;
  z-index: 1000;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 30px;
}

.sidebar-brand .logo {
  font-size: 30px;
}

.sidebar-menu h5 {
  margin-top: 20px;
  color: #adb5bd;
}

.menu-item {
  display: flex;
  align-items: center;
  color: #ced4da;
  text-decoration: none;
  padding: 10px 0;
  transition: 0.3s;
}

.menu-item i {
  width: 25px;
}

.menu-item:hover,
.menu-item.active {
  color: #fff;
  background-color: #495057;
  padding-left: 10px;
  border-radius: 5px;
}

.container {
  margin-left: 270px;
}

/* Responsive styles */
@media (max-width: 768px) {
  .sidebar {
    left: -250px;
    transition: 0.3s ease-in-out;
  }

  .sidebar.active {
    left: 0;
  }

  .toggle-sidebar {
    display: block;
  }

  .container {
    margin-left: 0;
    padding: 20px;
  }
}