/* DESIGN SYSTEM & CONSTANTS */
:root {
  --font-family-title: 'Outfit', 'Plus Jakarta Sans', sans-serif;
  --font-family-body: 'Plus Jakarta Sans', sans-serif;

  /* Color Palette - Premium Light Mode */
  --bg-primary: #f8fafc;
  --bg-secondary: #f1f5f9;
  --bg-card: #ffffff;
  --border-color: #e2e8f0;
  --border-hover: #cbd5e1;
  
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-dark: #0f172a;

  --color-primary: #1d4ed8; /* Royal Blue from logo */
  --color-primary-hover: #1e40af;
  --color-success: #10b981; /* Emerald/Teal */
  --color-success-hover: #059669;
  --color-danger: #ef4444; /* Rose Red */
  --color-danger-hover: #dc2626;
  --color-warning: #f59e0b; /* Amber */
  --color-accent: #00d2ff;  /* Bright Cyan from logo */
  --color-accent-hover: #00b4d8;

  --brand-gradient: linear-gradient(135deg, #00d2ff 0%, #1d4ed8 100%);

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 20px 50px -12px rgba(0, 0, 0, 0.12);
  --shadow-glow: 0 0 30px rgba(0, 210, 255, 0.12);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-family-body);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

/* BACKGROUND GLOW ANIMATIONS */
.bg-glow {
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  filter: blur(120px);
  z-index: -1;
  opacity: 0.08; /* Muy tenue para el fondo claro */
  pointer-events: none;
}

.bg-glow-1 {
  background: var(--color-primary);
  top: -100px;
  right: -50px;
  animation: floatGlow 15s infinite alternate;
}

.bg-glow-2 {
  background: var(--color-success);
  bottom: -100px;
  left: -50px;
  animation: floatGlow 20s infinite alternate-reverse;
}

@keyframes floatGlow {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(60px, 40px) scale(1.15); }
}

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

.text-center { text-align: center; }
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-active {
  background: rgba(16, 185, 129, 0.15);
  color: var(--color-success);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-inactive {
  background: rgba(148, 163, 184, 0.1);
  color: var(--text-muted);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.badge-onsale {
  background: rgba(245, 158, 11, 0.15);
  color: var(--color-warning);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-json { background: rgba(0, 210, 255, 0.15); color: #38bdf8; }
.badge-csv { background: rgba(16, 185, 129, 0.2); color: #34d399; }

/* ALERTS */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  font-size: 0.9rem;
  border-left: 4px solid transparent;
}
.alert.error {
  background: rgba(239, 68, 68, 0.1);
  color: #fca5a5;
  border-color: var(--color-danger);
}

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-family: var(--font-family-title);
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  outline: none;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--color-primary);
  color: white;
}
.btn-primary:hover {
  background: var(--color-primary-hover);
  box-shadow: 0 0 15px rgba(0, 210, 255, 0.3);
}

.btn-success {
  background: var(--color-success);
  color: white;
}
.btn-success:hover {
  background: var(--color-success-hover);
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.4);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.3);
}
.btn-danger:hover {
  background: var(--color-danger);
  color: white;
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.4);
}

.btn-outline {
  background: transparent;
  color: var(--text-main);
  border-color: var(--border-color);
}
.btn-outline:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border-hover);
}

.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
}
.btn-icon:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-hover);
}
.btn-icon.active {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
}
.btn-block {
  width: 100%;
}

/* LOGIN WRAPPER & CARD */
.login-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
  background: radial-gradient(circle, #ffffff 0%, #f1f5f9 100%);
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  transition: var(--transition);
}

.login-header {
  text-align: center;
  margin-bottom: 30px;
}

.logo-container {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px auto;
  max-width: 280px;
}

.login-logo-img {
  width: 100%;
  max-width: 260px;
  height: auto;
  display: block;
}

.login-header h1 {
  font-family: var(--font-family-title);
  font-weight: 700;
  font-size: 1.8rem;
  margin-bottom: 8px;
}

.login-header p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.4;
}

.form-group {
  margin-bottom: 20px;
}

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

.form-control {
  width: 100%;
  background: #ffffff;
  border: 1px solid var(--border-color);
  color: var(--text-main);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-family: var(--font-family-body);
  font-size: 0.95rem;
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(0, 210, 255, 0.12);
  background: #ffffff;
}

select.form-control {
  cursor: pointer;
  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='%2394a3b8' 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 12px center;
  background-size: 18px;
  padding-right: 40px;
}

.login-footer {
  text-align: center;
  margin-top: 30px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* APP WORKSPACE WRAPPER */
.app-wrapper {
  display: flex;
  flex-direction: column;
  flex: 1;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding: 20px;
  animation: fadeIn 0.4s ease;
}

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

/* MAIN HEADER */
.main-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 15px 25px;
  margin-bottom: 25px;
  box-shadow: var(--shadow-md);
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 15px;
}

.brand-logo-container {
  display: flex;
  align-items: center;
  height: 44px;
}

.header-logo-img {
  height: 40px;
  width: auto;
  display: block;
}

.status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.status-indicator::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.status-indicator.online::before {
  background-color: var(--color-success);
  box-shadow: 0 0 8px var(--color-success);
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 15px;
}

.profile-info {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.profile-name {
  font-size: 0.9rem;
  font-weight: 600;
}

.profile-role {
  font-size: 0.65rem;
  background: rgba(0, 210, 255, 0.12);
  color: var(--color-accent);
  border: 1px solid rgba(0, 210, 255, 0.25);
}

.profile-role.consulta-role {
  background: rgba(16, 185, 129, 0.15);
  color: var(--color-success);
  border-color: rgba(16, 185, 129, 0.3);
}

.btn-logout:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.3);
}

/* STATS SUMMARY SECTION */
.summary-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 25px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 20px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.stat-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-products { background: rgba(0, 210, 255, 0.12); color: var(--color-accent); }
.icon-active { background: rgba(16, 185, 129, 0.15); color: var(--color-success); }
.icon-sale { background: rgba(245, 158, 11, 0.15); color: var(--color-warning); }

.stat-info h3 {
  font-family: var(--font-family-title);
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1.2;
}

.stat-info p {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* CONTROLS PANEL (FILTER / ACTIONS) */
.controls-panel {
  display: grid;
  grid-template-columns: 1.5fr auto auto;
  gap: 15px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 25px;
  box-shadow: var(--shadow-sm);
  align-items: center;
}

.search-box {
  position: relative;
  width: 100%;
  min-width: 250px;
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.search-box input {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  border-radius: var(--radius-sm);
  padding: 10px 16px 10px 42px;
  font-size: 0.9rem;
  transition: var(--transition);
}

.search-box input:focus {
  outline: none;
  border-color: var(--color-primary);
  background: var(--bg-card);
  box-shadow: 0 0 0 3px rgba(0, 210, 255, 0.12);
}

.filters-group {
  display: flex;
  gap: 10px;
  align-items: center;
}

.filter-select {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  border-radius: var(--radius-sm);
  padding: 10px 30px 10px 12px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition);
  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='%2394a3b8' 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 10px center;
  background-size: 14px;
  max-width: 170px;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

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

.view-toggle {
  display: flex;
  background: var(--bg-secondary);
  padding: 2px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
}

.view-toggle .btn-icon {
  width: 34px;
  height: 34px;
  border: none;
  background: transparent;
  border-radius: 4px;
}

.view-toggle .btn-icon.active {
  background: var(--color-primary);
  color: white;
}

.actions-group {
  display: flex;
  gap: 10px;
}

/* EXPORT DROPDOWN */
.dropdown-export {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  right: 0;
  top: 110%;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  width: 220px;
  padding: 6px;
  box-shadow: var(--shadow-lg);
  z-index: 10;
  display: none;
  flex-direction: column;
  animation: slideDown 0.2s ease;
}

.dropdown-menu.show {
  display: flex;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  color: var(--text-main);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  border-radius: 4px;
  transition: var(--transition);
}

.dropdown-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.dropdown-item .badge {
  padding: 2px 6px;
  font-size: 0.65rem;
}

/* PRODUCTS GRID (STORE LAYOUT) */
.products-grid-container {
  min-height: 400px;
  margin-bottom: 25px;
}

/* GRID VIEW */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  position: relative;
}

.product-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md), 0 10px 20px rgba(99, 102, 241, 0.05);
}

.product-card-header {
  position: relative;
  width: 100%;
  aspect-ratio: 1/1;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-bottom: 1px solid var(--border-color);
}

.product-image {
  max-width: 100%;
  max-height: 100%;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: var(--transition);
}

.product-card:hover .product-image {
  transform: scale(1.06);
}

.product-badges {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 2;
}

.product-card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-brand {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 4px;
}

.product-title {
  font-family: var(--font-family-title);
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-main);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.6em;
}

.product-sku {
  font-family: monospace;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 15px;
  background: var(--bg-secondary);
  padding: 4px 8px;
  border-radius: 4px;
  width: fit-content;
}

.product-pricing {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: auto;
  border-top: 1px dashed var(--border-color);
  padding-top: 12px;
  margin-bottom: 12px;
}

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

.price-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
}

.price-value {
  font-family: var(--font-family-title);
  font-size: 1.15rem;
  font-weight: 700;
}

.price-cost .price-value {
  color: var(--text-main);
}

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

.product-card-footer {
  display: flex;
  gap: 8px;
  border-top: 1px solid var(--border-color);
  padding: 12px 16px;
  background: var(--bg-primary);
}

.product-card-footer .btn {
  flex: 1;
  padding: 8px;
  font-size: 0.8rem;
}

/* LIST VIEW (TABLE) */
.products-list-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow-x: auto;
  box-shadow: var(--shadow-sm);
}

.products-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

.products-table th, 
.products-table td {
  padding: 12px 18px;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}

.products-table th {
  background: var(--bg-secondary);
  font-family: var(--font-family-title);
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}

.products-table tbody tr {
  transition: var(--transition);
}

.products-table tbody tr:hover {
  background: rgba(15, 23, 42, 0.02);
}

.table-product-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.table-product-image {
  width: 44px;
  height: 44px;
  border-radius: 6px;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.table-product-image img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
}

.table-product-title-sku h4 {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  max-width: 250px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.table-product-title-sku span {
  font-family: monospace;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.table-actions {
  display: flex;
  gap: 6px;
}

.table-actions .btn {
  padding: 6px 10px;
  font-size: 0.75rem;
}

/* LOADING & EMPTY STATES */
.loading-state, .empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  color: var(--text-muted);
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(99, 102, 241, 0.1);
  border-left-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 15px;
}

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

.empty-state svg {
  color: var(--text-muted);
  opacity: 0.5;
  margin-bottom: 15px;
}

.empty-state h3 {
  font-family: var(--font-family-title);
  color: var(--text-main);
  margin-bottom: 8px;
}

/* PAGINATION FOOTER */
.pagination-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 20px;
  box-shadow: var(--shadow-sm);
  flex-wrap: wrap;
  gap: 15px;
}

.pagination-info {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.page-numbers {
  display: flex;
  gap: 5px;
}

.page-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  background: transparent;
  color: var(--text-muted);
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition);
}

.page-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

.page-btn.active {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

/* MODALS LAYOUT */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(9, 13, 22, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
}

.modal-container {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 750px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: modalSlide 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  max-height: 90vh;
}

#product-form {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

@keyframes modalSlide {
  from { opacity: 0; transform: scale(0.96) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

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

.modal-header h3 {
  font-family: var(--font-family-title);
  font-size: 1.25rem;
  font-weight: 700;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}

.modal-close:hover {
  color: var(--text-main);
}

.modal-tabs {
  display: flex;
  background: var(--bg-secondary);
  padding: 4px;
  border-bottom: 1px solid var(--border-color);
}

.tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 12px;
  font-family: var(--font-family-title);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition);
  border-radius: 6px;
  text-align: center;
}

.tab-btn.active {
  background: var(--bg-card);
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
}

.tab-content {
  padding: 25px;
  overflow-y: auto;
  flex: 1;
  max-height: calc(90vh - 180px);
}

.modal-footer {
  padding: 20px 25px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  background: var(--bg-primary);
}

/* FORMS LAYOUT SPECIFICS */
.grid-2-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.grid-3-col {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 15px;
}

.grid-4-col {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.form-section-title {
  font-family: var(--font-family-title);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 15px 0 10px 0;
  padding-bottom: 5px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.checkbox-group {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  margin-top: 15px;
}

.checkbox-group input {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--color-primary);
}

.checkbox-group label {
  margin-bottom: 0;
  cursor: pointer;
}

/* READ ONLY DETAILS VIEW MODAL (CONSULTA) */
.view-details-container {
  max-width: 650px;
}

.view-details-content {
  padding: 25px;
  overflow-y: auto;
  max-height: 60vh;
}

.view-hero {
  display: flex;
  gap: 20px;
  margin-bottom: 25px;
  align-items: center;
}

.view-img-wrapper {
  width: 120px;
  height: 120px;
  border-radius: var(--radius-sm);
  background: #ffffff;
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.view-img-wrapper img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
}

.view-title-block h2 {
  font-family: var(--font-family-title);
  font-size: 1.25rem;
  margin-bottom: 5px;
}

.view-title-block p {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 8px;
}

.view-info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  border-top: 1px solid var(--border-color);
  padding-top: 20px;
}

.view-info-item {
  display: flex;
  flex-direction: column;
}

.view-info-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 3px;
}

.view-info-val {
  font-size: 0.9rem;
  color: var(--text-main);
  word-break: break-all;
}

.view-info-val.price {
  font-family: var(--font-family-title);
  font-weight: 700;
  font-size: 1.1rem;
}

.view-info-val.price-msrp {
  color: var(--color-success);
}

.view-description-box {
  grid-column: span 2;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 15px;
  margin-top: 10px;
}

.view-description-box p {
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--text-main);
  white-space: pre-line;
}

/* TOAST NOTIFICATION */
.toast {
  position: fixed;
  bottom: 25px;
  right: 25px;
  background: #10b981;
  color: white;
  padding: 14px 24px;
  border-radius: var(--radius-sm);
  font-family: var(--font-family-title);
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: var(--shadow-lg), 0 0 20px rgba(16, 185, 129, 0.3);
  z-index: 200;
  transform: translateY(100px);
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
}

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

.toast.error {
  background: var(--color-danger);
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.3);
}

/* RESPONSIVE DESIGN - MOBILE MEDIA QUERIES */
@media (max-width: 992px) {
  .controls-panel {
    grid-template-columns: 1fr;
  }
  
  .filters-group {
    width: 100%;
    justify-content: space-between;
  }
  
  .filter-select {
    flex: 1;
  }

  .actions-group {
    width: 100%;
  }

  .actions-group .btn, 
  .dropdown-export, 
  .dropdown-export .btn {
    flex: 1;
    width: 100%;
  }
}

@media (max-width: 768px) {
  body {
    padding: 10px;
  }
  
  .app-wrapper {
    padding: 0;
  }

  .main-header {
    flex-direction: column;
    gap: 15px;
    align-items: flex-start;
  }

  .user-profile {
    width: 100%;
    justify-content: space-between;
    border-top: 1px solid var(--border-color);
    padding-top: 15px;
  }

  .profile-info {
    align-items: flex-start;
  }

  .grid-2-col, .grid-3-col, .grid-4-col {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .view-info-grid {
    grid-template-columns: 1fr;
  }

  .view-description-box {
    grid-column: span 1;
  }

  .modal-container {
    max-height: 95vh;
  }
}

/* ACTIVE / INACTIVE PRODUCT CARD & TABLE ROW STYLING DIFFERENCE */
.product-card.inactive {
  opacity: 0.6;
  filter: grayscale(35%);
  border-color: var(--border-color);
  background: var(--bg-secondary);
}

.product-card.inactive:hover {
  opacity: 0.9;
  filter: grayscale(0%);
  border-color: var(--border-hover);
}

.products-table tr.inactive {
  opacity: 0.6;
  background: rgba(148, 163, 184, 0.05);
}

.products-table tr.inactive:hover {
  opacity: 0.9;
  background: rgba(148, 163, 184, 0.1);
}

/* ADMIN NAVIGATION TABS */
.admin-main-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 10px;
}

.admin-tab-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-family-title);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 8px 16px;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.admin-tab-btn:hover {
  color: var(--text-main);
  background: var(--bg-secondary);
}

.admin-tab-btn.active {
  color: var(--color-primary);
  background: rgba(29, 78, 216, 0.08);
  box-shadow: inset 0 -2px 0 var(--color-primary);
}

.fields-checkbox-grid .checkbox-group {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  padding: 8px 12px;
  border-radius: 6px;
  transition: var(--transition);
}

.fields-checkbox-grid .checkbox-group:hover {
  background: var(--bg-secondary);
  border-color: var(--border-hover);
}

/* DRAG & DROP & UPLOAD */
.upload-drag-area.dragover {
  border-color: var(--color-primary) !important;
  background: rgba(99, 102, 241, 0.08) !important;
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.15);
}

.upload-drag-area:hover {
  border-color: var(--color-primary);
  background: rgba(255, 255, 255, 0.02);
}

/* PRICING OFFER DECORATION */
.price-regular-slashed {
  text-decoration: line-through;
  color: var(--text-muted) !important;
  font-size: 0.85em;
  margin-right: 6px;
  font-weight: normal;
  display: block;
}

.price-sale-highlight {
  color: #f97316 !important; /* Orange energetic tone */
  font-weight: 800;
}

.price-cost.price-sale-highlight .price-value {
  color: #f97316 !important;
}

/* PERMISSIONS WORKSPACE CUSTOMS */
#permissions-checkboxes-container .checkbox-group {
  margin-top: 0;
  padding: 10px 14px;
}

