/* ===================================
   RESET Y BASE
=================================== */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }

:root {
  --primary:       #6366F1;
  --primary-dark:  #4F46E5;
  --primary-light: #818CF8;
  --gray-50:  #FAFAFA;
  --gray-100: #F3F4F6;
  --gray-200: #E5E7EB;
  --gray-300: #D1D5DB;
  --gray-400: #9CA3AF;
  --gray-500: #6B7280;
  --gray-600: #4B5563;
  --gray-700: #374151;
  --gray-800: #1F2937;
  --gray-900: #111827;
  --success:  #10B981;
  --warning:  #F59E0B;
  --danger:   #EF4444;
  --info:     #3B82F6;
  --sidebar-width:  260px;
  --topbar-height:  64px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1);
  --radius-sm:   6px;
  --radius-md:   8px;
  --radius-lg:   12px;
  --radius-full: 9999px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  background: #F9FAFB;
  color: var(--gray-900);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* ===================================
   LAYOUT PRINCIPAL
=================================== */
.app-container {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ===================================
   SIDEBAR
=================================== */
.sidebar {
  width: var(--sidebar-width);
  background: #FAFAFA;
  border-right: 1px solid var(--gray-200);
  display: flex;
  flex-direction: column;
  transition: width 0.3s ease;
  flex-shrink: 0;
  position: relative;
  z-index: 100;
}

.sidebar.collapsed { width: 70px; }

.sidebar-header {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  border-bottom: 1px solid var(--gray-200);
  flex-shrink: 0;
}

.sidebar-toggle {
  width: 32px; height: 32px;
  border: none; background: transparent;
  color: var(--gray-500); cursor: pointer;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.sidebar-toggle:hover { background: var(--gray-100); color: var(--gray-700); }
.sidebar.collapsed .sidebar-toggle svg { transform: rotate(180deg); }

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 16px 12px;
}
.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 4px; }

.nav-section { margin-bottom: 24px; }
.nav-section:last-child { margin-bottom: 0; }

.nav-section-title {
  font-size: 11px; font-weight: 600;
  color: var(--gray-400);
  text-transform: uppercase; letter-spacing: 0.5px;
  padding: 0 12px; margin-bottom: 8px;
  transition: opacity 0.3s;
  white-space: nowrap; overflow: hidden;
}
.sidebar.collapsed .nav-section-title { opacity: 0; height: 0; margin: 0; }

.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  color: var(--gray-700);
  font-size: 14px; font-weight: 500;
  cursor: pointer; transition: all 0.2s;
  margin-bottom: 4px; white-space: nowrap;
  text-decoration: none;
}
.nav-item:hover { background: var(--gray-100); color: var(--gray-900); }
.nav-item.active { background: var(--gray-100); color: var(--primary); }

.nav-icon { flex-shrink: 0; color: var(--gray-500); transition: color 0.2s; }
.nav-item:hover .nav-icon,
.nav-item.active .nav-icon { color: var(--primary); }

.sidebar.collapsed .nav-text { opacity: 0; width: 0; overflow: hidden; }

.sidebar-footer {
  border-top: 1px solid var(--gray-200);
  padding: 16px 12px;
}

.sidebar-footer-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  color: var(--gray-600); font-size: 13px;
  cursor: pointer; transition: all 0.2s;
  margin-bottom: 4px; text-decoration: none;
  white-space: nowrap;
}
.sidebar-footer-item:hover { background: var(--gray-100); color: var(--gray-900); }
.sidebar-footer-item svg { flex-shrink: 0; color: var(--gray-500); }

.sidebar-footer-brand {
  text-align: center; font-size: 11px;
  color: var(--gray-400); margin-top: 12px;
  padding-top: 12px; border-top: 1px solid var(--gray-200);
  overflow: hidden; white-space: nowrap;
}
.sidebar.collapsed .sidebar-footer-brand,
.sidebar.collapsed .sidebar-footer-item span { opacity: 0; width: 0; overflow: hidden; }

/* ===================================
   MAIN CONTENT
=================================== */
.main-content {
  flex: 1; display: flex; flex-direction: column;
  overflow: hidden; background: #F9FAFB;
}

/* ===================================
   TOPBAR
=================================== */
.topbar {
  height: var(--topbar-height);
  background: #FFFFFF;
  border-bottom: 1px solid var(--gray-200);
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 0 32px; flex-shrink: 0;
}

.topbar-left { display: flex; align-items: center; gap: 12px; }

.topbar-title {
  font-size: 20px; font-weight: 700;
  color: var(--gray-900); margin: 0;
}

.topbar-right { display: flex; align-items: center; gap: 16px; }

.user-info {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 12px; border-radius: var(--radius-lg);
  transition: background 0.2s; cursor: pointer;
}
.user-info:hover { background: var(--gray-50); }

.user-avatar {
  width: 40px; height: 40px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white; display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 16px; flex-shrink: 0;
}

.user-details { display: flex; flex-direction: column; }
.user-name { font-size: 14px; font-weight: 600; color: var(--gray-900); line-height: 1.2; }
.user-role { font-size: 12px; color: var(--gray-500); line-height: 1.2; }

/* ===================================
   BOTÓN VOLVER
=================================== */
.back-button {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 14px;
  background: var(--gray-100); border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  color: var(--gray-700); font-size: 13px; font-weight: 500;
  cursor: pointer; transition: all 0.2s;
  white-space: nowrap; text-decoration: none;
}
.back-button:hover {
  background: var(--primary); border-color: var(--primary);
  color: white; box-shadow: 0 4px 12px rgba(99,102,241,0.25);
}
.back-button:active { transform: scale(0.98); }

/* ===================================
   PAGE CONTENT
=================================== */
.page-content { flex: 1; overflow-y: auto; padding: 24px 32px; }
.content-wrapper { max-width: 1400px; margin: 0 auto; }

/* ===================================
   COMPONENTES
=================================== */
.card {
  background: white; border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg); padding: 24px;
  box-shadow: var(--shadow-sm); margin-bottom: 24px;
}

.card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px; padding-bottom: 16px;
  border-bottom: 1px solid var(--gray-200);
}

.card-title { font-size: 18px; font-weight: 700; color: var(--gray-900); margin: 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 16px; border-radius: var(--radius-md);
  font-size: 14px; font-weight: 500; border: none;
  cursor: pointer; transition: all 0.2s;
  white-space: nowrap; text-decoration: none;
}

.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); box-shadow: var(--shadow-md); }

.btn-secondary {
  background: var(--gray-100); color: var(--gray-700);
  border: 1px solid var(--gray-300);
}
.btn-secondary:hover { background: var(--gray-200); }

.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #DC2626; }

.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-lg { padding: 12px 24px; font-size: 16px; }

.input {
  width: 100%; padding: 10px 14px;
  border: 1px solid var(--gray-300); border-radius: var(--radius-md);
  font-size: 14px; color: var(--gray-900); background: white;
  transition: all 0.2s; outline: none;
}
.input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(99,102,241,0.1); }
.input::placeholder { color: var(--gray-400); }

.form-clean { display: flex; flex-direction: column; gap: 16px; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; font-weight: 600; color: var(--gray-700); }

.form-actions { display: flex; gap: 12px; margin-top: 8px; }

.badge {
  display: inline-flex; align-items: center;
  padding: 4px 10px; border-radius: var(--radius-full);
  font-size: 12px; font-weight: 500;
  background: var(--gray-100); color: var(--gray-700);
  border: 1px solid var(--gray-200);
}

.pill {
  display: inline-flex; align-items: center;
  padding: 4px 10px; border-radius: var(--radius-full);
  font-size: 12px; font-weight: 500;
  background: var(--gray-100); color: var(--gray-700);
  border: 1px solid var(--gray-200);
}
.pill.ok      { background: #D1FAE5; color: #065F46; border-color: #A7F3D0; }
.pill.warning { background: #FEF3C7; color: #92400E; border-color: #FDE68A; }
.pill.danger  { background: #FEE2E2; color: #991B1B; border-color: #FECACA; }
.pill.info    { background: #DBEAFE; color: #1E40AF; border-color: #BFDBFE; }

.alert { padding: 12px 16px; border-radius: var(--radius-md); font-size: 14px; margin-bottom: 16px; border: 1px solid; }
.alert-danger  { background: #FEE2E2; color: #991B1B; border-color: #FCA5A5; }
.alert-success { background: #D1FAE5; color: #065F46; border-color: #6EE7B7; }
.alert-info    { background: #DBEAFE; color: #1E40AF; border-color: #93C5FD; }

/* ===================================
   TABLA
=================================== */
.table-wrap {
  overflow-x: auto; border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg); margin-bottom: 24px;
}

.table { width: 100%; border-collapse: collapse; background: white; }
.table thead { background: var(--gray-50); border-bottom: 1px solid var(--gray-200); }

.table th {
  padding: 12px 16px; text-align: left;
  font-size: 12px; font-weight: 600; color: var(--gray-600);
  text-transform: uppercase; letter-spacing: 0.5px;
}

.table td {
  padding: 12px 16px; font-size: 14px;
  color: var(--gray-900); border-bottom: 1px solid var(--gray-100);
}

.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: var(--gray-50); }

.toolbar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px; gap: 16px; flex-wrap: wrap;
}

.page-title { font-size: 24px; font-weight: 700; color: var(--gray-900); margin: 0 0 24px; }

/* ===================================
   BOTONES DE ACCIONES (TABLA)
=================================== */
.actions { display: flex; gap: 8px; align-items: center; }

.btn-action {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 7px 12px; border-radius: 8px;
  font-size: 12px; font-weight: 600; border: none;
  cursor: pointer; transition: all 0.2s ease;
  white-space: nowrap; text-decoration: none;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.btn-action:hover { transform: translateY(-2px); box-shadow: 0 4px 10px rgba(0,0,0,0.18); }
.btn-action:active { transform: translateY(0); }
.btn-action svg { width:14px; height:14px; flex-shrink:0; }

.btn-ver    { background:linear-gradient(135deg,#3B82F6,#2563EB); color:white; }
.btn-ver:hover { background:linear-gradient(135deg,#2563EB,#1D4ED8); box-shadow:0 4px 10px rgba(59,130,246,0.4); }

.btn-editar { background:linear-gradient(135deg,#10B981,#059669); color:white; }
.btn-editar:hover { background:linear-gradient(135deg,#059669,#047857); box-shadow:0 4px 10px rgba(16,185,129,0.4); }

.btn-eliminar { background:linear-gradient(135deg,#EF4444,#DC2626); color:white; }
.btn-eliminar:hover { background:linear-gradient(135deg,#DC2626,#B91C1C); box-shadow:0 4px 10px rgba(239,68,68,0.4); }

.btn-descargar { background:linear-gradient(135deg,#8B5CF6,#7C3AED); color:white; }
.btn-descargar:hover { box-shadow:0 4px 10px rgba(139,92,246,0.4); }

.btn-imprimir { background:linear-gradient(135deg,#6B7280,#4B5563); color:white; }
.btn-imprimir:hover { box-shadow:0 4px 10px rgba(107,114,128,0.4); }

.btn-aprobar { background:linear-gradient(135deg,#22C55E,#16A34A); color:white; }
.btn-aprobar:hover { box-shadow:0 4px 10px rgba(34,197,94,0.4); }

.btn-rechazar { background:linear-gradient(135deg,#F59E0B,#D97706); color:white; }
.btn-rechazar:hover { box-shadow:0 4px 10px rgba(245,158,11,0.4); }

.btn-enviar { background:linear-gradient(135deg,#06B6D4,#0891B2); color:white; }
.btn-enviar:hover { box-shadow:0 4px 10px rgba(6,182,212,0.4); }

.btn-duplicar { background:linear-gradient(135deg,#6366F1,#4F46E5); color:white; }
.btn-duplicar:hover { box-shadow:0 4px 10px rgba(99,102,241,0.4); }

@media (max-width:480px) {
  .btn-action span { display:none; }
  .btn-action { padding:7px; }
}

/* ===================================
   LOGIN
=================================== */
body.is-login {
  background: #ffffff; margin:0; padding:0;
  display:flex; align-items:center; justify-content:center; min-height:100vh;
}

#particles-bg { position:fixed; inset:0; z-index:0; pointer-events:none; }

.login-wrap {
  position:relative; z-index:1;
  width:100%; max-width:440px; padding:20px;
}

.login-card {
  background:rgba(255,255,255,0.98);
  border:1px solid rgba(0,0,0,0.08);
  border-radius:20px; padding:48px 40px;
  box-shadow:0 20px 60px rgba(0,0,0,0.12);
}

.login-brand { display:flex; align-items:center; gap:16px; margin-bottom:36px; }

.login-brand .logo {
  width:56px; height:56px; flex-shrink:0;
  display:flex; align-items:center; justify-content:center;
  transition:transform 0.3s;
}
.login-brand .logo:hover { transform:scale(1.05); }
.login-brand .logo svg { width:100%; height:100%; filter:drop-shadow(0 4px 12px rgba(99,102,241,0.25)); }

.login-title { font-size:24px; font-weight:800; color:#1F2937; margin:0 0 4px; letter-spacing:-0.3px; }
.login-sub   { font-size:14px; color:#6B7280; margin:0; }

.login-alert-error {
  display:flex; align-items:center; gap:10px;
  padding:14px 16px; background:#FEE2E2;
  border:1px solid #FCA5A5; border-radius:12px;
  color:#991B1B; font-size:14px; margin-bottom:24px;
}
.login-alert-error svg { flex-shrink:0; color:#DC2626; }

.form-grid   { display:flex; flex-direction:column; gap:20px; }
.form-row    { display:flex; flex-direction:column; gap:8px; }

.form-row .label {
  display:flex; align-items:center; gap:8px;
  font-size:14px; font-weight:600; color:#374151;
}
.form-row .label svg { color:#6366F1; flex-shrink:0; }

.form-row .input {
  padding:14px 16px; border:2px solid #E5E7EB;
  border-radius:12px; font-size:15px; color:#1F2937;
  background:#F9FAFB; transition:all 0.2s;
}
.form-row .input:focus { border-color:#6366F1; background:#fff; box-shadow:0 0 0 4px rgba(99,102,241,0.1); }
.form-row .input::placeholder { color:#9CA3AF; }

.password-wrapper { position:relative; width:100%; }
.password-wrapper .password-input { padding-right:50px; }

.password-toggle {
  position:absolute; right:12px; top:50%; transform:translateY(-50%);
  background:none; border:none; color:#9CA3AF; cursor:pointer;
  padding:8px; border-radius:8px; transition:all 0.2s;
  display:flex; align-items:center; justify-content:center;
}
.password-toggle:hover { color:#6366F1; background:rgba(99,102,241,0.1); }

.form-row-checkbox { display:flex; align-items:center; }
.checkbox-label {
  display:flex; align-items:center; gap:8px;
  font-size:14px; color:#6B7280; cursor:pointer; user-select:none;
}
.checkbox-label input[type="checkbox"] { width:18px; height:18px; cursor:pointer; accent-color:#6366F1; }

.btn-login {
  width:100%; padding:16px 24px;
  background:linear-gradient(135deg,#6366F1,#8B5CF6);
  color:white; border:none; border-radius:12px;
  font-size:16px; font-weight:600; cursor:pointer;
  display:flex; align-items:center; justify-content:center; gap:10px;
  transition:all 0.3s; box-shadow:0 4px 12px rgba(99,102,241,0.25);
}
.btn-login:hover { transform:translateY(-2px); box-shadow:0 6px 20px rgba(99,102,241,0.35); }
.btn-login:active { transform:translateY(0); }

.login-footer { margin-top:32px; padding-top:24px; border-top:1px solid #E5E7EB; text-align:center; }
.login-footer p { font-size:13px; color:#9CA3AF; margin:0; }

/* ===================================
   CATÁLOGO SYSCOM
=================================== */
.tipo-cambio-badge {
  display:flex; align-items:center; gap:6px;
  font-size:13px; color:var(--gray-500);
  background:var(--gray-50); border:1px solid var(--gray-200);
  padding:8px 14px; border-radius:var(--radius-full);
}
.tipo-cambio-badge strong { color:var(--gray-800); }

.catalogo-filters { display:flex; gap:12px; align-items:center; flex-wrap:wrap; }

.filter-search { position:relative; flex:1; min-width:220px; }
.filter-search svg {
  position:absolute; left:12px; top:50%; transform:translateY(-50%);
  color:var(--gray-400); pointer-events:none;
}
.filter-search .input { padding-left:38px; }
.filter-select { width:210px; }

/* Grid */
.catalogo-grid {
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(230px,1fr));
  gap:20px; margin-bottom:32px;
}

/* Tarjeta */
.producto-card {
  background:white; border:1px solid var(--gray-200);
  border-radius:16px; overflow:hidden;
  display:flex; flex-direction:column;
  transition:all 0.25s ease;
  box-shadow:0 1px 4px rgba(0,0,0,0.06);
}
.producto-card:hover {
  transform:translateY(-5px);
  box-shadow:0 16px 40px rgba(99,102,241,0.12);
  border-color:rgba(99,102,241,0.35);
}

.producto-img-wrap {
  position:relative; width:100%; height:210px;
  background:#F8F9FF; display:flex; align-items:center; justify-content:center;
  overflow:hidden; border-bottom:1px solid var(--gray-100);
}
.producto-img-wrap img {
  width:100%; height:100%; object-fit:contain;
  padding:16px; transition:transform 0.3s ease;
}
.producto-card:hover .producto-img-wrap img { transform:scale(1.06); }

.img-fallback {
  display:flex; align-items:center; justify-content:center;
  width:100%; height:100%; color:var(--gray-300);
}

/* Badge stock */
.stock-tag {
  position:absolute; bottom:10px; left:10px;
  display:inline-flex; align-items:center; gap:4px;
  padding:4px 10px; border-radius:var(--radius-full);
  font-size:11px; font-weight:700;
  box-shadow:0 2px 8px rgba(0,0,0,0.15);
}
.stock-tag.ok       { background:#D1FAE5; color:#065F46; border:1px solid #A7F3D0; }
.stock-tag.warning  { background:#FEF3C7; color:#92400E; border:1px solid #FDE68A; }
.stock-tag.danger   { background:#FEE2E2; color:#991B1B; border:1px solid #FECACA; }
.stock-tag.consultar{ background:#DBEAFE; color:#1E40AF; border:1px solid #BFDBFE; }

/* Body tarjeta */
.producto-body { padding:16px; flex:1; display:flex; flex-direction:column; gap:6px; }

.producto-marca {
  font-size:11px; font-weight:800; color:var(--primary);
  text-transform:uppercase; letter-spacing:0.8px;
}

.producto-nombre {
  font-size:13.5px; font-weight:600; color:var(--gray-900);
  line-height:1.45; margin:0;
  display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical;
  overflow:hidden; min-height:58px;
}

.producto-sku { font-size:11.5px; color:var(--gray-400); margin:2px 0 0; font-family:monospace; }

/* Precios */
.producto-precios {
  margin-top:auto; padding-top:12px;
  border-top:1px dashed var(--gray-200);
  display:flex; flex-direction:column; gap:6px;
}

.precio-row    { display:flex; align-items:center; gap:8px; }

.precio-tag {
  font-size:10px; font-weight:700; padding:2px 7px;
  border-radius:4px; letter-spacing:0.5px; flex-shrink:0;
}
.precio-tag.usd { background:#EFF6FF; color:#1D4ED8; border:1px solid #BFDBFE; }
.precio-tag.mxn { background:#F0FDF4; color:#15803D; border:1px solid #BBF7D0; }

.precio-num     { font-size:18px; font-weight:800; color:#1D4ED8; line-height:1; }
.precio-num.mxn-num { font-size:15px; font-weight:700; color:#15803D; }
.precio-divider { height:1px; background:var(--gray-100); margin:2px 0; }
.precio-iva     { font-size:11px; color:var(--gray-400); margin:0; }
.precio-consultar { font-size:13px; color:var(--gray-400); font-style:italic; margin:8px 0 0; }

/* Botón ver detalle */
.producto-btn-ver {
  display:flex; align-items:center; justify-content:center; gap:8px;
  padding:12px 16px;
  background:linear-gradient(135deg,#6366F1,#8B5CF6);
  color:white; font-size:13px; font-weight:600;
  transition:all 0.2s; text-decoration:none;
  border-top:1px solid rgba(99,102,241,0.2);
}
.producto-btn-ver:hover { background:linear-gradient(135deg,#4F46E5,#7C3AED); gap:12px; }

/* Vacío */
.catalogo-empty { text-align:center; padding:80px 20px; color:var(--gray-400); }
.catalogo-empty svg { margin:0 auto 16px; display:block; color:var(--gray-300); }
.catalogo-empty h3 { font-size:20px; font-weight:700; color:var(--gray-600); margin:0 0 8px; }
.catalogo-empty p  { font-size:14px; margin:0 0 24px; }

/* Paginación */
.catalogo-pagination { display:flex; align-items:center; justify-content:center; gap:12px; padding-bottom:16px; }
.pagination-pages { display:flex; gap:6px; }

.pagination-num {
  width:36px; height:36px;
  display:flex; align-items:center; justify-content:center;
  border-radius:var(--radius-md);
  font-size:14px; font-weight:500; color:var(--gray-600);
  border:1px solid var(--gray-200); transition:all 0.2s; text-decoration:none;
}
.pagination-num:hover  { background:var(--gray-100); }
.pagination-num.active { background:var(--primary); color:white; border-color:var(--primary); font-weight:700; }

/* Detalle */
.detalle-grid { display:grid; grid-template-columns:1fr 1fr; gap:40px; align-items:start; }
.detalle-galeria { display:flex; flex-direction:column; gap:12px; }

.img-principal {
  border-radius:12px; overflow:hidden; background:var(--gray-50);
  display:flex; align-items:center; justify-content:center;
  height:340px; border:1px solid var(--gray-200);
}
.img-principal img { max-width:100%; max-height:100%; object-fit:contain; padding:16px; }

.img-thumbs { display:flex; gap:8px; flex-wrap:wrap; }
.thumb-img {
  width:72px; height:72px; object-fit:contain;
  border:2px solid var(--gray-200); border-radius:8px;
  cursor:pointer; padding:4px; background:var(--gray-50); transition:border-color 0.2s;
}
.thumb-img:hover { border-color:var(--primary); }

.detalle-specs { border:1px solid var(--gray-200); border-radius:10px; overflow:hidden; }
.spec-row { display:flex; padding:10px 16px; border-bottom:1px solid var(--gray-100); font-size:14px; }
.spec-row:last-child { border-bottom:none; }
.spec-label { font-weight:600; color:var(--gray-600); width:130px; flex-shrink:0; }
.spec-value { color:var(--gray-900); }


/* ===================================
   MÓVIL - OVERLAY Y BOTONES EXTRA
=================================== */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 999;
  cursor: pointer;
}
.sidebar-overlay.active { display:block; }

.mobile-menu-btn {
  display: none;
  width:40px; height:40px;
  border:none; background:var(--gray-100);
  border-radius:var(--radius-md);
  align-items:center; justify-content:center;
  cursor:pointer; color:var(--gray-700);
  transition:all 0.2s; flex-shrink:0;
}
.mobile-menu-btn:hover { background:var(--gray-200); }

.mobile-logout {
  display: none;
  align-items:center; justify-content:center;
  width:40px; height:40px;
  border-radius:var(--radius-md);
  background:var(--gray-100);
  border:1px solid var(--gray-200);
  color:var(--gray-700);
  transition:all 0.2s;
  text-decoration:none;
  flex-shrink:0;
}
.mobile-logout:hover { background:#FEE2E2; color:#991B1B; }

/* ===================================
   RESPONSIVE
=================================== */
@media (max-width:768px) {
  .sidebar { position:fixed; top:0; left:0; height:100vh; z-index:1000; transform:translateX(-100%); }
  .sidebar.active  { transform:translateX(0); }
  .sidebar.collapsed { transform:translateX(-100%); }
  .topbar  { padding:0 16px; }
  .topbar-title { font-size:18px; }
  .page-content { padding:16px; }
  .user-details { display:none; }
  .catalogo-filters { flex-direction:column; align-items:stretch; }
  .filter-select { width:100%; }
  .catalogo-grid { grid-template-columns:repeat(2,1fr); gap:12px; }
  .producto-img-wrap { height:170px; }
  .detalle-grid { grid-template-columns:1fr; gap:24px; }
  .img-principal { height:240px; }
  .back-button-text { display:none; }
  .sidebar-toggle  { display:none; }
  .mobile-menu-btn { display:flex; }
  .mobile-logout   { display:flex; }
}

@media (max-width:480px) {
  .catalogo-grid { grid-template-columns:1fr; }
  .btn-action span { display:none; }
  .btn-action { padding:7px; }
  .form-actions { flex-direction:column; }
  .form-actions .btn { width:100%; }
}

/* ===================================
   UTILIDADES
=================================== */
.text-center { text-align:center; }
.text-right  { text-align:right; }
.text-muted  { color:var(--gray-500); }
.text-sm     { font-size:13px; }
.font-bold   { font-weight:700; }
.mb-0 { margin-bottom:0!important; }
.mb-1 { margin-bottom:8px; }
.mb-2 { margin-bottom:16px; }
.mb-3 { margin-bottom:24px; }
.mt-1 { margin-top:8px; }
.mt-2 { margin-top:16px; }
.mt-3 { margin-top:24px; }
.flex { display:flex; }
.items-center { align-items:center; }
.justify-between { justify-content:space-between; }
.gap-1 { gap:8px; }
.gap-2 { gap:16px; }