* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #2c3e50;
  --secondary: #3498db;
  --success: #27ae60;
  --danger: #e74c3c;
  --warning: #f39c12;
  --info: #3498db;
  --light: #ecf0f1;
  --dark: #2c3e50;
  --border: #bdc3c7;
  --text: #333;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f5f6fa;
  color: var(--text);
}

.admin-container {
  display: flex;
  height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 250px;
  background-color: var(--primary);
  color: white;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.sidebar-header {
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.sidebar-header h2 {
  font-size: 24px;
  font-weight: 600;
}

.sidebar-nav ul {
  list-style: none;
}

.sidebar-nav li {
  margin-bottom: 10px;
}

.nav-link {
  display: block;
  color: #ecf0f1;
  text-decoration: none;
  padding: 12px 15px;
  border-radius: 5px;
  transition: all 0.3s ease;
}

.nav-link:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.nav-link.active {
  background-color: var(--secondary);
  color: white;
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 12px;
  color: #bdc3c7;
}

/* Main Content */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.top-header {
  background-color: white;
  padding: 20px 30px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.top-header h1 {
  font-size: 28px;
  color: var(--dark);
}

.header-right {
  display: flex;
  gap: 20px;
  align-items: center;
}

.search-box {
  padding: 10px 15px;
  border: 1px solid var(--border);
  border-radius: 5px;
  width: 250px;
}

.user-profile {
  display: flex;
  gap: 10px;
  align-items: center;
}

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

.content-wrapper {
  flex: 1;
  overflow-y: auto;
  padding: 30px;
}

.content-section {
  display: none;
}

.content-section.active {
  display: block;
}

/* Statistics Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background-color: white;
  padding: 20px;
  border-radius: 8px;
  display: flex;
  gap: 15px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-5px);
}

.stat-icon {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
}

.stat-content h3 {
  font-size: 14px;
  color: #7f8c8d;
  margin-bottom: 5px;
}

.stat-number {
  font-size: 28px;
  font-weight: 600;
  color: var(--dark);
}

.stat-change {
  font-size: 12px;
  color: var(--success);
}

/* Cards */
.card {
  background-color: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
}

.card h3 {
  margin-bottom: 15px;
  font-size: 18px;
  color: var(--dark);
}

/* Tables */
.table {
  width: 100%;
  border-collapse: collapse;
}

.table thead {
  background-color: #f8f9fa;
}

.table th {
  padding: 12px;
  text-align: left;
  font-weight: 600;
  color: var(--dark);
  border-bottom: 2px solid var(--border);
}

.table td {
  padding: 12px;
  border-bottom: 1px solid var(--border);
}

.table tbody tr:hover {
  background-color: #f8f9fa;
}

/* Badges */
.badge {
  display: inline-block;
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
}

.badge-active {
  background-color: #d4edda;
  color: #155724;
}

.badge-pending {
  background-color: #fff3cd;
  color: #856404;
}

.badge-processing {
  background-color: #cce5ff;
  color: #004085;
}

.badge-shipped {
  background-color: #d1ecf1;
  color: #0c5460;
}

.badge-delivered {
  background-color: #d4edda;
  color: #155724;
}

.badge-new {
  background-color: #ff6b6b;
  color: white;
}

.badge-replied {
  background-color: #4ecdc4;
  color: white;
}

.badge-resolved {
  background-color: #51cf66;
  color: white;
}

.badge-low {
  background-color: #ffd93d;
  color: #333;
}

/* Buttons */
.btn {
  padding: 10px 15px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
}

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

.btn-primary:hover {
  background-color: #2980b9;
}

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

.btn-success:hover {
  background-color: #229954;
}

.btn-danger {
  background-color: var(--danger);
  color: white;
}

.btn-danger:hover {
  background-color: #c0392b;
}

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

.btn-warning:hover {
  background-color: #e67e22;
}

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

.btn-info:hover {
  background-color: #2980b9;
}

.btn-sm {
  padding: 5px 10px;
  font-size: 12px;
}

/* Section Header */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.section-header h2 {
  font-size: 24px;
  color: var(--dark);
}

/* Table Controls */
.table-controls {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}

.search-input {
  flex: 1;
  padding: 10px 15px;
  border: 1px solid var(--border);
  border-radius: 5px;
  font-size: 14px;
}

.filter-select {
  padding: 10px 15px;
  border: 1px solid var(--border);
  border-radius: 5px;
  font-size: 14px;
}

/* Dashboard Grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
}

.simple-list {
  list-style: none;
}

.simple-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

.simple-list li:last-child {
  border-bottom: none;
}

/* Modals */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.4);
}

.modal.show {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background-color: white;
  padding: 30px;
  border-radius: 8px;
  width: 90%;
  max-width: 500px;
  position: relative;
}

.close {
  position: absolute;
  right: 20px;
  top: 20px;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  color: #aaa;
}

.close:hover {
  color: var(--dark);
}

.modal-content h2 {
  margin-bottom: 20px;
  color: var(--dark);
}

/* Forms */
.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 600;
  color: var(--dark);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 5px;
  font-size: 14px;
  font-family: inherit;
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--secondary);
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* Responsive */
@media (max-width: 768px) {
  .admin-container {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    max-height: 100px;
    padding: 10px 20px;
    overflow-x: auto;
  }

  .sidebar-nav ul {
    display: flex;
    gap: 10px;
  }

  .sidebar-nav li {
    margin-bottom: 0;
  }

  .sidebar-footer {
    display: none;
  }

  .top-header {
    flex-direction: column;
    gap: 10px;
  }

  .header-right {
    width: 100%;
    flex-direction: column;
  }

  .search-box {
    width: 100%;
  }

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

  .stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }

  .section-header {
    flex-direction: column;
    gap: 10px;
  }

  .section-header .btn {
    width: 100%;
  }
}
