/* ================================================
   LUBRICENTRO CH - Professional Corporate Theme
   Color Palette: Blues + Neutral Grays
   ================================================ */

:root {
  /* Primary Colors */
  --primary-50: #eff6ff;
  --primary-100: #dbeafe;
  --primary-200: #bfdbfe;
  --primary-300: #93c5fd;
  --primary-400: #60a5fa;
  --primary-500: #3b82f6;
  --primary-600: #2563eb;
  --primary-700: #1d4ed8;
  --primary-800: #1e40af;
  --primary-900: #1e3a8a;
  
  /* Neutral Colors */
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;
  
  /* Semantic Colors */
  --success: #10b981;
  --success-light: #d1fae5;
  --warning: #f59e0b;
  --warning-light: #fef3c7;
  --danger: #ef4444;
  --danger-light: #fee2e2;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  
  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  
  /* Transitions */
  --transition: all 0.2s ease;
}

/* ================================================
   BASE STYLES
   ================================================ */

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background-color: var(--gray-100);
  color: var(--gray-800);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ================================================
   LAYOUT - WRAPPER
   ================================================ */

.wrapper {
  display: flex;
  width: 100%;
  min-height: 100vh;
}

/* ================================================
   SIDEBAR
   ================================================ */

#sidebar {
  width: 280px;
  min-width: 280px;
  background: linear-gradient(180deg, var(--primary-900) 0%, var(--primary-800) 100%);
  color: white;
  transition: var(--transition);
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 1000;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
}

#sidebar.active {
  margin-left: -280px;
}

/* Sidebar Header */
.sidebar-header {
  padding: 1.75rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.1);
}

.sidebar-header h3 {
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin: 0;
  color: white;
}

/* User Session Info */
#sidebar .list-unstyled.components > p {
  padding: 1rem 1.5rem;
  margin: 0;
  font-size: 0.8125rem;
  color: var(--primary-200);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-weight: 500;
}

/* Navigation Links */
#sidebar ul.components {
  padding: 0.75rem 0;
  list-style: none;
}

#sidebar ul li {
  margin: 0.125rem 0.75rem;
}

#sidebar ul li a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  color: var(--primary-100);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
  border-radius: var(--radius);
  transition: var(--transition);
}

#sidebar ul li a i {
  width: 1.25rem;
  text-align: center;
  font-size: 1rem;
  opacity: 0.85;
}

#sidebar ul li a:hover {
  background: rgba(255, 255, 255, 0.12);
  color: white;
  transform: translateX(4px);
}

#sidebar ul li.active > a {
  background: var(--primary-500);
  color: white;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

/* Sidebar CTAs (Logout) */
ul.CTAs {
  padding: 1rem 0.75rem;
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

ul.CTAs .btn-danger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
  border-radius: var(--radius);
  font-weight: 500;
  transition: var(--transition);
}

ul.CTAs .btn-danger:hover {
  background: var(--danger);
  border-color: var(--danger);
  color: white;
}

/* ================================================
   MAIN CONTENT
   ================================================ */

#content {
  width: calc(100% - 280px);
  margin-left: 280px;
  min-height: 100vh;
  transition: var(--transition);
  background: var(--gray-100);
}

#content.active {
  width: 100%;
  margin-left: 0;
}

/* ================================================
   TOP NAVBAR
   ================================================ */

.navbar {
  background: white !important;
  padding: 1rem 1.5rem;
  box-shadow: var(--shadow);
  border-bottom: 1px solid var(--gray-200);
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar .container-fluid {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ================================================
   BUTTONS
   ================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn i {
  font-size: 0.9375rem;
}

/* Primary Button */
.btn-primary {
  background: var(--primary-600);
  color: white;
  box-shadow: 0 1px 2px rgba(37, 99, 235, 0.2);
}

.btn-primary:hover {
  background: var(--primary-700);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* Success Button */
.btn-success {
  background: var(--success);
  color: white;
  box-shadow: 0 1px 2px rgba(16, 185, 129, 0.2);
}

.btn-success:hover {
  background: #059669;
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* Warning Button */
.btn-warning {
  background: var(--warning);
  color: white;
  box-shadow: 0 1px 2px rgba(245, 158, 11, 0.2);
}

.btn-warning:hover {
  background: #d97706;
  color: white;
  transform: translateY(-1px);
}

/* Small Button */
.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
}

/* ================================================
   CARDS
   ================================================ */

.card {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card-header {
  padding: 1rem 1.25rem;
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
  font-weight: 600;
}

.card-header h5,
.card-header h6 {
  margin: 0;
  font-weight: 600;
  color: var(--gray-800);
}

.card-body {
  padding: 1.25rem;
}

/* Card with colored left border */
.border-left-primary {
  border-left: 4px solid var(--primary-500) !important;
}

.border-left-success {
  border-left: 4px solid var(--success) !important;
}

.border-left-warning {
  border-left: 4px solid var(--warning) !important;
}

.border-left-danger {
  border-left: 4px solid var(--danger) !important;
}

/* ================================================
   STAT CARDS
   ================================================ */

.stat-card {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  transition: var(--transition);
  overflow: hidden;
  position: relative;
  padding-right: 5.5rem;      /* espacio reservado para el ícono */
  display: flex;
  flex-direction: column;
}

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

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

.stat-card.success::before {
  background: var(--success);
}

.stat-card.warning::before {
  background: var(--warning);
}

.stat-card .stat-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gray-500);
  margin-bottom: 0.5rem;
}

.stat-card .stat-value {
  white-space: nowrap;        /* siempre una sola línea */
  font-size: clamp(1.1rem, 2.3vw, 1.75rem);
  font-weight: 700;
  line-height: 1.1;
  max-width: calc(100% - 5.5rem); /* no invade el ícono */
}



.stat-card .stat-icon {
  opacity: 0.2;
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-100);
  color: var(--primary-600);
  border-radius: var(--radius);
  font-size: 1.25rem;
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
}

.stat-card.success .stat-icon {
  background: var(--success-light);
  color: var(--success);
}

.stat-card.success .stat-label {
  color: var(--success);
}

/* ================================================
   ALERTS
   ================================================ */

.alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  margin-bottom: 1rem;
  font-size: 0.9375rem;
}

.alert-warning {
  background: var(--warning-light);
  border-color: #fcd34d;
  color: #92400e;
}

.alert-danger {
  background: var(--danger-light);
  border-color: #fca5a5;
  color: #991b1b;
}

.alert-success {
  background: var(--success-light);
  border-color: #6ee7b7;
  color: #065f46;
}

/* Custom Alert Box */
.notification-alert {
  background: white;
  border: 1px solid var(--gray-200);
  border-left: 4px solid var(--warning);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow);
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.notification-alert .alert-icon {
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--warning-light);
  color: var(--warning);
  border-radius: var(--radius);
  font-size: 1.125rem;
  flex-shrink: 0;
}

.notification-alert .alert-content {
  flex: 1;
}

.notification-alert .alert-title {
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 0.25rem;
}

.notification-alert .alert-items {
  font-size: 0.875rem;
  color: var(--gray-600);
}

.notification-alert .alert-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

/* ================================================
   CHARTS
   ================================================ */

.chart-card {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.chart-card .chart-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--gray-200);
  background: var(--gray-50);
}

.chart-card .chart-header h5 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--gray-800);
}

.chart-card .chart-body {
  padding: 1.5rem;
}

/* ================================================
   PAGE HEADER
   ================================================ */

.page-header {
  margin-bottom: 1.5rem;
}

.page-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gray-900);
  margin: 0;
}

.page-header .breadcrumb {
  font-size: 0.875rem;
  color: var(--gray-500);
}

/* ================================================
   BRANCH SELECTOR
   ================================================ */

.branch-selector {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.branch-selector .btn {
  background: var(--gray-100);
  color: var(--gray-700);
  border: 1px solid var(--gray-300);
}

.branch-selector .btn:hover,
.branch-selector .btn.active {
  background: var(--primary-600);
  color: white;
  border-color: var(--primary-600);
}

/* ================================================
   CONTAINER & SPACING
   ================================================ */

.container,
.container-fluid {
  padding: 0 1.5rem;
}

.content-wrapper {
  padding: 1.5rem;
}

.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 2rem; }
.mb-2 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1.5rem; }
.pt-4 { padding-top: 1.5rem; }

/* ================================================
   GRID SYSTEM ENHANCEMENTS
   ================================================ */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

/* ================================================
   LAST ORDER CARD
   ================================================ */

.last-order-card {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  max-width: 400px;
}

.last-order-card .card-header {
  background: var(--gray-800);
  color: white;
  padding: 1rem 1.25rem;
  border-bottom: none;
}

.last-order-card .card-header h6 {
  color: white;
  font-weight: 600;
  margin: 0;
}

.last-order-card .card-body {
  padding: 1.25rem;
}

.last-order-card .order-detail {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--gray-100);
  font-size: 0.9375rem;
}

.last-order-card .order-detail:last-of-type {
  border-bottom: none;
}

.last-order-card .order-detail strong {
  color: var(--gray-500);
  font-weight: 500;
}

.last-order-card .order-detail span {
  color: var(--gray-800);
  font-weight: 600;
}

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

.text-primary { color: var(--primary-600) !important; }
.text-success { color: var(--success) !important; }
.text-warning { color: var(--warning) !important; }
.text-danger { color: var(--danger) !important; }
.text-muted { color: var(--gray-500) !important; }
.text-dark { color: var(--gray-800) !important; }

.bg-primary { background-color: var(--primary-600) !important; }
.bg-success { background-color: var(--success) !important; }
.bg-warning { background-color: var(--warning) !important; }

.font-weight-bold { font-weight: 700 !important; }
.text-xs { font-size: 0.75rem !important; }
.text-uppercase { text-transform: uppercase !important; }

.shadow { box-shadow: var(--shadow) !important; }
.shadow-sm { box-shadow: var(--shadow-sm) !important; }

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

@media (max-width: 992px) {
  #sidebar {
    margin-left: -280px;
  }
  
  #sidebar.active {
    margin-left: 0;
  }
  
  #content {
    width: 100%;
    margin-left: 0;
  }
  
  #content.active {
    width: calc(100% - 280px);
    margin-left: 280px;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .navbar .container-fluid {
    justify-content: space-between;
  }
  
  .branch-selector {
    width: 100%;
    justify-content: center;
  }
  
  .content-wrapper {
    padding: 1rem;
  }
}

/* ================================================
   SCROLLBAR CUSTOM
   ================================================ */

#sidebar::-webkit-scrollbar {
  width: 6px;
}

#sidebar::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
}

#sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

#sidebar::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* ================================================
   ANIMATIONS
   ================================================ */

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

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

/* Staggered animation for cards */
.stats-grid > * {
  animation: fadeIn 0.4s ease-out forwards;
}

.stats-grid > *:nth-child(1) { animation-delay: 0.05s; }
.stats-grid > *:nth-child(2) { animation-delay: 0.1s; }
.stats-grid > *:nth-child(3) { animation-delay: 0.15s; }
.stats-grid > *:nth-child(4) { animation-delay: 0.2s; }

/* ================================================
   TOP ACTION BAR
   ================================================ */

.top-action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  background: white;
  border-bottom: 1px solid var(--gray-200);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.action-bar-left,
.action-bar-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn-menu-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  background: var(--gray-100);
  color: var(--gray-700);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.btn-menu-toggle:hover {
  background: var(--gray-200);
  color: var(--gray-900);
}

.btn-action {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius);
  text-decoration: none;
  transition: var(--transition);
  border: none;
  cursor: pointer;
}

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

.btn-action-success:hover {
  background: #059669;
  color: white;
  transform: translateY(-1px);
}

.btn-action-secondary {
  background: var(--primary-100);
  color: var(--primary-700);
}

.btn-action-secondary:hover {
  background: var(--primary-200);
  color: var(--primary-800);
}

.btn-action-outline {
  background: white;
  color: var(--gray-700);
  border: 1px solid var(--gray-300);
}

.btn-action-outline:hover {
  background: var(--gray-50);
  color: var(--gray-900);
  border-color: var(--gray-400);
}

/* ================================================
   PAGE HEADER ENHANCED
   ================================================ */

.page-header {
  padding: 1.5rem;
  background: white;
  border-bottom: 1px solid var(--gray-200);
  margin-bottom: 0;
}

.page-header-content {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.page-title-section {
  flex: 1;
}

.breadcrumb-pro {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--gray-500);
  margin-bottom: 0.5rem;
}

.breadcrumb-pro a {
  color: var(--primary-600);
  text-decoration: none;
}

.breadcrumb-pro a:hover {
  text-decoration: underline;
}

.breadcrumb-pro i {
  font-size: 0.625rem;
  color: var(--gray-400);
}

.page-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gray-900);
  margin: 0 0 0.25rem 0;
  line-height: 1.3;
}

.page-subtitle {
  font-size: 0.9375rem;
  color: var(--gray-500);
  margin: 0;
}

.page-meta {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-top: 0.75rem;
}

.meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.8125rem;
  color: var(--gray-500);
}

.meta-item i {
  font-size: 0.875rem;
  color: var(--gray-400);
}

.page-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn-primary-action {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: var(--primary-600);
  color: white;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius);
  text-decoration: none;
  transition: var(--transition);
}

.btn-primary-action:hover {
  background: var(--primary-700);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* ================================================
   ENHANCED ALERTS
   ================================================ */

.alert-pro {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 1.25rem;
  margin: 1rem 1.5rem;
  border-radius: var(--radius-lg);
  background: white;
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
}

.alert-pro .alert-icon {
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  font-size: 1rem;
  flex-shrink: 0;
}

.alert-pro .alert-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.alert-pro .alert-title {
  font-weight: 600;
  font-size: 0.875rem;
}

.alert-pro .alert-message {
  font-size: 0.875rem;
  color: var(--gray-600);
}

.alert-pro .alert-close {
  background: none;
  border: none;
  padding: 0.25rem;
  cursor: pointer;
  color: var(--gray-400);
  transition: var(--transition);
}

.alert-pro .alert-close:hover {
  color: var(--gray-600);
}

.alert-success-pro {
  border-left: 4px solid var(--success);
}

.alert-success-pro .alert-icon {
  background: var(--success-light);
  color: var(--success);
}

.alert-success-pro .alert-title {
  color: #065f46;
}

.alert-danger-pro {
  border-left: 4px solid var(--danger);
}

.alert-danger-pro .alert-icon {
  background: var(--danger-light);
  color: var(--danger);
}

.alert-danger-pro .alert-title {
  color: #991b1b;
}

/* ================================================
   FILTERS SECTION
   ================================================ */

.filters-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: white;
  border-bottom: 1px solid var(--gray-200);
  flex-wrap: wrap;
}

.search-form {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 0.875rem;
  color: var(--gray-400);
  font-size: 0.9375rem;
  pointer-events: none;
}

.search-input {
  padding: 0.625rem 1rem 0.625rem 2.5rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 0.875rem;
  width: 280px;
  transition: var(--transition);
  background: var(--gray-50);
}

.search-input:focus {
  outline: none;
  border-color: var(--primary-500);
  background: white;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.btn-search {
  padding: 0.625rem 1.25rem;
  background: var(--primary-600);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-search:hover {
  background: var(--primary-700);
}

.filter-form {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.select-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.select-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.select-pro {
  padding: 0.625rem 2rem 0.625rem 0.875rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 0.875rem;
  background: white;
  cursor: pointer;
  min-width: 180px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
  background-size: 1.25rem;
}

.select-pro:focus {
  outline: none;
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.btn-filter {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  background: var(--gray-100);
  color: var(--gray-700);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.btn-filter:hover {
  background: var(--gray-200);
  color: var(--gray-900);
}

/* ================================================
   TABLE STYLES
   ================================================ */

.table-container {
  margin: 0 1.5rem;
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  border: 1px solid var(--gray-200);
}

.table-pro {
  width: 100%;
  border-collapse: collapse;
}

.table-pro thead {
  background: var(--gray-50);
  border-bottom: 2px solid var(--gray-200);
}

.table-pro thead th {
  padding: 1rem 1.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gray-600);
  text-align: left;
}

.table-pro tbody tr {
  border-bottom: 1px solid var(--gray-100);
  transition: var(--transition);
}

.table-pro tbody tr:last-child {
  border-bottom: none;
}

.table-pro tbody tr:hover {
  background: var(--gray-50);
}

.table-pro tbody td {
  padding: 1rem 1.25rem;
  font-size: 0.9375rem;
  color: var(--gray-700);
  vertical-align: middle;
}

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

.product-name {
  font-weight: 500;
  color: var(--gray-900);
}

.badge-code {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  background: var(--gray-100);
  color: var(--gray-600);
  font-family: 'Roboto Mono', monospace;
  font-size: 0.8125rem;
  border-radius: var(--radius-sm);
}

.badge-category {
  display: inline-block;
  padding: 0.25rem 0.625rem;
  background: var(--primary-100);
  color: var(--primary-700);
  font-size: 0.8125rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
}

.stock-value {
  font-weight: 600;
  color: var(--gray-900);
}

.stock-value.stock-low {
  color: var(--danger);
}

.price-value {
  font-weight: 600;
  color: var(--success);
}

.btn-table-action {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 0.875rem;
  background: var(--primary-50);
  color: var(--primary-700);
  font-size: 0.8125rem;
  font-weight: 500;
  border-radius: var(--radius);
  text-decoration: none;
  transition: var(--transition);
}

.btn-table-action:hover {
  background: var(--primary-100);
  color: var(--primary-800);
}

/* ================================================
   PAGINATION
   ================================================ */

.pagination-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  margin: 1.5rem 1.5rem 2rem;
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
}

.pagination-info {
  font-size: 0.875rem;
  color: var(--gray-500);
}

.pagination-buttons {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pagination-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 1rem;
  background: white;
  color: var(--gray-700);
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  text-decoration: none;
  transition: var(--transition);
}

.pagination-btn:hover {
  background: var(--gray-50);
  border-color: var(--gray-400);
  color: var(--gray-900);
}

.pagination-btn-next {
  background: var(--primary-600);
  color: white;
  border-color: var(--primary-600);
}

.pagination-btn-next:hover {
  background: var(--primary-700);
  border-color: var(--primary-700);
  color: white;
}

/* ================================================
   DETAIL CARDS GRID
   ================================================ */

.details-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 1.5rem;
  padding: 1.5rem;
}

.detail-card {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.detail-card-main {
  grid-row: span 2;
}

.detail-card-header {
  padding: 1rem 1.25rem;
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
}

.detail-card-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--gray-800);
  margin: 0;
}

.detail-card-title i {
  color: var(--primary-600);
}

.detail-card-body {
  padding: 1.25rem;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--gray-100);
}

.detail-row:last-child {
  border-bottom: none;
}

.detail-row-full {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
}

.detail-label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--gray-500);
}

.detail-value {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--gray-900);
}

.link-pro {
  color: var(--primary-600);
  text-decoration: none;
}

.link-pro:hover {
  text-decoration: underline;
}

.text-muted {
  color: var(--gray-400) !important;
}

/* Price Display */
.price-display {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.price-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.price-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.price-amount {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
}

.price-sale {
  color: var(--primary-600);
}

.price-cost {
  color: var(--gray-700);
}

.price-margin {
  color: var(--success);
}

/* Stock Display */
.stock-display {
  text-align: center;
  padding: 1rem 0;
}

.stock-number {
  display: block;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-600);
  line-height: 1;
}

.stock-unit {
  display: block;
  font-size: 0.875rem;
  color: var(--gray-500);
  margin-top: 0.25rem;
}

/* ================================================
   SECTION CARD
   ================================================ */

.section-card {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin: 1.5rem;
}

.section-card-header {
  padding: 1rem 1.25rem;
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
}

.section-card-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--gray-800);
  margin: 0;
}

.section-card-title i {
  color: var(--primary-600);
}

.section-card-body {
  padding: 1.5rem;
}

/* Branch Stock Grid */
.branch-stock-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.branch-stock-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--gray-50);
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
}

.branch-icon {
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-100);
  color: var(--primary-600);
  border-radius: var(--radius);
  font-size: 1.125rem;
}

.branch-info {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.branch-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gray-900);
}

.branch-stock {
  font-size: 0.8125rem;
  color: var(--gray-500);
}

/* ================================================
   ACTIONS SECTION
   ================================================ */

.actions-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  margin: 0 1.5rem 1.5rem;
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
}

.actions-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn-pro {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

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

.btn-primary-pro:hover {
  background: var(--primary-700);
  color: white;
  transform: translateY(-1px);
}

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

.btn-success-pro:hover {
  background: #059669;
  color: white;
}

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

.btn-warning-pro:hover {
  background: #d97706;
  color: white;
}

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

.btn-danger-pro:hover {
  background: #dc2626;
  color: white;
}

.btn-secondary-pro {
  background: var(--gray-100);
  color: var(--gray-700);
  border: 1px solid var(--gray-300);
}

.btn-secondary-pro:hover {
  background: var(--gray-200);
  color: var(--gray-900);
}

/* ================================================
   FORM STYLES
   ================================================ */

.edit-form-section {
  margin: 0 1.5rem 1.5rem;
}

.edit-form-section .section-card {
  margin: 0;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.form-section-title {
  grid-column: span 2;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gray-500);
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--gray-200);
  margin-top: 0.5rem;
}

.form-section-title:first-child {
  margin-top: 0;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group-full {
  grid-column: span 2;
}

.form-label-pro {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-700);
}

.form-label-pro .required {
  color: var(--danger);
}

.form-input-pro {
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 0.9375rem;
  transition: var(--transition);
  background: white;
}

.form-input-pro:focus {
  outline: none;
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-input-pro::placeholder {
  color: var(--gray-400);
}

.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 0.875rem;
  color: var(--gray-500);
  font-weight: 500;
  pointer-events: none;
}

.input-with-prefix {
  padding-left: 1.75rem;
}

.input-with-icon-right {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon-right {
  position: absolute;
  right: 0.875rem;
  color: var(--gray-400);
}

.form-select-pro {
  padding: 0.625rem 2rem 0.625rem 0.875rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 0.9375rem;
  background: white;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
  background-size: 1.25rem;
  transition: var(--transition);
}

.form-select-pro:focus {
  outline: none;
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-select-large {
  padding: 1rem 2.5rem 1rem 1rem;
  font-size: 1.125rem;
  font-weight: 600;
}

.form-textarea-pro {
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 0.9375rem;
  resize: vertical;
  min-height: 80px;
  transition: var(--transition);
  font-family: inherit;
}

.form-textarea-pro:focus {
  outline: none;
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-error {
  font-size: 0.8125rem;
  color: var(--danger);
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--gray-200);
}

/* ================================================
   WARNING BANNER
   ================================================ */

.warning-banner {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 1.25rem;
  margin: 1rem 1.5rem;
  background: var(--warning-light);
  border: 1px solid #fcd34d;
  border-radius: var(--radius-lg);
}

.warning-icon {
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  color: var(--warning);
  border-radius: var(--radius);
  font-size: 1rem;
  flex-shrink: 0;
}

.warning-content {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.warning-title {
  font-weight: 600;
  font-size: 0.875rem;
  color: #92400e;
}

.warning-message {
  font-size: 0.875rem;
  color: #a16207;
}

/* ================================================
   PRICE ADJUSTMENT CARDS
   ================================================ */

.price-adjustment-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.price-adjustment-card {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.adjustment-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 1.25rem;
  background: white;
  border-bottom: 1px solid var(--gray-200);
  font-weight: 600;
  color: var(--gray-800);
}

.adjustment-header i {
  color: var(--primary-600);
}

.adjustment-body {
  padding: 1.25rem;
}

.percentage-select-wrapper {
  margin: 0.75rem 0;
}

.adjustment-hint {
  font-size: 0.8125rem;
  color: var(--gray-500);
  margin: 0;
}

/* ================================================
   BRAND BADGE
   ================================================ */

.brand-badge-large {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  margin: 0 1.5rem 1rem;
  background: var(--primary-50);
  border: 1px solid var(--primary-200);
  border-radius: var(--radius-lg);
}

.brand-badge-large.category-badge {
  background: var(--success-light);
  border-color: #6ee7b7;
}

.brand-badge-icon {
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-100);
  color: var(--primary-600);
  border-radius: var(--radius);
  font-size: 1.25rem;
}

.category-badge .brand-badge-icon {
  background: white;
  color: var(--success);
}

.brand-badge-content {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.brand-badge-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.brand-badge-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gray-900);
}

/* ================================================
   RESPONSIVE - DESKTOP LARGE (1400px+)
   ================================================ */

@media (min-width: 1400px) {
  .details-grid {
    grid-template-columns: 2fr 1fr 1fr;
  }
  
  .pos-container {
    grid-template-columns: 1fr 400px;
  }
  
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ================================================
   RESPONSIVE - DESKTOP (1200px - 1399px)
   ================================================ */

@media (max-width: 1399px) {
  .pos-container {
    grid-template-columns: 1fr 360px;
  }
  
  .details-grid {
    grid-template-columns: 1.5fr 1fr 1fr;
  }
}

/* ================================================
   RESPONSIVE - TABLET LANDSCAPE (992px - 1199px)
   ================================================ */

@media (max-width: 1199px) {
  .pos-container {
    grid-template-columns: 1fr 320px;
  }
  
  .details-grid {
    grid-template-columns: 1fr 1fr;
  }
  
  .detail-card-main {
    grid-column: span 2;
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .branch-stock-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ================================================
   RESPONSIVE - TABLET PORTRAIT (768px - 991px)
   ================================================ */

@media (max-width: 991px) {
  /* Sidebar */
  #sidebar {
    margin-left: -280px;
  }
  
  #sidebar.active {
    margin-left: 0;
  }
  
  #content {
    width: 100%;
    margin-left: 0;
  }
  
  #content.active {
    width: calc(100% - 280px);
    margin-left: 280px;
  }
  
  /* Mobile Menu Overlay */
  .sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
  }
  
  .sidebar-overlay.active {
    display: block;
  }
  
  /* POS Layout */
  .pos-container {
    grid-template-columns: 1fr;
    gap: 0;
  }
  
  .pos-sidebar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: auto;
    max-height: 60vh;
    z-index: 200;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(calc(100% - 80px));
    transition: transform 0.3s ease;
  }
  
  .pos-sidebar.expanded {
    transform: translateY(0);
  }
  
  .pos-sidebar-handle {
    display: flex;
    justify-content: center;
    padding: 0.75rem;
    cursor: pointer;
  }
  
  .pos-sidebar-handle::before {
    content: '';
    width: 40px;
    height: 4px;
    background: var(--gray-300);
    border-radius: 2px;
  }
  
  /* Grids */
  .details-grid {
    grid-template-columns: 1fr;
  }
  
  .detail-card-main {
    grid-column: span 1;
  }
  
  .form-grid {
    grid-template-columns: 1fr;
  }
  
  .form-group-full,
  .form-section-title {
    grid-column: span 1;
  }
  
  .price-adjustment-grid {
    grid-template-columns: 1fr;
  }
  
  /* Page Header */
  .page-header-content {
    flex-direction: column;
    align-items: stretch;
  }
  
  .page-actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }
  
  /* Tables */
  .table-container {
    margin: 0 1rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .table-pro {
    min-width: 700px;
  }
  
  /* Cards and sections */
  .section-card {
    margin: 1rem;
  }
  
  .edit-form-section {
    margin: 0 1rem 1rem;
  }
  
  .brand-badge-large {
    margin: 0 1rem 1rem;
  }
}

/* ================================================
   RESPONSIVE - MOBILE LANDSCAPE (576px - 767px)
   ================================================ */

@media (max-width: 767px) {
  /* Top Action Bar */
  .top-action-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    padding: 1rem;
  }
  
  .action-bar-left,
  .action-bar-right {
    width: 100%;
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .action-bar-right {
    justify-content: flex-start;
    gap: 0.5rem;
  }
  
  .btn-action {
    flex: 1;
    min-width: 120px;
    justify-content: center;
    padding: 0.75rem 0.875rem;
  }
  
  /* Filters */
  .filters-section {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
    padding: 1rem;
  }
  
  .search-form {
    flex-direction: column;
    width: 100%;
    gap: 0.5rem;
  }
  
  .search-input-wrapper {
    width: 100%;
  }
  
  .search-input {
    width: 100%;
  }
  
  .btn-search {
    width: 100%;
  }
  
  .filter-form {
    flex-direction: column;
    width: 100%;
    gap: 0.75rem;
  }
  
  .select-wrapper {
    width: 100%;
  }
  
  .select-pro {
    width: 100%;
    min-width: auto;
  }
  
  .btn-filter {
    width: 100%;
    justify-content: center;
  }
  
  /* Page Header */
  .page-header {
    padding: 1.25rem 1rem;
  }
  
  .page-title {
    font-size: 1.25rem;
  }
  
  .page-subtitle {
    font-size: 0.875rem;
  }
  
  .breadcrumb-pro {
    font-size: 0.75rem;
    flex-wrap: wrap;
  }
  
  .page-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .page-actions {
    gap: 0.5rem;
  }
  
  .page-actions .btn,
  .btn-primary-action {
    flex: 1;
    min-width: 0;
    justify-content: center;
    font-size: 0.8125rem;
    padding: 0.625rem 0.75rem;
  }
  
  /* Alerts */
  .alert-pro {
    margin: 0.75rem 1rem;
    padding: 0.875rem 1rem;
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .alert-pro .alert-icon {
    width: 2.5rem;
    height: 2.5rem;
  }
  
  .warning-banner {
    margin: 0.75rem 1rem;
    flex-direction: column;
    gap: 0.75rem;
  }
  
  /* Stats Grid */
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 0 1rem;
  }
  
  .stat-card {
    padding: 1.25rem;
  }
  
  .stat-card .stat-value {
    font-size: 1.5rem;
  }
  
  .stat-card .stat-icon {
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1rem;
  }
  
  /* Detail Cards */
  .detail-card-header {
    padding: 0.875rem 1rem;
  }
  
  .detail-card-body {
    padding: 1rem;
  }
  
  .detail-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
    padding: 0.625rem 0;
  }
  
  .price-display {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1rem;
  }
  
  .price-item {
    flex: 1;
    min-width: 100px;
  }
  
  .price-amount {
    font-size: 1.25rem;
  }
  
  .stock-number {
    font-size: 2rem;
  }
  
  /* Branch Stock */
  .branch-stock-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  
  .branch-stock-item {
    padding: 0.875rem;
  }
  
  .branch-icon {
    width: 2.25rem;
    height: 2.25rem;
    font-size: 1rem;
  }
  
  /* Actions Section */
  .actions-section {
    flex-direction: column;
    gap: 1rem;
    margin: 0 1rem 1rem;
    padding: 1rem;
  }
  
  .actions-group {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  
  .btn-pro {
    flex: 1;
    min-width: 120px;
    justify-content: center;
    padding: 0.75rem 1rem;
  }
  
  /* Forms */
  .section-card-body {
    padding: 1rem;
  }
  
  .form-grid {
    gap: 1rem;
  }
  
  .form-actions {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .form-actions .btn-pro {
    width: 100%;
  }
  
  /* Tables */
  .table-container {
    margin: 0 0.75rem;
    border-radius: var(--radius);
  }
  
  .table-pro thead th,
  .table-pro tbody td {
    padding: 0.75rem 1rem;
    font-size: 0.8125rem;
  }
  
  /* Pagination */
  .pagination-container {
    flex-direction: column;
    gap: 1rem;
    margin: 1rem 0.75rem;
    padding: 1rem;
  }
  
  .pagination-info {
    text-align: center;
  }
  
  .pagination-buttons {
    width: 100%;
    justify-content: space-between;
  }
  
  .pagination-btn {
    flex: 1;
    justify-content: center;
    padding: 0.625rem 0.75rem;
    font-size: 0.8125rem;
  }
  
  /* Brand Badge */
  .brand-badge-large {
    padding: 0.875rem 1rem;
    margin: 0 0.75rem 0.75rem;
  }
  
  .brand-badge-icon {
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1rem;
  }
  
  .brand-badge-name {
    font-size: 1.125rem;
  }
  
  /* Price Adjustment */
  .adjustment-header {
    padding: 0.875rem 1rem;
    font-size: 0.9375rem;
  }
  
  .adjustment-body {
    padding: 1rem;
  }
  
  /* Content Wrapper */
  .content-wrapper {
    padding: 0.75rem;
  }
}

/* ================================================
   RESPONSIVE - MOBILE PORTRAIT (max 575px)
   ================================================ */

@media (max-width: 575px) {
  /* Sidebar */
  #sidebar {
    width: 100%;
    min-width: 100%;
    margin-left: -100%;
  }
  
  #sidebar.active {
    margin-left: 0;
  }
  
  .sidebar-header {
    padding: 1.25rem 1rem;
  }
  
  .sidebar-header h3 {
    font-size: 1.25rem;
  }
  
  #sidebar ul li a {
    padding: 0.875rem 1rem;
    font-size: 1rem;
  }
  
  /* Action Buttons */
  .btn-action {
    min-width: auto;
    font-size: 0.8125rem;
    padding: 0.625rem 0.75rem;
  }
  
  .btn-action span.btn-text {
    display: none;
  }
  
  .btn-action i {
    margin: 0;
  }
  
  /* Compact Mode for Small Screens */
  .page-title {
    font-size: 1.125rem;
  }
  
  .page-actions {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.5rem;
    margin-bottom: -0.5rem;
  }
  
  .page-actions .btn,
  .btn-primary-action {
    flex: 0 0 auto;
    white-space: nowrap;
  }
  
  /* Cards */
  .stat-card {
    padding: 1rem;
  }
  
  .stat-card .stat-value {
    font-size: 1.375rem;
  }
  
  .stat-card .stat-label {
    font-size: 0.6875rem;
  }
  
  /* Form Inputs */
  .form-input-pro,
  .form-select-pro,
  .form-textarea-pro {
    font-size: 1rem;
    padding: 0.75rem;
  }
  
  .form-label-pro {
    font-size: 0.8125rem;
  }
  
  /* Tables - Stacked Layout Option */
  .table-responsive-stack .table-pro thead {
    display: none;
  }
  
  .table-responsive-stack .table-pro tbody tr {
    display: flex;
    flex-direction: column;
    padding: 1rem;
    border-bottom: 1px solid var(--gray-200);
    gap: 0.5rem;
  }
  
  .table-responsive-stack .table-pro tbody td {
    display: flex;
    justify-content: space-between;
    padding: 0.375rem 0;
    border: none;
  }
  
  .table-responsive-stack .table-pro tbody td::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--gray-600);
    font-size: 0.75rem;
    text-transform: uppercase;
  }
  
  /* POS Specific */
  .pos-main {
    padding-bottom: 100px;
  }
  
  .pos-search-input {
    font-size: 1rem;
    padding: 0.875rem 1rem 0.875rem 3rem;
  }
  
  .cart-item {
    padding: 0.875rem;
  }
  
  .total-card {
    padding: 1rem;
  }
  
  .total-amount {
    font-size: 1.5rem;
  }
  
  /* Modals */
  .modal-content {
    margin: 0.5rem;
    max-height: calc(100vh - 1rem);
    overflow-y: auto;
  }
  
  .modal-header {
    padding: 1rem;
  }
  
  .modal-body {
    padding: 1rem;
  }
  
  .modal-footer {
    padding: 1rem;
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .modal-footer .btn {
    width: 100%;
  }
}

/* ================================================
   TOUCH DEVICE ENHANCEMENTS
   ================================================ */

@media (hover: none) and (pointer: coarse) {
  /* Larger touch targets */
  .btn,
  .btn-action,
  .btn-pro,
  .btn-table-action {
    min-height: 44px;
  }
  
  .form-input-pro,
  .form-select-pro {
    min-height: 44px;
  }
  
  #sidebar ul li a {
    min-height: 48px;
  }
  
  /* Remove hover effects */
  .stat-card:hover,
  .card:hover {
    transform: none;
  }
  
  .btn:hover {
    transform: none;
  }
  
  /* Active states for touch */
  .btn:active {
    transform: scale(0.98);
    opacity: 0.9;
  }
  
  .stat-card:active {
    transform: scale(0.99);
  }
}

/* ================================================
   PRINT STYLES
   ================================================ */

@media print {
  #sidebar,
  .top-action-bar,
  .navbar,
  .page-actions,
  .actions-section,
  .btn,
  .pagination-container {
    display: none !important;
  }
  
  #content {
    width: 100% !important;
    margin: 0 !important;
  }
  
  .table-container,
  .section-card,
  .detail-card {
    box-shadow: none !important;
    border: 1px solid #ccc !important;
    margin: 0 !important;
  }
  
  body {
    background: white !important;
  }
  
  .page-header {
    background: none !important;
    border: none !important;
  }
}

/* ================================================
   LANDSCAPE MODE ADJUSTMENTS
   ================================================ */

@media (max-height: 500px) and (orientation: landscape) {
  .pos-sidebar {
    max-height: 50vh;
  }
  
  .modal-content {
    max-height: 90vh;
  }
  
  .navbar {
    padding: 0.5rem 1rem;
  }
  
  .top-action-bar {
    padding: 0.75rem 1rem;
  }
}

/* ================================================
   SAFE AREA INSETS (Notch devices)
   ================================================ */

@supports (padding: max(0px)) {
  .pos-sidebar {
    padding-bottom: max(1rem, env(safe-area-inset-bottom));
  }
  
  #sidebar {
    padding-top: max(0px, env(safe-area-inset-top));
  }
  
  .navbar {
    padding-left: max(1.5rem, env(safe-area-inset-left));
    padding-right: max(1.5rem, env(safe-area-inset-right));
  }
}
