/* Admin Panel Styles - Optimized for 1920x1080 */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700&display=swap');

/* Theme Variables */
:root {
  --color-primary: #050704;
  --color-primary-light: #684bff;
  --color-primary-dark: #050704;
  --color-gold: #684bff;
  --color-gold-light: #acfef8;
  --color-gold-dark: #684bff;
  --color-bg-dark: #ebfafd;
  --color-bg-dark-light: #f8f9fa;
  --color-bg-dark-dark: #e9ecef;
  --color-surface-light: #ebfafd;
  --color-surface-light-light: #ebfafd;
  --color-surface-light-dark: #f8f9fa;
  --color-text-dark: #050704;
  --color-text-dark-light: #684bff;
  --color-text-dark-dark: #050704;
  --color-text-light: #ffffff;
  --color-text-light-light: #acfef8;
  --color-text-light-dark: #6c757d;
  --color-muted: #acfef8;
  --color-muted-light: #ebfafd;
  --color-muted-dark: #684bff;
  --color-success: #28a745;
  --color-error: #dc3545;
  --color-warning: #ffc107;
  --color-info: #17a2b8;
  
  /* Admin specific colors */
  --sidebar-bg: #1a1a2e;
  --sidebar-hover: #16213e;
  --sidebar-active: #0f3460;
  --card-bg: rgba(255, 255, 255, 0.95);
  --border-color: rgba(104, 75, 255, 0.1);
  --shadow: 0 8px 32px rgba(104, 75, 255, 0.15);
  
  /* 1920x1080 optimized spacing */
  --sidebar-width: 280px;
  --content-padding: 2rem;
  --card-padding: 1.5rem;
  --grid-gap: 1.5rem;
}

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

body {
  font-family: 'Inter', 'Cairo', sans-serif;
  font-weight: 400;
  background: linear-gradient(135deg, rgba(104, 75, 255, 0.05) 0%, rgba(172, 254, 248, 0.03) 50%, rgba(104, 75, 255, 0.05) 100%);
  color: var(--color-text-dark);
  line-height: 1.6;
  overflow-x: hidden;
  font-size: 16px; /* Base font size for rem calculations */
}

/* Admin Container */
.admin-container {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  color: white;
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  z-index: 1000;
  transition: transform 0.3s ease;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.sidebar-header {
  padding: 2rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

.sidebar-header .logo {
  height: 40px;
  width: auto;
  margin-bottom: 1rem;
}

.sidebar-header h2 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--color-gold-light);
}

.sidebar-nav {
  flex: 1;
  padding: 1rem 0;
}

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

.nav-item {
  margin-bottom: 0.5rem;
}

.nav-link {
  display: flex;
  align-items: center;
  padding: 1rem 1.5rem;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
  border-radius: 0 25px 25px 0;
  margin-right: 1rem;
}

.nav-link:hover,
.nav-link.active {
  background: var(--sidebar-hover);
  color: white;
  transform: translateX(-5px);
}

.nav-link.active {
  background: var(--sidebar-active);
  color: var(--color-gold-light);
}

.nav-icon {
  font-size: 1.2rem;
  margin-left: 1rem;
  width: 24px;
  text-align: center;
}

.nav-text {
  font-weight: 500;
}

.badge {
  background: var(--color-gold);
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-right: auto;
}

.sidebar-footer {
  padding: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.logout-btn {
  width: 100%;
  background: rgba(220, 53, 69, 0.2);
  color: #ff6b6b;
  border: 1px solid rgba(220, 53, 69, 0.3);
  padding: 0.75rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
  font-family: inherit;
  font-size: 0.9rem;
}

.logout-btn:hover {
  background: rgba(220, 53, 69, 0.3);
  border-color: rgba(220, 53, 69, 0.5);
}

.logout-icon {
  font-size: 1.1rem;
}

/* Main Content */
.main-content {
  flex: 1;
  margin-right: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.top-header {
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.sidebar-toggle {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--color-text-dark);
  padding: 0.5rem;
  border-radius: 8px;
  transition: background-color 0.3s ease;
  display: none;
}

.sidebar-toggle:hover {
  background: rgba(104, 75, 255, 0.1);
}

#page-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-primary);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.admin-info {
  text-align: left;
  display: flex;
  flex-direction: column;
}

.admin-name {
  font-weight: 600;
  color: var(--color-primary);
  font-size: 1rem;
}

.admin-role {
  font-size: 0.85rem;
  color: var(--color-text-dark-light);
}

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

.home-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.3s ease;
}

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

.notifications {
  position: relative;
}

.notification-btn {
  background: none;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  color: var(--color-text-dark);
  padding: 0.5rem;
  border-radius: 50%;
  transition: background-color 0.3s ease;
  position: relative;
}

.notification-btn:hover {
  background: rgba(104, 75, 255, 0.1);
}

.notification-count {
  position: absolute;
  top: -5px;
  right: -5px;
  background: var(--color-error);
  color: white;
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 10px;
  font-weight: 600;
  min-width: 20px;
  text-align: center;
}

/* Notification Dropdown */
.notification-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  width: 350px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  border: 1px solid var(--border-color);
  z-index: 1000;
  margin-top: 0.5rem;
}

.notification-dropdown.hidden {
  display: none;
}

.dropdown-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.dropdown-header h4 {
  margin: 0;
  color: var(--color-text-dark);
  font-size: 1rem;
  font-weight: 600;
}

.close-dropdown {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--color-text-dark-dark);
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.close-dropdown:hover {
  background: var(--color-muted-light);
  color: var(--color-text-dark);
}

.dropdown-content {
  max-height: 300px;
  overflow-y: auto;
  padding: 0.5rem 0;
}

.notification-item {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.notification-item:hover {
  background: var(--color-muted-light);
}

.notification-item:last-child {
  border-bottom: none;
}

.notification-title {
  font-weight: 600;
  color: var(--color-text-dark);
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.notification-details {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  align-items: center;
}

.ticket-priority {
  padding: 0.25rem 0.5rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.priority-low {
  background: rgba(40, 167, 69, 0.1);
  color: var(--color-success);
}

.priority-medium {
  background: rgba(255, 193, 7, 0.1);
  color: var(--color-warning);
}

.priority-high {
  background: rgba(253, 126, 20, 0.1);
  color: #fd7e14;
}

.priority-urgent {
  background: rgba(220, 53, 69, 0.1);
  color: var(--color-error);
}

.ticket-sender {
  color: var(--color-text-dark-dark);
  font-size: 0.8rem;
}

.notification-time {
  color: var(--color-text-dark-dark);
  font-size: 0.75rem;
}

.dropdown-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-color);
  text-align: center;
}

.dropdown-footer a {
  color: var(--color-primary-light);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.dropdown-footer a:hover {
  color: var(--color-primary-dark);
  text-decoration: underline;
}

.no-notifications,
.error-notification {
  padding: 2rem 1.5rem;
  text-align: center;
  color: var(--color-text-dark-dark);
  font-style: italic;
}

.error-notification {
  color: var(--color-error);
}

/* Content Wrapper */
.content-wrapper {
  flex: 1;
  padding: var(--content-padding);
}

.content-section {
  display: none;
}

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

/* Dashboard */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--grid-gap);
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--card-bg);
  border-radius: 20px;
  padding: var(--card-padding);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  min-height: 120px;
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 40px rgba(104, 75, 255, 0.2);
}

.stat-icon {
  font-size: 2.5rem;
  background: linear-gradient(135deg, var(--color-gold), var(--color-gold-light));
  color: white;
  width: 60px;
  height: 60px;
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-content h3 {
  font-size: 0.9rem;
  color: var(--color-text-dark-light);
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.stat-number {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 0.25rem;
}

.stat-change {
  font-size: 0.8rem;
  font-weight: 500;
}

.stat-change.positive {
  color: var(--color-success);
}

.stat-change.negative {
  color: var(--color-error);
}

.recent-activity {
  background: var(--card-bg);
  border-radius: 20px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
}

.recent-activity h2 {
  color: var(--color-primary);
  margin-bottom: 1rem;
  font-size: 1.3rem;
  font-weight: 600;
}

.activity-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Section Headers */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.section-header h2 {
  color: var(--color-primary);
  font-size: 1.5rem;
  font-weight: 600;
}

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-gold), var(--color-gold-light));
  color: white;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(104, 75, 255, 0.3);
}

.btn-secondary {
  background: rgba(104, 75, 255, 0.1);
  color: var(--color-gold);
  border: 1px solid rgba(104, 75, 255, 0.2);
}

.btn-secondary:hover {
  background: rgba(104, 75, 255, 0.15);
  border-color: rgba(104, 75, 255, 0.3);
}

/* Table Container */
.table-container {
  background: var(--card-bg);
  border-radius: 20px;
  padding: var(--card-padding);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  max-width: 100%;
  overflow: hidden;
}

.table-filters {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.search-input {
  flex: 1;
  min-width: 250px;
  padding: 0.75rem 1rem;
  border: 2px solid var(--border-color);
  border-radius: 10px;
  font-size: 0.9rem;
  transition: border-color 0.3s ease;
  background: rgba(255, 255, 255, 0.9);
}

.search-input:focus {
  outline: none;
  border-color: var(--color-gold);
}

.filter-select {
  padding: 0.75rem 1rem;
  border: 2px solid var(--border-color);
  border-radius: 10px;
  font-size: 0.9rem;
  background: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  min-width: 150px;
}

.filter-select:focus {
  outline: none;
  border-color: var(--color-gold);
}

/* Data Table */
.table-wrapper {
  overflow-x: auto;
  border-radius: 15px;
  border: 1px solid var(--border-color);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
}

.data-table th {
  background: rgba(104, 75, 255, 0.05);
  padding: 1rem;
  text-align: right;
  font-weight: 600;
  color: var(--color-primary);
  border-bottom: 1px solid var(--border-color);
  font-size: 0.9rem;
}

.data-table td {
  padding: 1rem;
  border-bottom: 1px solid rgba(104, 75, 255, 0.1);
  color: var(--color-text-dark);
  font-size: 0.9rem;
}

.data-table tr:hover {
  background: rgba(104, 75, 255, 0.02);
}

/* Table Pagination */
.table-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

.pagination-btn {
  background: rgba(104, 75, 255, 0.1);
  color: var(--color-gold);
  border: 1px solid rgba(104, 75, 255, 0.2);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
  font-size: 0.9rem;
}

.pagination-btn:hover {
  background: rgba(104, 75, 255, 0.15);
  border-color: rgba(104, 75, 255, 0.3);
}

.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.page-info {
  color: var(--color-text-dark-light);
  font-size: 0.9rem;
}

/* Analytics Grid */
.analytics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--grid-gap);
  max-width: 100%;
}

.chart-container {
  background: var(--card-bg);
  border-radius: 20px;
  padding: var(--card-padding);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  min-height: 400px;
  display: flex;
  flex-direction: column;
}

.chart-container canvas {
  flex: 1;
  max-height: 350px;
}

.chart-container h3 {
  color: var(--color-primary);
  margin-bottom: 1rem;
  font-size: 1.2rem;
  font-weight: 600;
  text-align: center;
}

/* Settings Grid */
.settings-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--grid-gap);
  margin-bottom: 2rem;
}

.setting-card {
  background: var(--card-bg);
  border-radius: 20px;
  padding: var(--card-padding);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  min-height: 300px;
}

.setting-card h3 {
  color: var(--color-primary);
  margin-bottom: 1.5rem;
  font-size: 1.2rem;
  font-weight: 600;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.5rem;
}

.setting-item {
  margin-bottom: 1.5rem;
}

.setting-item label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--color-text-dark);
}

.setting-input,
.setting-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--border-color);
  border-radius: 10px;
  font-size: 0.9rem;
  transition: border-color 0.3s ease;
  background: rgba(255, 255, 255, 0.9);
  font-family: inherit;
}

.setting-input:focus,
.setting-textarea:focus {
  outline: none;
  border-color: var(--color-gold);
}

.setting-textarea {
  resize: vertical;
  min-height: 80px;
}

/* Toggle Switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.4s;
  border-radius: 24px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}

input:checked + .toggle-slider {
  background-color: var(--color-gold);
}

input:checked + .toggle-slider:before {
  transform: translateX(26px);
}

.settings-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

/* Modals */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  backdrop-filter: blur(5px);
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: white;
  border-radius: 20px;
  padding: 2rem;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: modalSlideIn 0.3s ease;
}

.modal-content.large {
  max-width: 700px;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
  color: var(--color-primary);
  font-size: 1.3rem;
  font-weight: 600;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--color-text-dark-light);
  padding: 0.5rem;
  border-radius: 50%;
  transition: background-color 0.3s ease;
}

.modal-close:hover {
  background: rgba(104, 75, 255, 0.1);
}

.modal-body {
  margin-bottom: 1.5rem;
}

.modal-footer {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

/* Form Groups */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--color-text-dark);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--border-color);
  border-radius: 10px;
  font-size: 0.9rem;
  transition: border-color 0.3s ease;
  background: rgba(255, 255, 255, 0.9);
  font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-gold);
}

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

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

/* Loading Overlay */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 3000;
  backdrop-filter: blur(5px);
}

.loading-overlay.hidden {
  display: none;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid var(--border-color);
  border-top: 4px solid var(--color-gold);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 1rem;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading-overlay p {
  color: var(--color-text-dark);
  font-size: 1.1rem;
  font-weight: 500;
}

/* Utility Classes */
.hidden {
  display: none !important;
}

/* Responsive Design - Optimized for 1920x1080 */
/* Large Desktop (1920px and above) - Default optimized layout */
@media (min-width: 1920px) {
  :root {
    --sidebar-width: 300px;
    --content-padding: 2.5rem;
    --card-padding: 2rem;
    --grid-gap: 2rem;
  }
  
  .dashboard-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .analytics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .settings-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .chart-container {
    min-height: 450px;
  }
  
  .chart-container canvas {
    max-height: 400px;
  }
}

/* Desktop (1440px - 1919px) */
@media (max-width: 1919px) and (min-width: 1440px) {
  :root {
    --sidebar-width: 280px;
    --content-padding: 2rem;
    --card-padding: 1.5rem;
    --grid-gap: 1.5rem;
  }
  
  .dashboard-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .analytics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .settings-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Laptop (1024px - 1439px) */
@media (max-width: 1439px) and (min-width: 1024px) {
  .dashboard-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .analytics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .settings-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Tablet (768px - 1023px) */
@media (max-width: 1023px) and (min-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  
  .sidebar.open {
    transform: translateX(0);
  }
  
  .main-content {
    margin-right: 0;
  }
  
  .sidebar-toggle {
    display: block;
  }
  
  .dashboard-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .analytics-grid {
    grid-template-columns: 1fr;
  }
  
  .settings-grid {
    grid-template-columns: 1fr;
  }
}

/* Mobile (767px and below) */
@media (max-width: 767px) {
  .content-wrapper {
    padding: 1rem;
  }
  
  .top-header {
    padding: 1rem;
  }
  
  .section-header {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }
  
  .section-actions {
    width: 100%;
    justify-content: stretch;
  }
  
  .btn {
    flex: 1;
    justify-content: center;
  }
  
  .table-filters {
    flex-direction: column;
  }
  
  .search-input {
    min-width: auto;
  }
  
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  
  .analytics-grid {
    grid-template-columns: 1fr;
  }
  
  .settings-grid {
    grid-template-columns: 1fr;
  }
  
  .stat-card {
    flex-direction: column;
    text-align: center;
  }
  
  .stat-icon {
    margin-bottom: 1rem;
  }
  
  .modal-content {
    margin: 1rem;
    padding: 1.5rem;
  }
  
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .modal-footer {
    flex-direction: column;
  }
  
  .btn {
    width: 100%;
  }
}

/* Additional utility classes for better 1920x1080 experience */
.text-center {
  text-align: center;
}

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

.w-full {
  width: 100%;
}

.h-full {
  height: 100%;
}

/* Chart responsiveness improvements */
.chart-container {
  position: relative;
}

.chart-container canvas {
  width: 100% !important;
  height: auto !important;
}

/* Table improvements for better space utilization */
.data-table {
  table-layout: auto;
  width: 100%;
}

.data-table th,
.data-table td {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}

/* Action buttons improvements */
.action-buttons {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.btn-icon {
  background: none;
  border: none;
  padding: 0.5rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1rem;
  min-width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-icon:hover {
  background: rgba(104, 75, 255, 0.1);
  transform: scale(1.1);
}

.btn-icon.btn-danger:hover {
  background: rgba(220, 53, 69, 0.1);
}

.btn-icon.btn-success:hover {
  background: rgba(40, 167, 69, 0.1);
}
