/* ============================================
   USER DASHBOARD - MLM CLOTHING WEBSITE
   ============================================ */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&family=Inter:wght@400;500;600&display=swap');

/* ============================================
   CSS VARIABLES (Matching Website Theme)
   ============================================ */
:root {
  /* Colors - Matching main website */
  --primary: #020617;
  --secondary: #F5EDE2;
  --accent: #FB7185;
  --white: #FFFFFF;
  --text-dark: #1e293b;
  --text-light: #64748b;
  --bg-light: #f8fafc;
  --border-color: #e2e8f0;
  
  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #020617, #FB7185);
  --gradient-accent: linear-gradient(135deg, #FB7185, #F59E0B);
  --gradient-text: linear-gradient(135deg, #020617 0%, #FB7185 50%, #F59E0B 100%);
  --gradient-overlay: linear-gradient(135deg, rgba(2, 6, 23, 0.95), rgba(251, 113, 133, 0.85));
  
  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.15);
  --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.2);
  
  /* Transitions */
  --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   RESET & BASE STYLES
   ============================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-dark);
  background-color: var(--bg-light);
  overflow-x: hidden;
}

/* ============================================
   SIDEBAR NAVIGATION
   ============================================ */
.dashboard-container {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 280px;
  background: var(--white);
  box-shadow: var(--shadow-md);
  position: fixed;
  left: 0;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  transition: var(--transition);
  z-index: 1000;
}

.sidebar-header {
  padding: 30px 25px;
  background: var(--gradient-primary);
  color: var(--white);
}

.logo {
  font-family: 'Poppins', sans-serif;
  font-size: 24px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--white);
}

.logo i {
  font-size: 28px;
}

.sidebar-nav {
  padding: 20px 0;
}

.nav-section-title {
  padding: 20px 25px 10px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-light);
  letter-spacing: 1px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px 25px;
  color: var(--text-dark);
  text-decoration: none;
  transition: var(--transition);
  position: relative;
}

.nav-link i {
  font-size: 20px;
  width: 24px;
}

.nav-link span {
  font-weight: 500;
  font-size: 15px;
}

.nav-link:hover {
  background: var(--bg-light);
  color: var(--accent);
}

.nav-link.active {
  background: linear-gradient(90deg, rgba(251, 113, 133, 0.1), transparent);
  color: var(--accent);
  border-left: 3px solid var(--accent);
}

.nav-link.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 100%;
  background: var(--accent);
}

/* Logout Button */
.nav-link.logout {
  color: #ef4444;
  margin-top: 20px;
}

.nav-link.logout:hover {
  background: rgba(239, 68, 68, 0.1);
}

/* ============================================
   SIDEBAR DROPDOWN MENU
   ============================================ */
.nav-dropdown {
  position: relative;
}

.nav-link.has-dropdown {
  justify-content: space-between;
  cursor: pointer;
}

.dropdown-arrow {
  font-size: 14px !important;
  width: auto !important;
  transition: transform 0.3s ease;
  margin-left: auto;
}

.nav-link.has-dropdown.open .dropdown-arrow {
  transform: rotate(180deg);
}

.dropdown-menu {
  max-height: 0;
  overflow: hidden;
  background: var(--bg-light);
  transition: max-height 0.3s ease, opacity 0.3s ease;
  opacity: 0;
}

.dropdown-menu.open {
  max-height: 500px;
  opacity: 1;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 25px 12px 55px;
  color: var(--text-dark);
  text-decoration: none;
  transition: var(--transition);
  font-size: 14px;
  position: relative;
}

.dropdown-item i {
  font-size: 16px;
  width: 20px;
  color: var(--text-light);
}

.dropdown-item:hover {
  background: rgba(251, 113, 133, 0.08);
  color: var(--accent);
  padding-left: 60px;
}

.dropdown-item:hover i {
  color: var(--accent);
}

.dropdown-item.active {
  background: rgba(251, 113, 133, 0.12);
  color: var(--accent);
  font-weight: 600;
}

.dropdown-item.active i {
  color: var(--accent);
}

.dropdown-item.active::before {
  content: '';
  position: absolute;
  left: 45px;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 4px;
  background: var(--accent);
  border-radius: 50%;
}

/* ============================================
   MAIN CONTENT AREA
   ============================================ */
.main-content {
  margin-left: 280px;
  flex: 1;
  min-height: 100vh;
  background: var(--bg-light);
}

/* Top Header */
.top-header {
  background: var(--white);
  padding: 20px 30px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text-dark);
  cursor: pointer;
  padding: 8px;
}

.page-title {
  font-family: 'Poppins', sans-serif;
  font-size: 24px;
  font-weight: 700;
  color: var(--text-dark);
}

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

.header-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--bg-light);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.header-icon:hover {
  background: var(--accent);
  color: var(--white);
}

.header-icon i {
  font-size: 18px;
}

.notification-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 8px;
  height: 8px;
  background: #ef4444;
  border-radius: 50%;
  border: 2px solid var(--white);
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  padding: 8px 15px;
  border-radius: 12px;
  transition: var(--transition);
}

.user-profile:hover {
  background: var(--bg-light);
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--gradient-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-weight: 600;
}

.user-info h4 {
  font-size: 14px;
  font-weight: 600;
  margin: 0;
}

.user-info p {
  font-size: 12px;
  color: var(--text-light);
  margin: 0;
}

/* ============================================
   DASHBOARD CONTENT
   ============================================ */
.dashboard-content {
  padding: 30px;
}

/* Welcome Banner */
.welcome-banner {
  background: var(--gradient-primary);
  border-radius: 20px;
  padding: 40px;
  color: var(--white);
  margin-bottom: 30px;
  position: relative;
  overflow: hidden;
}

.welcome-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 300px;
  height: 300px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
}

.welcome-content {
  position: relative;
  z-index: 1;
}

.welcome-banner h2 {
  font-family: 'Poppins', sans-serif;
  font-size: 32px;
  margin-bottom: 10px;
}

.welcome-banner p {
  font-size: 16px;
  opacity: 0.9;
  margin: 0;
}

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

.stat-card {
  background: var(--white);
  border-radius: 16px;
  padding: 25px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--gradient-accent);
}

.stat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 15px;
}

.stat-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  background: var(--gradient-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 24px;
}

.stat-trend {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 14px;
  font-weight: 600;
  color: #10b981;
}

.stat-trend.down {
  color: #ef4444;
}

.stat-value {
  font-family: 'Poppins', sans-serif;
  font-size: 32px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 5px;
}

.stat-label {
  font-size: 14px;
  color: var(--text-light);
}

/* Content Cards */
.content-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 25px;
  margin-bottom: 30px;
}

.card {
  background: var(--white);
  border-radius: 16px;
  padding: 25px;
  box-shadow: var(--shadow-sm);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 2px solid var(--bg-light);
}

.card-title {
  font-family: 'Poppins', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--text-dark);
  margin: 0;
}

.card-action {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  transition: var(--transition);
}

.card-action:hover {
  color: var(--primary);
}

/* Table Styles */
.table-wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 15px 0;
  position: relative;
}

/* Scroll indicator for mobile tables */
@media (max-width: 768px) {
  .table-wrapper::after {
    content: '← Scroll →';
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(251, 113, 133, 0.9);
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    pointer-events: none;
    opacity: 0.8;
    z-index: 1;
  }
  
  .table-wrapper::-webkit-scrollbar {
    height: 6px;
  }
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px; /* Prevents table from collapsing on small screens */
}

.data-table thead tr {
  background: var(--bg-light);
}

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

.data-table td {
  padding: 15px;
  font-size: 14px;
  color: var(--text-light);
  border-bottom: 1px solid var(--bg-light);
}

.status-badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.status-badge.success {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
}

.status-badge.pending {
  background: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
}

.status-badge.failed {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

/* Activity List */
.activity-list {
  list-style: none;
}

.activity-item {
  display: flex;
  gap: 15px;
  padding: 15px 0;
  border-bottom: 1px solid var(--bg-light);
}

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

.activity-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--gradient-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 16px;
  flex-shrink: 0;
}

.activity-content h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 5px;
}

.activity-content p {
  font-size: 13px;
  color: var(--text-light);
  margin: 0;
}

.activity-time {
  font-size: 12px;
  color: var(--text-light);
  margin-left: auto;
  flex-shrink: 0;
}

/* Buttons */
.btn {
  padding: 12px 28px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 15px;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: 'Inter', sans-serif;
}

.btn-primary {
  background: var(--gradient-accent);
  color: var(--white);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--accent);
  color: var(--accent);
}

.btn-outline:hover {
  background: var(--accent);
  color: var(--white);
}

/* Quick Actions Grid */
.quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
}

@media (max-width: 768px) {
  .quick-actions-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Large Tablets & Small Desktops (1200px and below) */
@media (max-width: 1200px) {
  .content-row {
    grid-template-columns: 1fr;
  }
  
  .stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }
}

/* Tablets (992px and below) */
@media (max-width: 992px) {
  /* Hide sidebar by default on tablets */
  .sidebar {
    left: -280px;
    box-shadow: none;
  }
  
  .sidebar.active {
    left: 0;
    box-shadow: var(--shadow-xl);
  }
  
  /* Remove left margin from main content */
  .main-content {
    margin-left: 0;
    width: 100%;
  }
  
  /* Show hamburger menu button */
  .menu-toggle {
    display: block;
  }
  
  /* Adjust stats grid */
  .stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
  }
  
  /* Make stat cards slightly more compact */
  .stat-card {
    padding: 20px;
  }
  
  .stat-icon {
    width: 45px;
    height: 45px;
    font-size: 20px;
  }
}

/* Mobile Devices (768px and below) */
@media (max-width: 768px) {
  /* ===== HEADER SECTION RESPONSIVE ===== */
  .top-header {
    padding: 12px 15px;
    flex-wrap: wrap;
  }
  
  .header-left {
    gap: 12px;
  }
  
  .page-title {
    font-size: 18px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  .header-right {
    gap: 8px;
  }
  
  /* Hide user info text on mobile, keep avatar */
  .user-info {
    display: none;
  }
  
  .user-profile {
    padding: 4px;
  }
  
  .header-icon {
    width: 40px;
    height: 40px;
  }
  
  /* Content padding */
  .dashboard-content {
    padding: 15px 12px;
  }
  
  /* ===== WELCOME SECTION RESPONSIVE ===== */
  .welcome-banner {
    padding: 25px 15px;
    border-radius: 12px;
    margin-bottom: 20px;
  }
  
  .welcome-banner::before {
    width: 200px;
    height: 200px;
    top: -40%;
    right: -20%;
  }
  
  .welcome-banner h2 {
    font-size: 22px;
    margin-bottom: 8px;
    line-height: 1.3;
  }
  
  .welcome-banner p {
    font-size: 14px;
    line-height: 1.5;
  }
  
  /* Stats grid - single column */
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 20px;
  }
  
  .stat-card {
    padding: 18px 15px;
  }
  
  /* ===== RECENT ORDERS & ACTIVITY SECTIONS ===== */
  .content-row {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
  }
  
  /* Cards */
  .card {
    padding: 15px 12px;
    border-radius: 12px;
  }
  
  .card-header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
    padding-bottom: 12px;
    flex-wrap: wrap;
    gap: 8px;
  }
  
  .card-title {
    font-size: 16px;
  }
  
  .card-action {
    font-size: 13px;
    white-space: nowrap;
  }
  
  /* ===== RECENT ORDERS TABLE RESPONSIVE ===== */
  .table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -12px;
    padding: 0 12px;
  }
  
  .data-table {
    font-size: 12px;
    min-width: 550px; /* Ensure table doesn't collapse */
  }
  
  .data-table th,
  .data-table td {
    padding: 8px 6px;
    white-space: nowrap;
  }
  
  .data-table th {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }
  
  .data-table td {
    font-size: 12px;
  }
  
  .status-badge {
    font-size: 10px;
    padding: 4px 8px;
  }
  
  /* ===== RECENT ACTIVITY SECTION RESPONSIVE ===== */
  .activity-list {
    margin: 0;
  }
  
  .activity-item {
    padding: 12px 0;
    gap: 12px;
  }
  
  .activity-item:first-child {
    padding-top: 0;
  }
  
  .activity-icon {
    width: 35px;
    height: 35px;
    font-size: 14px;
    border-radius: 8px;
  }
  
  .activity-content {
    flex: 1;
    min-width: 0;
  }
  
  .activity-content h4 {
    font-size: 13px;
    margin-bottom: 3px;
  }
  
  .activity-content p {
    font-size: 12px;
    line-height: 1.4;
  }
  
  .activity-time {
    font-size: 11px;
    flex-shrink: 0;
  }
  
  /* ===== QUICK ACTIONS SECTION RESPONSIVE ===== */
  .card.mt-30 {
    margin-top: 15px;
  }
  
  /* Quick action buttons grid */
  .card [style*="grid-template-columns"] {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }
  
  /* Buttons */
  .btn {
    padding: 12px 18px;
    font-size: 14px;
    width: 100%;
    justify-content: center;
  }
  
  .btn i {
    font-size: 16px;
  }
}

/* Small Mobile Devices (480px and below) */
@media (max-width: 480px) {
  /* ===== HEADER SECTION ===== */
  .top-header {
    padding: 10px 12px;
  }
  
  .page-title {
    font-size: 16px;
  }
  
  .header-right {
    gap: 6px;
  }
  
  .header-icon {
    width: 36px;
    height: 36px;
  }
  
  .header-icon i {
    font-size: 15px;
  }
  
  .user-avatar {
    width: 34px;
    height: 34px;
    font-size: 13px;
  }
  
  /* ===== CONTENT AREA ===== */
  .dashboard-content {
    padding: 12px 10px;
  }
  
  /* ===== WELCOME SECTION ===== */
  .welcome-banner {
    padding: 20px 12px;
    border-radius: 10px;
    margin-bottom: 15px;
  }
  
  .welcome-banner h2 {
    font-size: 18px;
    margin-bottom: 6px;
  }
  
  .welcome-banner p {
    font-size: 13px;
  }
  
  /* ===== STAT CARDS ===== */
  .stats-grid {
    gap: 10px;
    margin-bottom: 15px;
  }
  
  .stat-card {
    padding: 15px 12px;
    border-radius: 10px;
  }
  
  .stat-header {
    margin-bottom: 10px;
  }
  
  .stat-icon {
    width: 38px;
    height: 38px;
    font-size: 16px;
  }
  
  .stat-value {
    font-size: 22px;
    margin-bottom: 4px;
  }
  
  .stat-label {
    font-size: 12px;
  }
  
  .stat-trend {
    font-size: 11px;
  }
  
  /* ===== RECENT ORDERS & ACTIVITY ===== */
  .content-row {
    gap: 12px;
    margin-bottom: 15px;
  }
  
  .card {
    padding: 12px 10px;
  }
  
  .card-title {
    font-size: 15px;
  }
  
  .card-action {
    font-size: 12px;
  }
  
  /* ===== RECENT ORDERS TABLE ===== */
  .table-wrapper {
    margin: 0 -10px;
    padding: 0 10px;
  }
  
  .data-table {
    font-size: 11px;
    min-width: 500px;
  }
  
  .data-table th,
  .data-table td {
    padding: 6px 4px;
  }
  
  .data-table th {
    font-size: 10px;
  }
  
  .status-badge {
    font-size: 9px;
    padding: 3px 6px;
  }
  
  /* ===== RECENT ACTIVITY ===== */
  .activity-item {
    gap: 10px;
    padding: 10px 0;
  }
  
  .activity-icon {
    width: 32px;
    height: 32px;
    font-size: 13px;
  }
  
  .activity-content h4 {
    font-size: 12px;
    margin-bottom: 2px;
  }
  
  .activity-content p {
    font-size: 11px;
  }
  
  .activity-time {
    font-size: 10px;
    display: block;
    margin-top: 2px;
  }
  
  /* Stack activity time below on very small screens */
  .activity-item {
    flex-wrap: wrap;
  }
  
  /* ===== QUICK ACTIONS SECTION ===== */
  .card.mt-30 {
    margin-top: 12px;
  }
  
  .btn {
    padding: 12px 16px;
    font-size: 13px;
    gap: 8px;
  }
  
  .btn i {
    font-size: 14px;
  }
}

/* Extra Small Devices (375px and below) */
@media (max-width: 375px) {
  .top-header {
    padding: 10px 12px;
  }
  
  .page-title {
    font-size: 16px;
  }
  
  .welcome-banner h2 {
    font-size: 18px;
  }
  
  .stat-value {
    font-size: 22px;
  }
  
  .data-table {
    font-size: 12px;
  }
}

/* Landscape orientation adjustments for mobile */
@media (max-width: 992px) and (orientation: landscape) {
  .sidebar {
    width: 250px;
    left: -250px;
  }
  
  .sidebar.active {
    left: 0;
  }
  
  .stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }
  
  .welcome-banner {
    padding: 25px 20px;
  }
}

/* Sidebar Overlay for Mobile */
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
  display: block;
  opacity: 1;
}

/* Smooth transitions for sidebar */
@media (max-width: 992px) {
  .sidebar {
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }
  
  /* Prevent body scroll when sidebar is open */
  body.sidebar-open {
    overflow: hidden;
  }
}

/* Touch-friendly interactive elements */
@media (max-width: 768px) {
  .nav-link,
  .header-icon,
  .user-profile,
  .btn {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }
  
  /* Larger touch targets */
  .nav-link {
    min-height: 48px;
  }
  
  .header-icon {
    min-width: 44px;
    min-height: 44px;
  }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.gradient-text {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.mt-30 {
  margin-top: 30px;
}

.mb-30 {
  margin-bottom: 30px;
}

.text-center {
  text-align: center;
}

/* Mobile-specific utilities */
.mobile-only {
  display: none;
}

.desktop-only {
  display: block;
}

@media (max-width: 768px) {
  .mobile-only {
    display: block;
  }
  
  .desktop-only {
    display: none;
  }
  
  .mobile-hidden {
    display: none !important;
  }
}

/* Improved scrollbar for webkit browsers */
.table-wrapper::-webkit-scrollbar {
  height: 8px;
}

.table-wrapper::-webkit-scrollbar-track {
  background: var(--bg-light);
  border-radius: 10px;
}

.table-wrapper::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 10px;
}

.table-wrapper::-webkit-scrollbar-thumb:hover {
  background: var(--text-light);
}

/* Responsive images */
img {
  max-width: 100%;
  height: auto;
}

/* Responsive grid helpers */
.responsive-grid {
  display: grid;
  gap: 20px;
}

@media (min-width: 768px) {
  .responsive-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .responsive-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Safe area for notched devices (iPhone X and above) */
@supports (padding: max(0px)) {
  .top-header {
    padding-left: max(20px, env(safe-area-inset-left));
    padding-right: max(20px, env(safe-area-inset-right));
  }
  
  .dashboard-content {
    padding-left: max(30px, env(safe-area-inset-left));
    padding-right: max(30px, env(safe-area-inset-right));
    padding-bottom: max(30px, env(safe-area-inset-bottom));
  }
}

/* ============================================
   PRODUCT GRID RESPONSIVE
   ============================================ */
.products-grid,
[style*="grid-template-columns: repeat(auto-fill"] {
  display: grid !important;
  gap: 20px;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

@media (max-width: 768px) {
  .products-grid,
  [style*="grid-template-columns: repeat(auto-fill"] {
    grid-template-columns: 1fr !important;
    gap: 15px;
  }
}

@media (max-width: 480px) {
  .products-grid,
  [style*="grid-template-columns: repeat(auto-fill"] {
    gap: 12px;
  }
}

/* Product cards in grid */
.product-card {
  transition: var(--transition);
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

/* ============================================
   FORM ELEMENTS RESPONSIVE
   ============================================ */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="url"],
textarea,
select {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border-color);
  border-radius: 12px;
  font-size: 15px;
  font-family: 'Inter', sans-serif;
  transition: var(--transition);
  background: var(--white);
  color: var(--text-dark);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(251, 113, 133, 0.1);
}

@media (max-width: 768px) {
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="number"],
  input[type="tel"],
  input[type="url"],
  textarea,
  select {
    font-size: 16px; /* Prevents zoom on iOS */
    padding: 14px;
  }
}

/* Form groups */
.form-group {
  margin-bottom: 20px;
}

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

@media (max-width: 768px) {
  .form-group {
    margin-bottom: 16px;
  }
}

/* ============================================
   MODAL/DIALOG RESPONSIVE
   ============================================ */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
}

.modal-content {
  background: var(--white);
  border-radius: 16px;
  padding: 30px;
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}

@media (max-width: 768px) {
  .modal {
    padding: 10px;
    align-items: flex-end;
  }
  
  .modal-content {
    border-radius: 20px 20px 0 0;
    max-height: 85vh;
    padding: 25px 20px;
  }
}

@media (max-width: 480px) {
  .modal-content {
    padding: 20px 15px;
  }
}

/* ============================================
   LOADING STATES
   ============================================ */
.loading {
  position: relative;
  pointer-events: none;
  opacity: 0.6;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid var(--white);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ============================================
   ACCESSIBILITY IMPROVEMENTS
   ============================================ */
/* Focus visible for keyboard navigation */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .btn-primary {
    border: 2px solid currentColor;
  }
  
  .nav-link.active {
    border-left-width: 4px;
  }
}
