/* Reset y Variables */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #28185f;
  --primary-dark: #1e40af;
  --primary-light: #dbeafe;
  --secondary: #f59e0b;
  --secondary-light: #fef3c7;
  --success: #10b981;
  --success-light: #d1fae5;
  --danger: #ef4444;
  --danger-light: #fee2e2;
  --warning: #f59e0b;
  --warning-light: #fef3c7;
  --background: #f7f5f6;
  --surface: #ffffff;
  --border: #e2e8f0;
  --text-primary: #1f2937;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--background);
  color: var(--text-primary);
  line-height: 1.6;
}

/* Layout Principal */
.app-container {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 260px;
  background-color: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.sidebar-header {
  padding: 24px;
  border-bottom: 1px solid var(--border);
}

.logo {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 4px;
}

.logo-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
}

.sidebar-nav {
  padding: 16px;
  overflow-y: auto;
  flex: 1;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 8px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.2s;
  margin-bottom: 4px;
}

.nav-link:hover {
  background-color: var(--primary-light);
  color: var(--primary);
}

.nav-link.active {
  background-color: var(--primary-light);
  color: var(--primary);
  font-weight: 500;
}

.nav-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* Main Content */
.main-content {
  flex: 1;
  overflow: auto;
  min-width: 0;
}

.page-header {
  background-color: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.page-title {
  font-size: 24px;
  font-weight: 600;
  color: var(--text-primary);
}

.content-wrapper {
  padding: 24px;
}

/* ========================================
   BOTÓN HAMBURGUESA (Mobile Menu Toggle)
   ======================================== */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  color: var(--text-primary);
  border-radius: 8px;
  transition: background-color 0.2s;
}

.menu-toggle:hover {
  background-color: var(--background);
}

.menu-toggle svg {
  width: 24px;
  height: 24px;
}

/* Overlay para cerrar sidebar en móviles */
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
  opacity: 1;
}

/* Stats Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 24px;
}

.stat-card {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  transition: box-shadow 0.2s;
}

.stat-card:hover {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

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

.stat-info p:first-child {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.stat-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-primary);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon.blue {
  background-color: var(--primary-light);
}

.stat-icon.amber {
  background-color: var(--secondary-light);
}

.stat-icon svg {
  width: 24px;
  height: 24px;
}

.stat-icon.blue svg {
  color: var(--primary);
}

.stat-icon.amber svg {
  color: var(--secondary);
}

/* Card */
.card {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
}

.card-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
}

/* Tables */
.table-container {
  max-height: 500px;
  overflow-y: auto;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table-container thead th {
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 2;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
}

.table-detalles {
  border-collapse: separate;
}

thead tr {
  background-color: var(--background);
}

th {
  text-align: left;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

th.text-right {
  text-align: right;
}

tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background-color 0.2s;
}

tbody tr:hover {
  background-color: var(--background);
}

td {
  padding: 12px 16px;
  font-size: 14px;
}

td.text-right {
  text-align: right;
}

.table-ctaCte {
  margin-top: 15px;
  max-height: 400px;
  overflow-x: auto;
}

.table-ctaCte th {
  position: sticky;
  top: 0;
  background: white;
  z-index: 9;
}

.empty-state {
  padding: 48px 0;
  text-align: center;
  color: var(--text-secondary);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

.badge-primary {
  background-color: var(--primary-light);
  color: var(--primary-dark);
}

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

.badge-success {
  background-color: var(--success-light);
  color: #065f46;
}

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

.badge-materia-prima {
  background-color: #c5a6fa;
  color: #5f2db6;
}

/* Forms */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

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

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 16px; /* 16px previene zoom en iOS */
  transition: all 0.2s;
  background-color: var(--surface);
  margin-bottom: 14px;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.form-input:disabled,
.form-input:read-only {
  background-color: var(--background);
  color: var(--text-muted);
  cursor: not-allowed;
}

.form-textarea {
  resize: vertical;
  min-height: 100px;
}

/* Radio Buttons */
.radio-group {
  display: flex;
  gap: 24px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.radio-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
}

.radio-label input[type="radio"] {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
  cursor: pointer;
}

/* Buttons */
.btn {
  padding: 10px 24px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

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

.btn-primary:hover {
  background-color: var(--primary-dark);
}

.btn-secondary {
  background-color: var(--background);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background-color: var(--border);
}

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

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

.btn-icon {
  padding: 8px;
  border-radius: 8px;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s;
}

.btn-icon:hover {
  background-color: var(--background);
}

.btn-icon svg {
  width: 20px;
  height: 20px;
}

.form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
  flex-wrap: wrap;
}

/* Search */
.search-box {
  position: relative;
  margin-bottom: 20px;
}

.search-input {
  width: 100%;
  max-width: 400px;
  padding: 10px 14px 10px 40px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 16px; /* 16px previene zoom en iOS */
}

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

/* ========================================
   LOGIN PAGE
   ======================================== */
.login-body {
  background: linear-gradient(rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1)), url("../images/fondo-login.jpg")
    no-repeat center center fixed;
  background-size: cover;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
}

.login-container {
  width: 100%;
  max-width: 420px;
}

.login-card {
  background-color: var(--surface);
  border-radius: 16px;
  padding: 40px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

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

.login-logo {
  font-size: 32px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
}

.login-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
}

.login-form {
  margin-top: 24px;
}

.logo-img {
  display: block;
  max-width: 200px;
  width: 100%;
  height: auto;
  margin: 0 auto 10px auto;
  object-fit: contain;
}

.logo-img-2 {
  display: block;
  max-width: 150px;
  width: 100%;
  height: auto;
  margin: 0 auto auto auto;
  object-fit: contain;
}

.form-group-checkbox {
  margin-bottom: 24px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-primary);
}

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

.btn-login {
  width: 100%;
  padding: 12px;
  background-color: var(--primary);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
}

.btn-login:hover {
  background-color: var(--primary-dark);
}

.login-footer {
  text-align: center;
  margin-top: 20px;
}

.forgot-password {
  color: var(--primary);
  text-decoration: none;
  font-size: 14px;
}

.forgot-password:hover {
  text-decoration: underline;
}

/* Alerts */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 14px;
}

.alert-error {
  background-color: var(--danger-light);
  color: #991b1b;
  border: 1px solid #fecaca;
}

.alert-success {
  background-color: var(--success-light);
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.alert-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* Botón Volver */
.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 15px 0;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #6b7280;
  background: transparent;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-back:hover {
  color: var(--secondary-color);
  border-color: #d1d5db;
  background: #f9fafb;
}

.btn-back:active {
  transform: scale(0.98);
}

/* Kilos por Bolsa */
.form-group-horizontal {
  display: flex;
  gap: 5px;
  margin-bottom: 0;
  flex-wrap: wrap;
}

.form-group-horizontal label {
  width: 70%;
  min-width: 150px;
}

.form-group-horizontal input {
  max-width: 300px;
  margin-bottom: 0px;
}

.kilos-bolsa {
  display: flex;
  align-items: start;
  gap: 25px;
  flex-wrap: wrap;
}

.d-none {
  display: none !important;
}

/* Header Cuenta Corriente */
.header-ctaCte {
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

/* Tabs */
.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.tab-btn {
  padding: 8px 16px;
  border-radius: 6px;
  border: 1px solid #ddd;
  background: #f8f9fa;
  cursor: pointer;
  font-weight: 500;
}

.tab-btn.active {
  background: #2563eb;
  color: white;
  border-color: #2563eb;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* Password Toggle */
.password-group {
  position: relative;
}

.password-group .form-input {
  padding-right: 42px;
}

.password-toggle {
  position: absolute;
  right: 12px;
  top: 41px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
}

.password-toggle svg {
  width: 28px;
  height: 18px;
}

.password-toggle .eye-closed {
  display: none;
}

.password-toggle.active .eye-open {
  display: none;
}

.password-toggle.active .eye-closed {
  display: block;
}

.productoSelect {
  margin-top: 8px;
}

.producto-item .subtotal {
  color: var(--primary);
}

.select-cheque {
  max-width: 200px;
}

.detallePagoCabecera {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.ancho_producto {
  width: 200px;
}

/* ========================================
   PRODUCTO ITEM - Formulario Nuevo Remito
   ======================================== */
.producto-item {
  padding: 16px;
  background-color: var(--background);
  border-radius: 8px;
  margin-bottom: 16px;
  border: 1px solid var(--border);
}

.producto-item .subtotal {
  color: var(--primary);
  font-size: 15px;
  margin-top: 8px;
}

/* Botones de agregar/quitar producto más pequeños */
.btn-producto {
  padding: 8px 14px;
  font-size: 13px;
}

.btn-producto-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

/* Total del formulario */
.total-box {
  padding: 16px;
  background-color: var(--primary-light);
  border-radius: 8px;
  border: 1px solid var(--primary);
  margin-bottom: 20px;
}

.total-box-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.total-label {
  font-size: 18px;
  font-weight: 500;
  color: var(--text-primary);
}

.total-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--primary);
}

/* ========================================
   RESPONSIVE - TABLET (max-width: 992px)
   ======================================== */
@media (max-width: 992px) {
  .sidebar {
    width: 220px;
  }

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

  .page-header {
    padding: 20px;
  }

  .content-wrapper {
    padding: 20px;
  }

  .card {
    padding: 20px;
  }
}

/* ========================================
   RESPONSIVE - MOBILE (max-width: 768px)
   ======================================== */
@media (max-width: 768px) {
  /* Mostrar botón hamburguesa */
  .menu-toggle {
    display: flex;
  }

  /* Mostrar overlay */
  .sidebar-overlay {
    display: block;
    pointer-events: none;
  }

  .sidebar-overlay.active {
    pointer-events: auto;
  }

  /* Sidebar como drawer lateral */
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 1000;
    transform: translateX(-100%);
    box-shadow: none;
  }

  .sidebar.open {
    transform: translateX(0);
    box-shadow: 4px 0 15px rgba(0, 0, 0, 0.15);
  }

  /* Stats en columna única */
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .radio-group {
    flex-direction: column;
    gap: 12px;
  }

  .page-header {
    padding: 16px;
  }

  .page-title {
    font-size: 20px;
  }

  .content-wrapper {
    padding: 16px;
  }

  .card {
    padding: 16px;
    border-radius: 8px;
  }

  .card-title {
    font-size: 16px;
  }

  /* Tablas con scroll horizontal */
  .table-container {
    margin: 0 -16px;
    padding: 0 16px;
    border-radius: 0;
  }

  table {
    min-width: 500px;
  }

  th,
  td {
    padding: 10px 12px;
    font-size: 13px;
  }

  .stat-card {
    padding: 16px;
  }

  .stat-value {
    font-size: 26px;
  }

  .stat-icon {
    width: 40px;
    height: 40px;
  }

  .stat-icon svg {
    width: 20px;
    height: 20px;
  }

  /* Botones full width en móviles */
  .form-actions {
    flex-direction: column;
  }

  .form-actions .btn {
    width: 100%;
  }

  /* Login con fondo blanco en móviles (sin imagen) */
  .login-body {
    background: white;
  }

  .login-card {
    padding: 24px;
    border-radius: 12px;
    box-shadow: none;
  }

  .login-header {
    margin-bottom: 24px;
  }

  .logo-img {
    max-width: 160px;
  }

  .kilos-bolsa {
    flex-direction: column;
  }

  .form-group-horizontal {
    flex-direction: column;
  }

  .form-group-horizontal label {
    width: 100%;
  }

  .form-group-horizontal input {
    max-width: 100%;
  }
  /* Botones de producto más compactos en móviles */
  .btn-producto {
    padding: 8px 12px;
    font-size: 12px;
    flex: 1;
    min-width: 120px;
  }

  .btn-producto-group {
    flex-direction: column;
  }

  .btn-producto-group .btn {
    width: 100%;
  }

  /* Producto item más compacto */
  .producto-item {
    padding: 12px;
  }

  .producto-item .subtotal {
    font-size: 14px;
  }

  /* Total box responsive */
  .total-box {
    padding: 12px;
  }
  .total-label {
    font-size: 16px;
  }

  .total-value {
    font-size: 22px;
  }

  /* Campos granel en columna */
  .camposGranel {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .camposGranel .form-input {
    margin-bottom: 0;
  }
}

/* ========================================
   RESPONSIVE - MOBILE SMALL (max-width: 480px)
   ======================================== */
@media (max-width: 480px) {
  .page-header {
    padding: 12px 16px;
  }

  .page-title {
    font-size: 18px;
  }

  .content-wrapper {
    padding: 12px;
  }


  .stat-card {
    padding: 14px;
  }

  .stat-value {
    font-size: 22px;
  }

  .nav-link {
    padding: 10px 12px;
    font-size: 14px;
  }

  .nav-link span {
    font-size: 14px;
  }

  .login-body {
    padding: 12px;
  }

  .login-card {
    padding: 20px;
  }

  .tabs {
    gap: 6px;
  }

  .tab-btn {
    padding: 6px 12px;
    font-size: 13px;
  }

  .badge {
    padding: 3px 8px;
    font-size: 11px;
  }
  /* Botones aún más pequeños en pantallas muy chicas */
  .btn-producto {
    padding: 6px 10px;
    font-size: 11px;
  }

  .total-value {
    font-size: 20px;
  }

  .total-label {
    font-size: 14px;
  }
}

/* ========================================
   UTILIDADES RESPONSIVE
   ======================================== */
/* Ocultar en móviles */
@media (max-width: 768px) {
  .hide-mobile {
    display: none !important;
  }
}

/* Ocultar en desktop */
@media (min-width: 769px) {
  .hide-desktop {
    display: none !important;
  }
}

/* ========================================
   PAGE ACTION HEADER - Header con búsqueda y botón
   ======================================== */
/* Nueva clase reutilizable para headers con búsqueda y botón de acción */
.page-action-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.page-action-header .search-box {
  margin-bottom: 0;
  flex: 1;
  min-width: 200px;
  max-width: 400px;
}

/* Responsive para page-action-header */
@media (max-width: 768px) {
  .page-action-header {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .page-action-header .search-box {
    max-width: 100%;
    order: 2;
  }

  .page-action-header .btn {
    width: 100%;
    justify-content: center;
    order: 1;
  }
}

/* ========================================
   RESPONSIVE - LARGE SCREENS (min-width: 1440px)
   Laptops grandes y monitores medianos
   ======================================== */
@media (min-width: 1440px) {
  body {
    font-size: 17px;
  }

  .sidebar {
    width: 320px;
  }

  .sidebar-header {
    padding: 32px;
  }

  .logo {
    font-size: 30px;
  }

  .logo-subtitle {
    font-size: 16px;
  }

  .sidebar-nav {
    padding: 24px;
  }

  .nav-link {
    padding: 16px 20px;
    font-size: 16px;
    gap: 14px;
  }

  .nav-icon {
    width: 24px;
    height: 24px;
  }

  .page-header {
    padding: 32px 40px;
  }

  .page-title {
    font-size: 30px;
  }

  .content-wrapper {
    padding: 40px;
  }

  .stats-grid {
    gap: 32px;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  }

  .stat-card {
    padding: 32px;
    border-radius: 16px;
  }

  .stat-info p:first-child {
    font-size: 16px;
  }

  .stat-value {
    font-size: 44px;
  }

  .stat-icon {
    width: 64px;
    height: 64px;
    border-radius: 12px;
  }

  .stat-icon svg {
    width: 32px;
    height: 32px;
  }

  .card {
    padding: 32px;
    border-radius: 16px;
  }

  .card-title {
    font-size: 22px;
    margin-bottom: 24px;
  }

  th {
    padding: 16px 20px;
    font-size: 15px;
  }

  td {
    padding: 16px 20px;
    font-size: 16px;
  }

  .btn {
    padding: 14px 32px;
    font-size: 16px;
    border-radius: 10px;
  }

  .form-label {
    font-size: 16px;
    margin-bottom: 10px;
  }

  .form-input,
  .form-select,
  .form-textarea {
    padding: 14px 18px;
    font-size: 17px;
    border-radius: 10px;
  }

  .form-grid {
    gap: 28px;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  }

  .search-input {
    max-width: 500px;
    padding: 14px 18px 14px 48px;
    font-size: 17px;
  }

  .search-icon {
    width: 24px;
    height: 24px;
    left: 16px;
  }

  .badge {
    padding: 6px 14px;
    font-size: 14px;
  }

  .alert {
    padding: 16px 20px;
    font-size: 16px;
  }

  /* Login */
  .login-container {
    max-width: 500px;
  }

  .login-card {
    padding: 56px;
    border-radius: 20px;
  }

  .login-logo {
    font-size: 40px;
  }

  .login-subtitle {
    font-size: 17px;
  }

  .logo-img {
    max-width: 260px;
  }

  .btn-login {
    padding: 16px;
    font-size: 18px;
  }

  /* Tabs */
  .tab-btn {
    padding: 12px 24px;
    font-size: 16px;
  }

  /* Total box */
  .total-box {
    padding: 24px;
  }

  .total-label {
    font-size: 22px;
  }

  .total-value {
    font-size: 36px;
  }

  /* Producto item */
  .producto-item {
    padding: 24px;
  }

  .producto-item .subtotal {
    font-size: 18px;
  }

  .page-action-header .search-box {
    max-width: 500px;
  }
}

/* ========================================
   RESPONSIVE - XL SCREENS (min-width: 1920px)
   Monitores Full HD
   ======================================== */
@media (min-width: 1920px) {
  body {
    font-size: 19px;
  }

  .sidebar {
    width: 380px;
  }

  .sidebar-header {
    padding: 40px;
  }

  .logo {
    font-size: 36px;
  }

  .logo-subtitle {
    font-size: 18px;
  }

  .sidebar-nav {
    padding: 28px;
  }

  .nav-link {
    padding: 20px 24px;
    font-size: 18px;
    gap: 16px;
    margin-bottom: 8px;
  }

  .nav-icon {
    width: 28px;
    height: 28px;
  }

  .page-header {
    padding: 40px 56px;
  }

  .page-title {
    font-size: 36px;
  }

  .content-wrapper {
    padding: 56px;
  }

  .stats-grid {
    gap: 40px;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  }

  .stat-card {
    padding: 40px;
    border-radius: 20px;
  }

  .stat-info p:first-child {
    font-size: 18px;
  }

  .stat-value {
    font-size: 56px;
  }

  .stat-icon {
    width: 80px;
    height: 80px;
    border-radius: 16px;
  }

  .stat-icon svg {
    width: 40px;
    height: 40px;
  }

  .card {
    padding: 40px;
    border-radius: 20px;
  }

  .card-title {
    font-size: 26px;
    margin-bottom: 28px;
  }

  .table-container {
    max-height: 700px;
  }

  th {
    padding: 20px 24px;
    font-size: 17px;
  }

  td {
    padding: 20px 24px;
    font-size: 18px;
  }

  .btn {
    padding: 18px 40px;
    font-size: 18px;
    border-radius: 12px;
  }

  .form-label {
    font-size: 18px;
    margin-bottom: 12px;
  }

  .form-input,
  .form-select,
  .form-textarea {
    padding: 18px 22px;
    font-size: 18px;
    border-radius: 12px;
    margin-bottom: 18px;
  }

  .form-grid {
    gap: 36px;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  }

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

  .search-input {
    max-width: 600px;
    padding: 18px 22px 18px 56px;
    font-size: 18px;
  }

  .search-icon {
    width: 28px;
    height: 28px;
    left: 18px;
  }

  .badge {
    padding: 8px 18px;
    font-size: 16px;
  }

  .alert {
    padding: 20px 24px;
    font-size: 18px;
  }

  /* Login */
  .login-container {
    max-width: 580px;
  }

  .login-card {
    padding: 72px;
    border-radius: 24px;
  }

  .login-header {
    margin-bottom: 48px;
  }

  .login-logo {
    font-size: 48px;
  }

  .login-subtitle {
    font-size: 19px;
  }

  .logo-img {
    max-width: 320px;
  }

  .btn-login {
    padding: 20px;
    font-size: 20px;
    border-radius: 12px;
  }

  .checkbox-label {
    font-size: 17px;
  }

  .checkbox-input {
    width: 20px;
    height: 20px;
  }

  /* Tabs */
  .tab-btn {
    padding: 14px 28px;
    font-size: 18px;
  }

  .tabs {
    gap: 12px;
    margin-bottom: 24px;
  }

  /* Total box */
  .total-box {
    padding: 32px;
    border-radius: 12px;
  }

  .total-label {
    font-size: 26px;
  }

  .total-value {
    font-size: 44px;
  }

  /* Producto item */
  .producto-item {
    padding: 32px;
    border-radius: 12px;
    margin-bottom: 24px;
  }

  .producto-item .subtotal {
    font-size: 20px;
  }

  .btn-producto {
    padding: 12px 20px;
    font-size: 16px;
  }

  .page-action-header {
    margin-bottom: 36px;
    gap: 24px;
  }

  .page-action-header .search-box {
    max-width: 600px;
  }

  .radio-group {
    gap: 32px;
  }

  .radio-label {
    font-size: 17px;
    gap: 10px;
  }

  .radio-label input[type="radio"] {
    width: 20px;
    height: 20px;
  }
}

/* ========================================
   RESPONSIVE - 2K/4K SCREENS (min-width: 2560px)
   Monitores Ultra HD
   ======================================== */
@media (min-width: 2560px) {
  body {
    font-size: 22px;
  }

  .sidebar {
    width: 460px;
  }

  .sidebar-header {
    padding: 48px;
  }

  .logo {
    font-size: 44px;
  }

  .logo-subtitle {
    font-size: 22px;
  }

  .sidebar-nav {
    padding: 36px;
  }

  .nav-link {
    padding: 24px 28px;
    font-size: 22px;
    gap: 20px;
    margin-bottom: 10px;
    border-radius: 12px;
  }

  .nav-icon {
    width: 32px;
    height: 32px;
  }

  .page-header {
    padding: 48px 72px;
  }

  .page-title {
    font-size: 44px;
  }

  .content-wrapper {
    padding: 72px;
  }

  .stats-grid {
    gap: 48px;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
  }

  .stat-card {
    padding: 48px;
    border-radius: 24px;
  }

  .stat-info p:first-child {
    font-size: 22px;
  }

  .stat-value {
    font-size: 72px;
  }

  .stat-icon {
    width: 100px;
    height: 100px;
    border-radius: 20px;
  }

  .stat-icon svg {
    width: 52px;
    height: 52px;
  }

  .card {
    padding: 48px;
    border-radius: 24px;
  }

  .card-title {
    font-size: 32px;
    margin-bottom: 36px;
  }

  .table-container {
    max-height: 900px;
  }

  th {
    padding: 24px 32px;
    font-size: 20px;
  }

  td {
    padding: 24px 32px;
    font-size: 22px;
  }

  .btn {
    padding: 22px 48px;
    font-size: 22px;
    border-radius: 14px;
  }

  .form-label {
    font-size: 22px;
    margin-bottom: 14px;
  }

  .form-input,
  .form-select,
  .form-textarea {
    padding: 22px 28px;
    font-size: 22px;
    border-radius: 14px;
    margin-bottom: 24px;
  }

  .form-grid {
    gap: 48px;
    grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  }

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

  .search-input {
    max-width: 800px;
    padding: 22px 28px 22px 68px;
    font-size: 22px;
    border-radius: 14px;
  }

  .search-icon {
    width: 32px;
    height: 32px;
    left: 22px;
  }

  .badge {
    padding: 10px 22px;
    font-size: 18px;
  }

  .alert {
    padding: 24px 32px;
    font-size: 22px;
    border-radius: 12px;
  }

  /* Login */
  .login-container {
    max-width: 700px;
  }

  .login-card {
    padding: 88px;
    border-radius: 28px;
  }

  .login-header {
    margin-bottom: 56px;
  }

  .login-logo {
    font-size: 56px;
  }

  .login-subtitle {
    font-size: 24px;
  }

  .logo-img {
    max-width: 400px;
  }

  .btn-login {
    padding: 26px;
    font-size: 24px;
    border-radius: 14px;
  }

  .checkbox-label {
    font-size: 20px;
  }

  .checkbox-input {
    width: 24px;
    height: 24px;
  }

  /* Tabs */
  .tab-btn {
    padding: 18px 36px;
    font-size: 22px;
    border-radius: 10px;
  }

  .tabs {
    gap: 16px;
    margin-bottom: 32px;
  }

  /* Total box */
  .total-box {
    padding: 40px;
    border-radius: 16px;
  }

  .total-label {
    font-size: 32px;
  }

  .total-value {
    font-size: 56px;
  }

  /* Producto item */
  .producto-item {
    padding: 40px;
    border-radius: 16px;
    margin-bottom: 32px;
  }

  .producto-item .subtotal {
    font-size: 24px;
  }

  .btn-producto {
    padding: 16px 28px;
    font-size: 20px;
  }

  .btn-producto-group {
    gap: 16px;
  }

  .page-action-header {
    margin-bottom: 48px;
    gap: 32px;
  }

  .page-action-header .search-box {
    max-width: 800px;
  }

  .radio-group {
    gap: 40px;
  }

  .radio-label {
    font-size: 20px;
    gap: 12px;
  }

  .radio-label input[type="radio"] {
    width: 24px;
    height: 24px;
  }

  .empty-state {
    padding: 72px 0;
    font-size: 22px;
  }

  .btn-back {
    padding: 14px 24px;
    font-size: 18px;
  }
}

