/**
 * ShelfLife Pro - Premium Dark Theme
 * Inspired by WHOOP's minimalist, data-forward aesthetic
 *
 * Design Principles:
 * - Dark backgrounds with subtle depth
 * - Clean, bold typography
 * - Strategic accent colors (teal/emerald for positive, amber for warnings)
 * - Soft shadows and rounded corners
 * - Generous whitespace
 * - Focus on data visualization
 */

/* ============================================
   CSS VARIABLES - Design Tokens
   ============================================ */
:root {
  /* Background Colors - Layered depth */
  --bg-primary: #0a0a0a;
  --bg-secondary: #111111;
  --bg-tertiary: #1a1a1a;
  --bg-card: #141414;
  --bg-card-hover: #1c1c1c;
  --bg-input: #0d0d0d;
  --bg-modal: rgba(0, 0, 0, 0.95);

  /* Text Colors */
  --text-primary: #ffffff;
  --text-secondary: #a3a3a3;
  --text-tertiary: #6b6b6b;
  --text-muted: #404040;

  /* Accent Colors - WHOOP-inspired */
  --accent-primary: #00d4aa;      /* Teal - primary actions */
  --accent-primary-hover: #00f5c4;
  --accent-secondary: #3b82f6;    /* Blue - info/links */
  --accent-success: #22c55e;      /* Green - success/positive */
  --accent-warning: #f59e0b;      /* Amber - warnings */
  --accent-danger: #ef4444;       /* Red - errors/destructive */
  --accent-purple: #a855f7;       /* Purple - special highlights */

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #00d4aa 0%, #00a88a 100%);
  --gradient-card: linear-gradient(180deg, #1a1a1a 0%, #141414 100%);
  --gradient-glow: radial-gradient(circle at center, rgba(0, 212, 170, 0.15) 0%, transparent 70%);

  /* Borders */
  --border-color: #2a2a2a;
  --border-color-light: #333333;
  --border-radius-sm: 8px;
  --border-radius-md: 12px;
  --border-radius-lg: 16px;
  --border-radius-xl: 24px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 20px rgba(0, 212, 170, 0.3);

  /* Typography */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-normal: 250ms ease;
  --transition-slow: 350ms ease;
}

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

body.premium-theme {
  font-family: var(--font-family);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
.premium-theme h1,
.premium-theme h2,
.premium-theme h3,
.premium-theme h4,
.premium-theme h5,
.premium-theme h6 {
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.premium-theme h1 { font-size: 2.5rem; }
.premium-theme h2 { font-size: 1.75rem; }
.premium-theme h3 { font-size: 1.25rem; }
.premium-theme h4 { font-size: 1rem; }

.premium-theme .text-gradient {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.premium-theme .text-secondary { color: var(--text-secondary); }
.premium-theme .text-muted { color: var(--text-tertiary); }
.premium-theme .text-accent { color: var(--accent-primary); }
.premium-theme .text-success { color: var(--accent-success); }
.premium-theme .text-warning { color: var(--accent-warning); }
.premium-theme .text-danger { color: var(--accent-danger); }

.premium-theme .font-mono { font-family: var(--font-mono); }

/* ============================================
   NAVIGATION - Premium Style
   ============================================ */
.premium-nav {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.premium-nav-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: var(--space-md) var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.premium-nav-brand {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.premium-nav-brand span {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.premium-nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.premium-nav-link {
  padding: var(--space-sm) var(--space-md);
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.875rem;
  border-radius: var(--border-radius-sm);
  transition: all var(--transition-fast);
}

.premium-nav-link:hover {
  color: var(--text-primary);
  background: var(--bg-tertiary);
}

.premium-nav-link.active {
  color: var(--accent-primary);
  background: rgba(0, 212, 170, 0.1);
}

.premium-nav-dropdown {
  position: relative;
}

.premium-nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: var(--space-sm);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-lg);
}

.premium-nav-dropdown:hover .premium-nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(4px);
}

.premium-nav-dropdown-item {
  display: block;
  padding: var(--space-sm) var(--space-md);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  border-radius: var(--border-radius-sm);
  transition: all var(--transition-fast);
}

.premium-nav-dropdown-item:hover {
  color: var(--text-primary);
  background: var(--bg-tertiary);
}

.premium-nav-user {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.premium-nav-user-info {
  text-align: right;
}

.premium-nav-user-name {
  font-weight: 500;
  font-size: 0.875rem;
  color: var(--text-primary);
}

.premium-nav-user-role {
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

/* ============================================
   CARDS - Premium Style
   ============================================ */
.premium-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: var(--space-lg);
  transition: all var(--transition-normal);
}

.premium-card:hover {
  border-color: var(--border-color-light);
  box-shadow: var(--shadow-md);
}

.premium-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--border-color);
}

.premium-card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.premium-card-subtitle {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  margin-top: 2px;
}

/* Stat Cards */
.premium-stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: var(--space-lg);
  position: relative;
  overflow: hidden;
}

.premium-stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.premium-stat-card:hover::before {
  opacity: 1;
}

.premium-stat-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-tertiary);
  margin-bottom: var(--space-sm);
}

.premium-stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-mono);
}

.premium-stat-value.positive { color: var(--accent-success); }
.premium-stat-value.negative { color: var(--accent-danger); }
.premium-stat-value.accent { color: var(--accent-primary); }

.premium-stat-change {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  font-weight: 500;
  margin-top: var(--space-sm);
  padding: 2px 8px;
  border-radius: 100px;
}

.premium-stat-change.up {
  color: var(--accent-success);
  background: rgba(34, 197, 94, 0.1);
}

.premium-stat-change.down {
  color: var(--accent-danger);
  background: rgba(239, 68, 68, 0.1);
}

/* ============================================
   BUTTONS - Premium Style
   ============================================ */
.premium-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-lg);
  font-family: var(--font-family);
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--border-radius-md);
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
}

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

.premium-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-glow);
}

.premium-btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.premium-btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-color-light);
}

.premium-btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}

.premium-btn-ghost:hover {
  color: var(--text-primary);
  background: var(--bg-tertiary);
}

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

.premium-btn-danger:hover {
  background: #dc2626;
}

.premium-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

.premium-btn-lg {
  padding: var(--space-md) var(--space-xl);
  font-size: 1rem;
}

.premium-btn-sm {
  padding: 6px var(--space-md);
  font-size: 0.75rem;
}

.premium-btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: var(--border-radius-sm);
}

/* ============================================
   FORM INPUTS - Premium Style
   ============================================ */
.premium-input {
  width: 100%;
  padding: var(--space-md);
  font-family: var(--font-family);
  font-size: 0.875rem;
  color: var(--text-primary);
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  transition: all var(--transition-fast);
}

.premium-input:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(0, 212, 170, 0.1);
}

.premium-input::placeholder {
  color: var(--text-tertiary);
}

/* Date Input - Fix calendar icon visibility on dark theme */
input[type="date"].premium-input,
input[type="datetime-local"].premium-input,
input[type="time"].premium-input {
  color-scheme: dark;
  position: relative;
}

/* Chrome/Safari/Edge - Replace invisible icon with custom white calendar */
input[type="date"].premium-input::-webkit-calendar-picker-indicator,
input[type="datetime-local"].premium-input::-webkit-calendar-picker-indicator,
input[type="time"].premium-input::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 1;
  width: 20px;
  height: 20px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23a3a3a3' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='16' y1='2' x2='16' y2='6'%3E%3C/line%3E%3Cline x1='8' y1='2' x2='8' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='10' x2='21' y2='10'%3E%3C/line%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  transition: opacity var(--transition-fast);
}

input[type="date"].premium-input::-webkit-calendar-picker-indicator:hover,
input[type="datetime-local"].premium-input::-webkit-calendar-picker-indicator:hover,
input[type="time"].premium-input::-webkit-calendar-picker-indicator:hover {
  opacity: 1;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2300d4aa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='16' y1='2' x2='16' y2='6'%3E%3C/line%3E%3Cline x1='8' y1='2' x2='8' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='10' x2='21' y2='10'%3E%3C/line%3E%3C/svg%3E");
}

/* Firefox date input fix */
input[type="date"].premium-input::-moz-calendar-picker-indicator {
  filter: invert(1);
}

.premium-input-lg {
  padding: var(--space-lg);
  font-size: 1rem;
}

.premium-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%236b6b6b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-md) center;
  background-size: 16px;
  padding-right: 48px;
}

.premium-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-tertiary);
  margin-bottom: var(--space-sm);
}

/* ============================================
   TABLES - Premium Style
   ============================================ */
.premium-table {
  width: 100%;
  border-collapse: collapse;
}

.premium-table th {
  padding: var(--space-md);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-tertiary);
  text-align: left;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
}

.premium-table td {
  padding: var(--space-md);
  font-size: 0.875rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-color);
}

.premium-table tr:hover td {
  background: var(--bg-tertiary);
}

.premium-table .text-right { text-align: right; }
.premium-table .text-center { text-align: center; }

/* ============================================
   BADGES - Premium Style
   ============================================ */
.premium-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  border-radius: 100px;
}

.premium-badge-success {
  background: rgba(34, 197, 94, 0.15);
  color: var(--accent-success);
}

.premium-badge-warning {
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-warning);
}

.premium-badge-danger {
  background: rgba(239, 68, 68, 0.15);
  color: var(--accent-danger);
}

.premium-badge-info {
  background: rgba(59, 130, 246, 0.15);
  color: var(--accent-secondary);
}

.premium-badge-neutral {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
}

/* ============================================
   MODALS - Premium Style
   ============================================ */
.premium-modal-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-modal);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
}

.premium-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.premium-modal {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-xl);
  padding: var(--space-xl);
  max-width: 480px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.95) translateY(20px);
  transition: transform var(--transition-normal);
}

.premium-modal-overlay.active .premium-modal {
  transform: scale(1) translateY(0);
}

.premium-modal-header {
  margin-bottom: var(--space-lg);
}

.premium-modal-title {
  font-size: 1.5rem;
  font-weight: 700;
}

.premium-modal-close {
  position: absolute;
  top: var(--space-lg);
  right: var(--space-lg);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-tertiary);
  border: none;
  border-radius: var(--border-radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.premium-modal-close:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

/* ============================================
   PRODUCT GRID - POS Style
   ============================================ */
.premium-product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: var(--space-md);
}

.premium-product-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.premium-product-card:hover {
  border-color: var(--accent-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.premium-product-card.out-of-stock {
  opacity: 0.4;
  cursor: not-allowed;
}

.premium-product-card.out-of-stock:hover {
  transform: none;
  border-color: var(--border-color);
}

.premium-product-image {
  aspect-ratio: 1;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
}

.premium-product-info {
  padding: var(--space-md);
}

.premium-product-name {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.premium-product-category {
  font-size: 0.7rem;
  color: var(--text-tertiary);
  margin-bottom: var(--space-sm);
}

.premium-product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.premium-product-price {
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent-primary);
  font-family: var(--font-mono);
}

.premium-product-stock {
  font-size: 0.65rem;
  font-weight: 500;
}

.premium-product-stock.in-stock { color: var(--accent-success); }
.premium-product-stock.low-stock { color: var(--accent-warning); }
.premium-product-stock.out { color: var(--accent-danger); }

/* ============================================
   CART - POS Style
   ============================================ */
.premium-cart {
  background: var(--bg-card);
  border-left: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.premium-cart-header {
  padding: var(--space-lg);
  border-bottom: 1px solid var(--border-color);
}

.premium-cart-items {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-md);
}

.premium-cart-item {
  display: flex;
  gap: var(--space-md);
  padding: var(--space-md);
  background: var(--bg-secondary);
  border-radius: var(--border-radius-md);
  margin-bottom: var(--space-sm);
}

.premium-cart-item-info {
  flex: 1;
}

.premium-cart-item-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
}

.premium-cart-item-price {
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

.premium-cart-item-qty {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  background: var(--bg-tertiary);
  border-radius: var(--border-radius-sm);
  padding: 2px;
}

.premium-cart-item-qty button {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: 4px;
  transition: all var(--transition-fast);
}

.premium-cart-item-qty button:hover {
  background: var(--bg-card);
  color: var(--text-primary);
}

.premium-cart-item-qty span {
  min-width: 24px;
  text-align: center;
  font-weight: 600;
}

.premium-cart-item-total {
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--accent-primary);
}

.premium-cart-footer {
  padding: var(--space-lg);
  border-top: 1px solid var(--border-color);
  background: var(--bg-secondary);
}

.premium-cart-totals {
  margin-bottom: var(--space-lg);
}

.premium-cart-total-row {
  display: flex;
  justify-content: space-between;
  padding: var(--space-sm) 0;
  font-size: 0.875rem;
}

.premium-cart-total-row.grand {
  font-size: 1.25rem;
  font-weight: 700;
  padding-top: var(--space-md);
  border-top: 1px solid var(--border-color);
  margin-top: var(--space-sm);
}

.premium-cart-total-row.grand .value {
  color: var(--accent-primary);
  font-family: var(--font-mono);
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.animate-slide-in {
  animation: slideIn 0.3s ease-out;
}

.animate-fade-in {
  animation: fadeIn 0.3s ease-out;
}

.animate-pulse {
  animation: pulse 2s infinite;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.premium-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.premium-grid {
  display: grid;
  gap: var(--space-lg);
}

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

@media (max-width: 768px) {
  .premium-grid-2,
  .premium-grid-3,
  .premium-grid-4 {
    grid-template-columns: 1fr;
  }
}

.premium-flex {
  display: flex;
  align-items: center;
}

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

.premium-gap-sm { gap: var(--space-sm); }
.premium-gap-md { gap: var(--space-md); }
.premium-gap-lg { gap: var(--space-lg); }

.premium-mt-sm { margin-top: var(--space-sm); }
.premium-mt-md { margin-top: var(--space-md); }
.premium-mt-lg { margin-top: var(--space-lg); }

.premium-mb-sm { margin-bottom: var(--space-sm); }
.premium-mb-md { margin-bottom: var(--space-md); }
.premium-mb-lg { margin-bottom: var(--space-lg); }

.premium-p-md { padding: var(--space-md); }
.premium-p-lg { padding: var(--space-lg); }

/* Scrollbar styling */
.premium-theme ::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.premium-theme ::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

.premium-theme ::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

.premium-theme ::-webkit-scrollbar-thumb:hover {
  background: var(--border-color-light);
}

/* ============================================
   MOBILE RESPONSIVE - Premium Tables to Cards
   ============================================ */
@media (max-width: 768px) {
  /* Navigation - Mobile */
  .premium-nav-links {
    display: none;
  }

  .premium-nav-inner {
    padding: var(--space-sm) var(--space-md);
  }

  .premium-nav-brand {
    font-size: 1.25rem;
  }

  .premium-nav-user-info {
    display: none;
  }

  /* Table to Cards Transform */
  .premium-table thead {
    display: none;
  }

  .premium-table,
  .premium-table tbody,
  .premium-table tr {
    display: block;
    width: 100%;
  }

  .premium-table tbody tr {
    margin-bottom: var(--space-md);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: var(--space-md);
    background: var(--bg-card);
  }

  .premium-table tbody tr td {
    display: flex;
    justify-content: space-between;
    padding: var(--space-sm) 0;
    border: none !important;
    text-align: right;
  }

  .premium-table tbody tr td:before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--text-tertiary);
    text-align: left;
    flex: 1;
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.05em;
  }

  .premium-table tbody tr td:last-child {
    justify-content: center;
    gap: var(--space-sm);
    padding-top: var(--space-md);
    border-top: 1px solid var(--border-color) !important;
    margin-top: var(--space-sm);
  }

  .premium-table tbody tr td:last-child:before {
    display: none;
  }

  /* Grid adjustments */
  .premium-grid-2,
  .premium-grid-3,
  .premium-grid-4 {
    grid-template-columns: 1fr;
  }

  /* Stat cards stack */
  .premium-stat-card {
    padding: var(--space-md);
  }

  .premium-stat-value {
    font-size: 1.5rem;
  }

  /* Main content padding for fixed nav */
  .premium-main {
    padding-top: 70px;
  }

  /* Buttons full width on mobile */
  .premium-btn-mobile-full {
    width: 100%;
  }

  /* Modal adjustments */
  .premium-modal {
    width: 95%;
    padding: var(--space-lg);
  }
}

/* Mobile Navigation Menu */
.premium-mobile-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: var(--space-sm) 0;
  z-index: 1000;
  display: none;
}

@media (max-width: 768px) {
  .premium-mobile-nav {
    display: block;
  }

  body.premium-theme {
    padding-bottom: 70px;
  }
}

.premium-mobile-nav-inner {
  display: flex;
  justify-content: space-around;
  align-items: center;
}

.premium-mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: var(--space-xs) var(--space-sm);
  color: var(--text-tertiary);
  text-decoration: none;
  font-size: 0.65rem;
  font-weight: 500;
  transition: all var(--transition-fast);
}

.premium-mobile-nav-item:hover,
.premium-mobile-nav-item.active {
  color: var(--accent-primary);
}

.premium-mobile-nav-item svg,
.premium-mobile-nav-item span.icon {
  width: 24px;
  height: 24px;
  font-size: 1.25rem;
}

/* Main content area */
.premium-main {
  padding: var(--space-lg);
  padding-top: calc(60px + var(--space-lg));
  min-height: 100vh;
}

/* Page header */
.premium-page-header {
  margin-bottom: var(--space-xl);
}

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

.premium-page-subtitle {
  font-size: 0.875rem;
  color: var(--text-tertiary);
}

/* Loading spinner */
.premium-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border-color);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* Toast notifications */
.premium-toast {
  position: fixed;
  bottom: var(--space-lg);
  right: var(--space-lg);
  padding: var(--space-md) var(--space-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  color: var(--text-primary);
  font-size: 0.875rem;
  box-shadow: var(--shadow-lg);
  transform: translateY(100px);
  opacity: 0;
  transition: all var(--transition-normal);
  z-index: 3000;
}

.premium-toast.show {
  transform: translateY(0);
  opacity: 1;
}

.premium-toast.success {
  border-color: var(--accent-success);
}

.premium-toast.error {
  border-color: var(--accent-danger);
}

@media (max-width: 768px) {
  .premium-toast {
    left: var(--space-md);
    right: var(--space-md);
    bottom: 80px;
  }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

/* Hide elements */
.hidden {
  display: none !important;
}

/* Visually hidden but accessible */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
