/* ===================================
   OhMyJewellers Reseller Portal Styles
   Premium B2B Portal Design
   =================================== */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@300;400;500;600;700&family=Poppins:wght@300;400;500;600;700&display=swap');

/* CSS Variables - Theme Colors */
:root {
  /* Primary Colors */
  --navy-primary: #1a2332;
  --navy-dark: #0f1419;
  --navy-light: #2d3a4f;
  
  /* Silver & Grays */
  --silver: #c0c0c0;
  --silver-light: #e8e8e8;
  --gray-bg: #f5f7fa;
  --gray-light: #fafbfc;
  --gray-border: #e1e4e8;
  --gray-text: #6b7280;
  
  /* Accent Colors */
  --white: #ffffff;
  --black: #000000;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;
  
  /* Typography */
  --font-display: 'Cormorant Garamond', serif;
  --font-body: 'Poppins', sans-serif;
  
  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  
  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  
  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 200ms ease;
  --transition-slow: 300ms ease;
}

/* ===================================
   Reset & Base Styles
   =================================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--navy-primary);
  background-color: var(--gray-light);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  display: block;
}

/* ===================================
   Typography
   =================================== */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: var(--spacing-sm);
}

h1 { font-size: 3rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 2rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
  margin-bottom: var(--spacing-sm);
  color: var(--gray-text);
}

a {
  color: var(--navy-primary);
  text-decoration: none;
  transition: var(--transition-base);
}

a:hover {
  color: var(--navy-light);
}

/* ===================================
   Layout Components
   =================================== */

.container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

.section {
  padding: var(--spacing-xl) 0;
}

.section-title {
  text-align: center;
  margin-bottom: var(--spacing-lg);
}

.section-subtitle {
  text-align: center;
  color: var(--gray-text);
  max-width: 600px;
  margin: 0 auto var(--spacing-lg);
}

/* Grid Systems */
.grid {
  display: grid;
  gap: var(--spacing-md);
  min-width: 0;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* Flexbox Utilities */
.flex {
  display: flex;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.flex-wrap {
  flex-wrap: wrap;
}

.gap-sm { gap: var(--spacing-sm); }
.gap-md { gap: var(--spacing-md); }
.gap-lg { gap: var(--spacing-lg); }

/* ===================================
   Navigation
   =================================== */

.navbar {
  background: var(--white);
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: var(--spacing-sm) 0;
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--navy-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-icon {
  font-size: 2rem;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: var(--spacing-md);
  align-items: center;
}

.nav-link {
  color: var(--gray-text);
  font-weight: 500;
  padding: 0.5rem 1rem;
  transition: var(--transition-base);
}

.nav-link:hover {
  color: var(--navy-primary);
}

.nav-buttons {
  display: flex;
  gap: var(--spacing-sm);
}

.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--navy-primary);
}

@media (max-width: 1100px) and (min-width: 769px) {
  .navbar .container {
    flex-wrap: wrap;
    gap: var(--spacing-sm);
  }

  .nav-menu {
    order: 3;
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.35rem 0.75rem;
  }

  .nav-link {
    padding: 0.4rem 0.75rem;
  }

  .nav-buttons {
    margin-left: auto;
    flex-wrap: wrap;
    justify-content: flex-end;
  }
}

/* ===================================
   Buttons
   =================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
  border-radius: var(--radius-md);
  border: 2px solid transparent;
  cursor: pointer;
  transition: var(--transition-base);
  text-decoration: none;
  min-height: 44px;
  text-align: center;
}

.btn-primary {
  background: var(--navy-primary);
  color: var(--white);
  border-color: var(--navy-primary);
}

.btn-primary:hover {
  background: var(--navy-dark);
  border-color: var(--navy-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-secondary {
  background: var(--white);
  color: var(--navy-primary);
  border-color: var(--navy-primary);
}

.btn-secondary:hover {
  background: var(--gray-bg);
}

.btn-outline {
  background: transparent;
  color: var(--navy-primary);
  border-color: var(--gray-border);
}

.btn-outline:hover {
  background: var(--gray-bg);
  border-color: var(--navy-primary);
}

.btn-success {
  background: var(--success);
  color: var(--white);
}

.btn-success:hover {
  background: #059669;
}

.btn-danger {
  background: var(--danger);
  color: var(--white);
}

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

.btn-info:hover {
  background: #2563eb;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.125rem;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ===================================
   Cards
   =================================== */

.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: var(--spacing-md);
  box-shadow: var(--shadow-md);
  transition: var(--transition-base);
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.card-header {
  padding-bottom: var(--spacing-sm);
  border-bottom: 1px solid var(--gray-border);
  margin-bottom: var(--spacing-sm);
}

.card-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
}

.card-body {
  padding: var(--spacing-sm) 0;
}

.card-footer {
  padding-top: var(--spacing-sm);
  border-top: 1px solid var(--gray-border);
  margin-top: var(--spacing-sm);
}

/* ===================================
   Forms
   =================================== */

.form-group {
  margin-bottom: var(--spacing-md);
}

.form-label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--navy-primary);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--gray-border);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: var(--transition-base);
  background: var(--white);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--navy-primary);
  box-shadow: 0 0 0 3px rgba(26, 35, 50, 0.1);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

.form-radio,
.form-checkbox {
  margin-right: 0.5rem;
  cursor: pointer;
}

/* ===================================
   Hero Section
   =================================== */

.hero {
  padding: var(--spacing-xl) 0;
  background: linear-gradient(135deg, var(--gray-light) 0%, var(--white) 100%);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 50%;
  height: 100%;
  background: linear-gradient(135deg, transparent 0%, rgba(192, 192, 192, 0.1) 100%);
  z-index: 0;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero-content {
  max-width: 800px;
  text-align: center;
  margin: 0 auto;
}

.hero-badge {
  display: inline-block;
  background: var(--navy-primary);
  color: var(--white);
  padding: 0.5rem 1.5rem;
  border-radius: 50px;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: var(--spacing-md);
  letter-spacing: 0.5px;
}

.hero-title {
  font-size: 3.5rem;
  margin-bottom: var(--spacing-md);
  line-height: 1.1;
}

.hero-text {
  font-size: 1.25rem;
  color: var(--gray-text);
  margin-bottom: var(--spacing-lg);
}

.hero-buttons {
  display: flex;
  gap: var(--spacing-sm);
  justify-content: center;
  flex-wrap: wrap;
}

/* ===================================
   Feature Cards
   =================================== */

.feature-card {
  text-align: center;
  padding: var(--spacing-lg);
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  transition: var(--transition-base);
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
}

.feature-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto var(--spacing-md);
  background: linear-gradient(135deg, var(--navy-primary), var(--navy-light));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--white);
}

.feature-title {
  font-size: 1.5rem;
  margin-bottom: var(--spacing-sm);
}

.feature-text {
  color: var(--gray-text);
  line-height: 1.6;
}

/* ===================================
   Product Cards
   =================================== */

.product-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: var(--transition-base);
}

.product-card:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-3px);
}

.product-image {
  width: 100%;
  height: 250px;
  background: var(--gray-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-image-placeholder {
  font-size: 4rem;
  color: var(--silver);
}

.product-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--success);
  color: var(--white);
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
}

.product-info {
  padding: var(--spacing-md);
}

.product-code {
  font-size: 0.875rem;
  color: var(--gray-text);
  margin-bottom: 0.5rem;
}

.product-name {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.product-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-sm);
  font-size: 0.875rem;
  color: var(--gray-text);
}

.product-pricing {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-md);
  padding: var(--spacing-sm);
  background: var(--gray-bg);
  border-radius: var(--radius-md);
}

.product-price-item {
  text-align: center;
}

.product-price-label {
  font-size: 0.75rem;
  color: var(--gray-text);
  margin-bottom: 0.25rem;
}

.product-price {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--navy-primary);
}

.product-actions {
  display: grid;
  gap: 0.5rem;
}

/* ===================================
   Sidebar Layout
   =================================== */

.dashboard-layout {
  display: flex;
  min-height: 100vh;
  width: 100%;
  max-width: 100%;
  background: var(--gray-light);
  overflow-x: hidden;
}

.sidebar {
  width: 280px;
  flex: 0 0 280px;
  background: var(--navy-primary);
  color: var(--white);
  padding: var(--spacing-md);
  position: fixed;
  height: 100vh;
  overflow-y: auto;
  z-index: 100;
  transition: var(--transition-base);
}

.sidebar-header {
  padding-bottom: var(--spacing-md);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: var(--spacing-md);
}

.sidebar-logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--white);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sidebar-menu {
  list-style: none;
}

.sidebar-menu-item {
  margin-bottom: 0.5rem;
}

.sidebar-menu-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  color: rgba(255, 255, 255, 0.7);
  border-radius: var(--radius-md);
  transition: var(--transition-base);
  cursor: pointer;
}

.sidebar-menu-link:hover,
.sidebar-menu-link.active {
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
}

.sidebar-menu-icon {
  font-size: 1.25rem;
  width: 24px;
  text-align: center;
}

.main-content {
  flex: 0 0 calc(100% - 280px);
  width: calc(100% - 280px);
  max-width: calc(100% - 280px);
  min-width: 0;
  margin-left: 280px;
  padding: var(--spacing-md);
  transition: var(--transition-base);
}

.sidebar-toggle {
  display: none;
  position: fixed;
  top: 0.85rem;
  left: 0.85rem;
  z-index: 1201;
  width: 44px;
  height: 44px;
  border: 1px solid var(--gray-border);
  border-radius: var(--radius-md);
  background: var(--white);
  box-shadow: var(--shadow-md);
  cursor: pointer;
}

.sidebar-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: var(--navy-primary);
  border-radius: 999px;
}

.sidebar-overlay {
  display: none;
}

.content-header {
  background: var(--white);
  padding: var(--spacing-md);
  border-radius: var(--radius-lg);
  margin-bottom: var(--spacing-md);
  box-shadow: var(--shadow-sm);
}

.content-header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-md);
  min-width: 0;
}

.content-title {
  font-size: 2rem;
  margin: 0;
}

.content-subtitle {
  color: var(--gray-text);
  margin: 0;
}

/* ===================================
   Dashboard Stats
   =================================== */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-md);
}

.stat-card {
  background: var(--white);
  padding: var(--spacing-md);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
}

.stat-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--navy-primary), var(--navy-light));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--white);
  flex-shrink: 0;
}

.stat-content {
  flex: 1;
}

.stat-label {
  font-size: 0.875rem;
  color: var(--gray-text);
  margin-bottom: 0.25rem;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--navy-primary);
  margin-bottom: 0.25rem;
}

.stat-change {
  font-size: 0.75rem;
  color: var(--success);
}

.stat-change.negative {
  color: var(--danger);
}

/* ===================================
   Tables
   =================================== */

.table-container {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  box-shadow: var(--shadow-md);
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table thead {
  background: var(--gray-bg);
}

.table th {
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  color: var(--navy-primary);
  border-bottom: 2px solid var(--gray-border);
}

.table td {
  padding: 1rem;
  border-bottom: 1px solid var(--gray-border);
}

.table tbody tr:hover {
  background: var(--gray-light);
}

.table tbody tr:last-child td {
  border-bottom: none;
}

.table td:last-child > div {
  flex-wrap: wrap;
}

/* ===================================
   Badges & Status
   =================================== */

.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-success {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
}

.badge-warning {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning);
}

.badge-danger {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
}

.badge-info {
  background: rgba(59, 130, 246, 0.1);
  color: var(--info);
}

.badge-primary {
  background: rgba(26, 35, 50, 0.1);
  color: var(--navy-primary);
}

/* ===================================
   Alerts
   =================================== */

.alert {
  padding: var(--spacing-md);
  border-radius: var(--radius-md);
  margin-bottom: var(--spacing-md);
  border-left: 4px solid;
}

.alert-success {
  background: rgba(16, 185, 129, 0.1);
  border-color: var(--success);
  color: #065f46;
}

.alert-warning {
  background: rgba(245, 158, 11, 0.1);
  border-color: var(--warning);
  color: #92400e;
}

.alert-danger {
  background: rgba(239, 68, 68, 0.1);
  border-color: var(--danger);
  color: #991b1b;
}

.alert-info {
  background: rgba(59, 130, 246, 0.1);
  border-color: var(--info);
  color: #1e40af;
}

/* ===================================
   Footer
   =================================== */

.footer {
  background: var(--navy-primary);
  color: var(--white);
  padding: var(--spacing-xl) 0 var(--spacing-md);
  margin-top: var(--spacing-xl);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
}

.footer-section h4 {
  color: var(--white);
  margin-bottom: var(--spacing-md);
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  transition: var(--transition-base);
}

.footer-links a:hover {
  color: var(--white);
}

.footer-bottom {
  text-align: center;
  padding-top: var(--spacing-md);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
}

/* ===================================
   Utilities
   =================================== */

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: var(--spacing-sm); }
.mt-2 { margin-top: var(--spacing-md); }
.mt-3 { margin-top: var(--spacing-lg); }

.mb-1 { margin-bottom: var(--spacing-sm); }
.mb-2 { margin-bottom: var(--spacing-md); }
.mb-3 { margin-bottom: var(--spacing-lg); }

.p-1 { padding: var(--spacing-sm); }
.p-2 { padding: var(--spacing-md); }
.p-3 { padding: var(--spacing-lg); }

.hidden { display: none !important; }
.visible { display: block !important; }

/* ===================================
   Responsive Design
   =================================== */

/* Tablet (768px - 1024px) */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  
  .sidebar {
    width: 250px;
    flex-basis: 250px;
  }
  
  .main-content {
    flex-basis: calc(100% - 250px);
    width: calc(100% - 250px);
    max-width: calc(100% - 250px);
    margin-left: 250px;
  }
  
  .hero-title {
    font-size: 2.5rem;
  }

  .table {
    min-width: 760px;
  }
}

/* Mobile (max-width: 768px) */
@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }
  h3 { font-size: 1.5rem; }
  
  .container {
    padding: 0 var(--spacing-sm);
  }

  body {
    overflow-x: hidden;
  }
  
  .section {
    padding: var(--spacing-lg) 0;
  }
  
  /* Navigation */
  .navbar .container {
    flex-wrap: wrap;
    gap: var(--spacing-sm);
  }

  .nav-menu {
    position: fixed;
    top: 70px;
    left: -100%;
    width: 100%;
    flex-direction: column;
    background: var(--white);
    padding: var(--spacing-md);
    box-shadow: var(--shadow-lg);
    transition: var(--transition-base);
  }
  
  .nav-menu.active {
    left: 0;
  }
  
  .nav-buttons {
    order: 3;
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
    margin-top: 0.5rem;
  }
  
  .nav-buttons .btn {
    width: 100%;
  }
  
  .mobile-menu-toggle {
    display: block;
  }
  
  /* Grid */
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
  
  /* Hero */
  .hero-title {
    font-size: 2rem;
  }
  
  .hero-text {
    font-size: 1rem;
  }
  
  .hero-buttons {
    flex-direction: column;
  }
  
  .hero-buttons .btn {
    width: 100%;
  }

  .card {
    padding: var(--spacing-sm);
  }
  
  /* Sidebar */
  .sidebar {
    width: 100%;
    transform: translateX(-100%);
    position: fixed;
    z-index: 1000;
  }
  
  .sidebar.active {
    transform: translateX(0);
  }

  .sidebar-toggle {
    display: block;
  }

  .sidebar-overlay {
    position: fixed;
    inset: 0;
    z-index: 999;
    background: rgba(15, 20, 25, 0.42);
  }

  .sidebar-overlay.active {
    display: block;
  }
  
  .main-content {
    flex: 1 1 auto;
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    padding: 4.5rem var(--spacing-sm) var(--spacing-sm);
  }
  
  /* Dashboard Stats */
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .stat-card {
    flex-direction: row;
  }
  
  /* Tables */
  .table-container {
    overflow-x: auto;
  }
  
  .table {
    min-width: 600px;
  }
  
  /* Product Cards */
  .product-card {
    margin-bottom: var(--spacing-md);
  }
  
  /* Content Header */
  .content-header-top {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--spacing-sm);
  }

  .content-title {
    font-size: 1.75rem;
  }

  .product-pricing {
    align-items: stretch;
  }

  .toast-notification {
    left: 1rem !important;
    right: 1rem !important;
    min-width: 0 !important;
    max-width: none !important;
  }

  .modal-content {
    width: calc(100% - 2rem) !important;
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
  }
  
  /* Footer */
  .footer-content {
    grid-template-columns: 1fr;
  }
}

/* Small Mobile (max-width: 480px) */
@media (max-width: 480px) {
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.5rem; }
  
  .hero-title {
    font-size: 1.75rem;
  }
  
  .stat-value {
    font-size: 1.5rem;
  }
  
  .product-image {
    height: 200px;
  }

  .btn {
    width: 100%;
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .product-pricing {
    flex-direction: column;
  }

  .stat-card {
    align-items: flex-start;
  }
}

/* ===================================
   Shared Reseller Portal Responsive System
   =================================== */

.reseller-page,
.reseller-page .dashboard-layout {
  max-width: 100%;
  overflow-x: hidden;
}

.dashboard-layout .main-content > *,
.dashboard-layout .content-header,
.dashboard-layout .card,
.dashboard-layout .table-container,
.dashboard-layout .grid,
.dashboard-layout .stats-grid {
  max-width: 100%;
  min-width: 0;
}

.dashboard-layout .card-header,
.dashboard-layout .flex-between {
  min-width: 0;
}

.dashboard-layout .content-title,
.dashboard-layout .content-subtitle,
.dashboard-layout .card-title,
.dashboard-layout .product-name,
.dashboard-layout .product-code,
.dashboard-layout .stat-label,
.dashboard-layout .stat-value {
  overflow-wrap: anywhere;
}

.reseller-page .content-header-top,
.reseller-page .card-header,
.reseller-page .flex-between {
  flex-wrap: wrap;
  gap: var(--spacing-sm);
}

.reseller-page .stats-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
}

.reseller-page .stat-card,
.reseller-page .stat-content {
  min-width: 0;
}

.reseller-dashboard-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)) !important;
}

.reseller-quick-actions-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)) !important;
}

.reseller-quick-action {
  min-height: 96px;
  height: auto !important;
  text-align: center;
  white-space: normal;
}

.reseller-dashboard-page #recentOrders [style*="display: flex"],
.reseller-dashboard-page .card-body [style*="justify-content: space-between"] {
  min-width: 0;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.reseller-dashboard-page #recentOrders span,
.reseller-dashboard-page .card-body span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.reseller-featured-grid,
.products-catalog-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 245px), 1fr)) !important;
}

.portal-filters-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)) !important;
  align-items: end;
}

.portal-filters-grid-4 {
  grid-template-columns: minmax(220px, 1.35fr) repeat(3, minmax(145px, 0.85fr)) !important;
}

.reseller-orders-filters-grid {
  grid-template-columns: repeat(3, minmax(160px, 1fr)) !important;
}

.portal-filter-actions {
  flex-wrap: wrap;
  align-items: center;
}

.portal-filter-actions .btn {
  width: auto;
}

.portal-table-scroll {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

.portal-responsive-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

.portal-responsive-table th,
.portal-responsive-table td {
  padding: 0.75rem 0.65rem;
  line-height: 1.45;
  vertical-align: top;
  overflow-wrap: anywhere;
  word-break: normal;
}

.portal-responsive-table th {
  white-space: nowrap;
}

.portal-responsive-table .badge {
  white-space: normal;
}

.portal-row-action {
  min-height: 36px;
  padding: 0.4rem 0.75rem;
  white-space: nowrap;
}

.reseller-orders-table th:nth-child(1) { width: 9%; }
.reseller-orders-table th:nth-child(2) { width: 8%; }
.reseller-orders-table th:nth-child(3) { width: 16%; }
.reseller-orders-table th:nth-child(4) { width: 12%; }
.reseller-orders-table th:nth-child(5) { width: 9%; }
.reseller-orders-table th:nth-child(6) { width: 8%; }
.reseller-orders-table th:nth-child(7) { width: 8%; }
.reseller-orders-table th:nth-child(8) { width: 8%; }
.reseller-orders-table th:nth-child(9) { width: 8%; }
.reseller-orders-table th:nth-child(10) { width: 7%; }
.reseller-orders-table th:nth-child(11) { width: 7%; }

.product-card,
.product-info,
.product-actions,
.product-pricing,
.product-price-item {
  min-width: 0;
}

.product-actions .btn {
  white-space: normal;
}

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

.checkout-layout {
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr) !important;
}

.checkout-type-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)) !important;
}

.checkout-form-column,
.checkout-summary-column,
.checkout-summary-card {
  min-width: 0;
  max-width: 100%;
}

.checkout-progress-track {
  overflow-x: auto;
  padding-bottom: 0.25rem;
  -webkit-overflow-scrolling: touch;
}

.checkout-progress-item {
  min-width: 92px;
}

.checkout-page label[style*="display: flex"] {
  align-items: flex-start !important;
  gap: 0.75rem;
  min-width: 0;
}

.checkout-page label[style*="display: flex"] > div {
  min-width: 0;
  margin-left: 0 !important;
  overflow-wrap: anywhere;
}

.checkout-page #orderSummary [style*="display: flex"] {
  min-width: 0;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.checkout-page #orderSummary [style*="justify-content: space-between"] {
  align-items: flex-start;
}

.checkout-page .cod-margin-section {
  padding: 1rem;
  border: 1px solid var(--gray-border);
  border-radius: var(--radius-md);
  background: var(--gray-light);
}

.profile-tabs-card {
  overflow: hidden;
  padding: 0;
}

.profile-tabs {
  scrollbar-width: thin;
}

.profile-tabs .tab-button {
  flex: 0 0 auto;
}

.profile-payout-summary-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)) !important;
}

.product-detail-grid {
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr) !important;
}

.product-media-card,
.product-detail-card,
.product-info-grid {
  min-width: 0;
}

.product-detail-page #productDetails,
.product-detail-page #productDescription,
.product-detail-page #productHighlights {
  overflow-wrap: anywhere;
}

.product-detail-spec-grid,
.product-detail-price-grid {
  min-width: 0;
}

.product-detail-download-actions {
  flex-wrap: wrap;
}

.product-detail-download-actions .btn {
  width: auto;
}

.product-gallery-thumbs {
  grid-template-columns: repeat(auto-fit, minmax(64px, 1fr)) !important;
}

.product-gallery-thumb {
  aspect-ratio: 1;
  border: 1px solid var(--gray-border);
  border-radius: var(--radius-md);
  background: var(--gray-bg);
  cursor: pointer;
  overflow: hidden;
  padding: 0;
  transition: var(--transition-base);
}

.product-gallery-thumb.active {
  border: 2px solid var(--navy-primary);
}

.product-gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.variant-selector-card {
  min-width: 0;
}

.premium-variant-select {
  border-color: var(--navy-primary);
  background: linear-gradient(135deg, #ffffff, #f8fafc);
  font-weight: 600;
  min-height: 50px;
}

.variant-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.variant-option {
  min-width: 120px;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--gray-border);
  border-radius: var(--radius-md);
  background: var(--white);
  color: var(--navy-primary);
  cursor: pointer;
  text-align: left;
  transition: var(--transition-base);
}

.variant-option strong,
.variant-option span {
  display: block;
}

.variant-option span {
  margin-top: 0.2rem;
  color: var(--gray-text);
  font-size: 0.8rem;
}

.variant-option.active {
  border-color: var(--navy-primary);
  box-shadow: 0 0 0 2px rgba(26, 35, 50, 0.12);
  background: linear-gradient(135deg, #ffffff, #f8fafc);
}

.variant-option:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.customer-price-grid,
.share-actions {
  min-width: 0;
}

.reseller-price-note {
  padding: 0.85rem 1rem;
  border: 1px solid #dbeafe;
  border-radius: var(--radius-md);
  background: #eff6ff;
  color: #1e3a8a;
  font-size: 0.85rem;
  line-height: 1.55;
}

.image-link-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.product-lightbox {
  max-height: min(76vh, 760px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
}

.product-lightbox img {
  width: auto;
  max-width: 100%;
  max-height: 72vh;
  border-radius: var(--radius-md);
  object-fit: contain;
}

.admin-variant-header,
.admin-variant-row {
  display: grid;
  grid-template-columns: 1fr 1fr 0.8fr 0.8fr 0.8fr 0.75fr 1fr 0.75fr 0.85fr auto;
  gap: 0.5rem;
  align-items: center;
  min-width: 980px;
}

.admin-variant-header {
  margin-bottom: 0.4rem;
  color: var(--gray-text);
  font-size: 0.75rem;
  font-weight: 700;
  min-width: 0;
}

.admin-variant-list {
  display: grid;
  gap: 0.6rem;
  overflow-x: auto;
}

.admin-variant-check {
  display: flex;
  gap: 0.35rem;
  align-items: center;
  color: var(--gray-text);
  font-size: 0.8rem;
}

.admin-pricing-settings-card .card-header p {
  font-size: 0.875rem;
}

.admin-pricing-preview {
  min-height: 2.75rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--gray-border);
  border-radius: var(--radius-md);
  background: var(--gray-bg);
  color: var(--gray-text);
  font-size: 0.875rem;
}

.admin-products-page input[readonly] {
  background: #f8fafc;
  color: var(--navy-primary);
}

.admin-image-preview-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.admin-image-preview-thumb {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-border);
  background: var(--gray-bg);
}

@media (max-width: 1365px) {
  .portal-table-scroll {
    overflow-x: auto;
  }

  .reseller-orders-table {
    min-width: 960px;
  }
}

@media (max-width: 1180px) {
  .checkout-layout,
  .product-detail-grid {
    grid-template-columns: 1fr !important;
  }

  .checkout-summary-card {
    position: static !important;
  }
}

@media (max-width: 1024px) {
  .portal-filters-grid,
  .portal-filters-grid-4,
  .reseller-orders-filters-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)) !important;
  }
}

@media (max-width: 768px) {
  .reseller-page .main-content {
    flex: 1 1 auto;
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    padding: 4.25rem var(--spacing-sm) var(--spacing-sm);
  }

  .reseller-page .content-header-top,
  .reseller-page .card-header,
  .reseller-page .flex-between {
    align-items: stretch;
  }

  .portal-filter-actions {
    display: grid !important;
    grid-template-columns: 1fr;
  }

  .portal-filter-actions .btn {
    width: 100%;
  }

  .customer-price-grid {
    grid-template-columns: 1fr !important;
  }

  .product-detail-spec-grid,
  .product-detail-price-grid {
    grid-template-columns: 1fr !important;
  }

  .share-actions .btn,
  .product-detail-cta-grid .btn {
    width: 100%;
  }

  .variant-options {
    display: grid;
    grid-template-columns: 1fr;
  }

  .admin-variant-header {
    display: none;
  }

  .admin-variant-row {
    grid-template-columns: 1fr;
    min-width: 0;
    padding: 0.75rem;
    border: 1px solid var(--gray-border);
    border-radius: var(--radius-md);
    background: var(--gray-bg);
  }

  .checkout-progress-track {
    justify-content: flex-start !important;
  }

  .profile-tabs .tab-button {
    padding: 0.85rem 1rem !important;
    font-size: 0.875rem;
  }
}

@media (max-width: 640px) {
  .portal-table-scroll {
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
  }

  .portal-responsive-table,
  .portal-responsive-table thead,
  .portal-responsive-table tbody,
  .portal-responsive-table tr,
  .portal-responsive-table th,
  .portal-responsive-table td {
    display: block;
  }

  .portal-responsive-table {
    width: 100%;
    min-width: 0;
  }

  .portal-responsive-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .portal-responsive-table tbody {
    display: grid;
    gap: 0.85rem;
  }

  .portal-responsive-table tr {
    background: var(--white);
    border: 1px solid var(--gray-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 0.75rem;
  }

  .portal-responsive-table td {
    display: grid;
    grid-template-columns: 6.25rem minmax(0, 1fr);
    gap: 0.75rem;
    align-items: start;
    padding: 0.55rem 0;
    border-bottom: 1px solid var(--gray-border);
    font-size: 0.875rem;
  }

  .portal-responsive-table td::before {
    content: attr(data-label);
    color: var(--gray-text);
    font-weight: 600;
  }

  .portal-responsive-table td:last-child {
    border-bottom: none;
  }

  .portal-responsive-table td[data-label="Action"],
  .portal-responsive-table td[data-label="Actions"] {
    display: block;
  }

  .portal-responsive-table td[data-label="Action"]::before,
  .portal-responsive-table td[data-label="Actions"]::before {
    display: block;
    margin-bottom: 0.5rem;
  }

  .portal-row-action {
    width: 100%;
    min-height: 40px;
  }

  .portal-responsive-table td[colspan] {
    display: block;
    padding: 1.25rem !important;
    border-bottom: none;
    text-align: center !important;
  }

  .portal-responsive-table td[colspan]::before {
    content: none;
  }

  .reseller-page .modal-content {
    padding: 1rem !important;
    width: calc(100vw - 1.5rem) !important;
    max-width: calc(100vw - 1.5rem) !important;
    max-height: calc(100vh - 1.5rem);
    overflow-y: auto;
  }

  .reseller-page .modal-content [style*="justify-content: flex-end"] {
    display: grid !important;
    grid-template-columns: 1fr;
  }

  .reseller-page .modal-content .btn,
  .product-detail-download-actions .btn {
    width: 100%;
  }

  .checkout-page label[style*="display: flex"] {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr);
  }

  .checkout-page label[style*="display: flex"] > div:last-child {
    grid-column: 2;
    justify-self: start;
  }

  .checkout-page #orderSummary [style*="font-size: 1.25rem"] {
    font-size: 1.05rem !important;
  }

  .product-detail-spec-grid,
  .product-detail-price-grid,
  .product-info-grid {
    grid-template-columns: 1fr !important;
  }
}

/* ===================================
   Admin Orders Page Details
   =================================== */

.admin-orders-tabs {
  scrollbar-width: thin;
}

.admin-orders-tabs .tab-button {
  flex: 0 0 auto;
}

.admin-orders-filters-grid {
  grid-template-columns: minmax(240px, 1.4fr) minmax(150px, 0.8fr) minmax(150px, 0.8fr);
}

.admin-orders-table th:nth-child(1) { width: 9%; }
.admin-orders-table th:nth-child(2) { width: 8%; }
.admin-orders-table th:nth-child(3) { width: 12%; }
.admin-orders-table th:nth-child(4) { width: 11%; }
.admin-orders-table th:nth-child(5) { width: 13%; }
.admin-orders-table th:nth-child(6) { width: 9%; }
.admin-orders-table th:nth-child(7) { width: 8%; }
.admin-orders-table th:nth-child(8) { width: 8%; }
.admin-orders-table th:nth-child(9) { width: 7%; }
.admin-orders-table th:nth-child(10) { width: 7%; }
.admin-orders-table th:nth-child(11) { width: 8%; }

.admin-orders-table td:nth-child(7) .badge,
.admin-orders-table td:nth-child(9) .badge {
  white-space: nowrap;
}

@media (max-width: 1365px) {
  .admin-orders-table {
    min-width: 1000px;
  }
}

@media (max-width: 1024px) {
  .admin-orders-filters-grid {
    grid-template-columns: minmax(220px, 1fr) minmax(150px, 0.7fr) minmax(150px, 0.7fr);
  }
}

@media (max-width: 640px) {
  .admin-orders-tabs .tab-button {
    padding: 0.75rem 0.55rem !important;
    font-size: 0.875rem;
    white-space: normal !important;
    line-height: 1.25;
    text-align: center;
  }

  .admin-orders-tabs {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow-x: visible !important;
  }

  .admin-orders-tabs-card {
    overflow: hidden;
  }
}

/* ===================================
   Shared Admin Responsive System
   =================================== */

.admin-page,
.admin-page .dashboard-layout {
  max-width: 100%;
  overflow-x: hidden;
}

.admin-page .dashboard-layout {
  width: 100%;
}

.admin-page .main-content {
  flex: 0 0 calc(100% - 280px);
  width: calc(100% - 280px);
  max-width: calc(100% - 280px);
  min-width: 0;
}

.admin-page .content-header,
.admin-page .card,
.admin-page .table-container,
.admin-content-section {
  max-width: 100%;
  min-width: 0;
}

.admin-page .content-header-top,
.admin-page .card-header,
.admin-page .flex-between {
  min-width: 0;
}

.admin-page .content-header-top {
  flex-wrap: wrap;
  gap: var(--spacing-sm);
}

.admin-page .content-title,
.admin-page .content-subtitle,
.admin-page .card-title {
  overflow-wrap: anywhere;
}

.admin-dashboard-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)) !important;
}

.admin-top-products-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)) !important;
}

.admin-page .stats-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)) !important;
}

.admin-page .stat-card {
  min-width: 0;
}

.admin-page .stat-content {
  min-width: 0;
}

.admin-page .stat-value {
  overflow-wrap: anywhere;
}

.admin-filters-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr));
  align-items: end;
}

.admin-filters-grid-4 {
  grid-template-columns: minmax(220px, 1.25fr) repeat(3, minmax(145px, 0.85fr));
}

.admin-filter-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

.admin-filter-actions .btn {
  width: auto;
}

.admin-filter-actions .admin-bulk-action {
  margin-left: auto !important;
}

.admin-table-scroll {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

.admin-responsive-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

.admin-responsive-table th,
.admin-responsive-table td {
  padding: 0.75rem 0.65rem;
  line-height: 1.45;
  vertical-align: top;
  overflow-wrap: anywhere;
  word-break: normal;
}

.admin-responsive-table th {
  white-space: nowrap;
}

.admin-row-actions,
.admin-order-actions {
  flex-wrap: wrap;
  align-items: flex-start;
}

.admin-row-actions .btn,
.admin-order-actions .btn {
  min-height: 36px;
  padding: 0.4rem 0.65rem;
  font-size: 0.78rem;
  white-space: nowrap;
}

.admin-products-table th:nth-child(1) { width: 9%; }
.admin-products-table th:nth-child(2) { width: 6%; }
.admin-products-table th:nth-child(3) { width: 15%; }
.admin-products-table th:nth-child(4) { width: 8%; }
.admin-products-table th:nth-child(5) { width: 7%; }
.admin-products-table th:nth-child(6) { width: 7%; }
.admin-products-table th:nth-child(7) { width: 8%; }
.admin-products-table th:nth-child(8) { width: 9%; }
.admin-products-table th:nth-child(9) { width: 9%; }
.admin-products-table th:nth-child(10) { width: 7%; }
.admin-products-table th:nth-child(11) { width: 7%; }
.admin-products-table th:nth-child(12) { width: 8%; }

.admin-payouts-table th:nth-child(1) { width: 4%; }
.admin-payouts-table th:nth-child(2) { width: 9%; }
.admin-payouts-table th:nth-child(3) { width: 12%; }
.admin-payouts-table th:nth-child(4) { width: 10%; }
.admin-payouts-table th:nth-child(5) { width: 9%; }
.admin-payouts-table th:nth-child(6) { width: 10%; }
.admin-payouts-table th:nth-child(7) { width: 9%; }
.admin-payouts-table th:nth-child(8) { width: 9%; }
.admin-payouts-table th:nth-child(9) { width: 8%; }
.admin-payouts-table th:nth-child(10) { width: 8%; }
.admin-payouts-table th:nth-child(11) { width: 12%; }

.admin-applications-table th:nth-child(1) { width: 8%; }
.admin-applications-table th:nth-child(2) { width: 12%; }
.admin-applications-table th:nth-child(3) { width: 13%; }
.admin-applications-table th:nth-child(4) { width: 10%; }
.admin-applications-table th:nth-child(5) { width: 10%; }
.admin-applications-table th:nth-child(6) { width: 14%; }
.admin-applications-table th:nth-child(7) { width: 10%; }
.admin-applications-table th:nth-child(8) { width: 8%; }
.admin-applications-table th:nth-child(9) { width: 7%; }
.admin-applications-table th:nth-child(10) { width: 8%; }

.admin-products-page .modal-overlay,
.admin-payouts-page .modal-overlay,
.admin-dashboard-page .modal-overlay {
  padding: 1rem;
}

.admin-page .modal-content {
  width: min(760px, calc(100vw - 2rem)) !important;
  max-width: calc(100vw - 2rem) !important;
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
}

.admin-page .modal-content form .grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
}

.admin-page .modal-content .btn {
  width: auto;
}

.admin-page .modal-content [style*="justify-content: flex-end"] {
  flex-wrap: wrap;
}

.admin-products-page #productImagePreview {
  flex-wrap: wrap;
  min-width: 0;
}

@media (max-width: 1365px) {
  .admin-table-scroll {
    overflow-x: auto;
  }

  .admin-products-table,
  .admin-payouts-table {
    min-width: 1080px;
  }

  .admin-applications-table {
    min-width: 980px;
  }
}

@media (max-width: 1024px) {
  .admin-page .main-content {
    flex-basis: calc(100% - 250px);
    width: calc(100% - 250px);
    max-width: calc(100% - 250px);
  }

  .admin-filters-grid,
  .admin-filters-grid-4,
  .admin-pricing-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr));
  }
}

@media (max-width: 768px) {
  .admin-page .main-content {
    flex: 1 1 auto;
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    padding: 4.25rem var(--spacing-sm) var(--spacing-sm);
  }

  .admin-page .content-header-top {
    align-items: stretch;
  }

  .admin-page .content-header-top .btn {
    width: 100%;
  }

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

  .admin-filter-actions .btn,
  .admin-pricing-actions .btn,
  .admin-filter-actions .admin-bulk-action {
    width: 100%;
    margin-left: 0 !important;
  }

  .admin-pricing-actions {
    display: grid !important;
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .admin-table-scroll {
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
  }

  .admin-responsive-table,
  .admin-responsive-table thead,
  .admin-responsive-table tbody,
  .admin-responsive-table tr,
  .admin-responsive-table th,
  .admin-responsive-table td {
    display: block;
  }

  .admin-responsive-table {
    width: 100%;
    min-width: 0;
  }

  .admin-responsive-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .admin-responsive-table tbody {
    display: grid;
    gap: 0.85rem;
  }

  .admin-responsive-table tr {
    background: var(--white);
    border: 1px solid var(--gray-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 0.75rem;
  }

  .admin-responsive-table td {
    display: grid;
    grid-template-columns: 7rem minmax(0, 1fr);
    gap: 0.75rem;
    align-items: start;
    padding: 0.55rem 0;
    border-bottom: 1px solid var(--gray-border);
    font-size: 0.875rem;
  }

  .admin-responsive-table td::before {
    content: attr(data-label);
    color: var(--gray-text);
    font-weight: 600;
  }

  .admin-responsive-table td:last-child {
    border-bottom: none;
  }

  .admin-responsive-table td[data-label="Image"] {
    align-items: center;
  }

  .admin-responsive-table td[data-label="Actions"] {
    display: block;
  }

  .admin-responsive-table td[data-label="Actions"]::before {
    display: block;
    margin-bottom: 0.5rem;
  }

  .admin-row-actions,
  .admin-order-actions {
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 0.5rem !important;
  }

  .admin-row-actions .btn,
  .admin-order-actions .btn {
    width: 100%;
    min-height: 40px;
  }

  .admin-responsive-table td[colspan] {
    display: block;
    padding: 1.25rem !important;
    border-bottom: none;
    text-align: center !important;
  }

  .admin-responsive-table td[colspan]::before {
    content: none;
  }

  .admin-page .modal-content {
    padding: 1rem !important;
    width: calc(100vw - 1.5rem) !important;
    max-width: calc(100vw - 1.5rem) !important;
  }

  .admin-page .modal-content [style*="justify-content: flex-end"] {
    display: grid !important;
    grid-template-columns: 1fr;
  }

  .admin-page .modal-content .btn {
    width: 100%;
  }
}

/* Print Styles */
@media print {
  .navbar,
  .sidebar,
  .footer,
  .btn,
  .mobile-menu-toggle {
    display: none !important;
  }
  
  .main-content {
    margin-left: 0;
  }
  
  body {
    background: white;
  }
}
