/* ==========================================================================
   REPOSTERÍA JIREH - PANEL DE ADMINISTRACIÓN & OPERACIONES
   Versión 2.5: Contraseñas Personales, Matriz de Facultades por Rol,
   Vista Exclusiva "Mi Carga de Ruta" para Choferes y Control Total de Usuarios
   ========================================================================== */

:root {
  --admin-bg: #F4EFEB;
  --admin-card: #FFFFFF;
  --admin-sidebar: #1E110C;
  --admin-sidebar-text: #E5D5CE;
  --admin-sidebar-active: #C2763B;
  
  --primary: #C2763B;
  --primary-hover: #A85E25;
  --primary-light: #FBEFD8;
  
  --success: #10B981;
  --success-light: #D1FAE5;
  --warning: #F59E0B;
  --warning-light: #FEF3C7;
  --danger: #EF4444;
  --danger-light: #FEE2E2;
  --info: #3B82F6;
  --info-light: #DBEAFE;
  
  --text-main: #1F2937;
  --text-muted: #6B7280;
  --border: #E5E7EB;
  
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.12);
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
}

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

body {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  background-color: var(--admin-bg);
  color: var(--text-main);
  line-height: 1.5;
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.admin-sidebar {
  width: 275px;
  background: var(--admin-sidebar);
  color: var(--admin-sidebar-text);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  box-shadow: 2px 0 16px rgba(0,0,0,0.2);
}

.sidebar-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.sidebar-logo {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.sidebar-brand h2 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.4rem;
  color: #FFFFFF;
  line-height: 1.1;
  font-weight: 700;
}

.sidebar-brand span {
  font-size: 0.6875rem;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
}

/* Caja de Usuario Activo en Sesión */
.logged-user-box {
  margin: 1rem;
  padding: 0.85rem;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logged-user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1rem;
}

.logged-user-details {
  flex-grow: 1;
  margin-left: 0.75rem;
}

.logged-user-name {
  font-size: 0.875rem;
  font-weight: 700;
  color: #FFFFFF;
  line-height: 1.2;
}

.logged-user-role {
  font-size: 0.6875rem;
  color: var(--primary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.btn-logout-icon {
  background: none;
  border: none;
  color: #9CA3AF;
  cursor: pointer;
  padding: 0.35rem;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.btn-logout-icon:hover {
  color: #EF4444;
  background: rgba(239, 68, 68, 0.1);
}

/* Navegación Sidebar */
.sidebar-nav {
  list-style: none;
  padding: 0.4rem 0.75rem;
  flex-grow: 1;
  overflow-y: auto;
}

.nav-item {
  margin-bottom: 0.2rem;
}

.nav-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius-md);
  color: var(--admin-sidebar-text);
  font-size: 0.875rem;
  font-weight: 500;
  text-align: left;
  border: none;
  background: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.nav-btn svg {
  width: 19px;
  height: 19px;
  flex-shrink: 0;
  stroke: currentColor;
}

.nav-btn:hover {
  background: rgba(255,255,255,0.08);
  color: #FFFFFF;
}

.nav-btn.active {
  background: var(--primary);
  color: #FFFFFF;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(194, 118, 59, 0.35);
}

.nav-badge-pill {
  margin-left: auto;
  background: rgba(255,255,255,0.22);
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
}

.sidebar-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.btn-sidebar-action {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  color: var(--admin-sidebar-text);
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-sidebar-action:hover {
  background: rgba(255,255,255,0.1);
  color: #FFFFFF;
}

/* Layout Principal */
.admin-main {
  margin-left: 275px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.admin-topbar {
  background: var(--admin-card);
  border-bottom: 1px solid var(--border);
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 90;
  box-shadow: var(--shadow-xs);
}

.topbar-title h1 {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-main);
}

.topbar-title p {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.admin-body {
  padding: 2rem;
  flex-grow: 1;
}

/* Vistas */
.admin-view {
  display: none;
}

.admin-view.active {
  display: block;
}

.card {
  background: var(--admin-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 1.75rem;
  margin-bottom: 2rem;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 1rem;
}

.card-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
}

.card-subtitle {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* Tarjetas KPI */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.kpi-card {
  background: var(--admin-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.4rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.kpi-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.4rem;
}

.kpi-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.1;
  margin-bottom: 0.3rem;
}

.kpi-sub {
  font-size: 0.75rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.kpi-icon-badge {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.bg-primary-soft { background: var(--primary-light); color: var(--primary); }
.bg-success-soft { background: var(--success-light); color: var(--success); }
.bg-warning-soft { background: var(--warning-light); color: var(--warning); }
.bg-danger-soft { background: var(--danger-light); color: var(--danger); }
.bg-info-soft { background: var(--info-light); color: var(--info); }

/* Tablas */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

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

.admin-table th {
  background: #F9FAFB;
  padding: 0.75rem 1rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border);
}

.admin-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-main);
  vertical-align: middle;
}

.admin-table tr:hover {
  background-color: #F9FAFB;
}

/* Badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
}

.status-active { background: var(--success-light); color: #065F46; }
.status-pending { background: var(--warning-light); color: #92400E; }
.status-completed { background: var(--info-light); color: #1E40AF; }
.status-danger { background: var(--danger-light); color: #991B1B; }

/* Botones */
.btn-admin-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--primary);
  color: #FFFFFF;
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-admin-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.btn-admin-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #FFFFFF;
  color: var(--text-main);
  border: 1px solid var(--border);
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-admin-secondary:hover {
  background: #F3F4F6;
}

.btn-admin-danger {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--danger);
  color: #FFFFFF;
  border: none;
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
}

/* POS con fotos */
.pos-layout {
  display: grid;
  grid-template-columns: 1.65fr 1fr;
  gap: 1.75rem;
}

.pos-products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
  gap: 1.15rem;
}

.pos-item-card {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
}

.pos-item-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.pos-item-img-box {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #F3F4F6;
  position: relative;
}

.pos-item-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.pos-item-card:hover .pos-item-img {
  transform: scale(1.08);
}

.pos-item-stock-tag {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(4px);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.6875rem;
  font-weight: 700;
  color: #065F46;
}

/* Etiquetas y Banners de Chofer en POS */
.pos-driver-banner {
  background: linear-gradient(135deg, #2E1B13 0%, #1A0E0A 100%);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  color: #FFFFFF;
  margin-bottom: 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  border-left: 5px solid var(--primary);
  box-shadow: var(--shadow-sm);
}

.pos-item-driver-tag {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: #065F46;
  color: #FFFFFF;
  font-weight: 800;
  font-size: 0.75rem;
  padding: 0.3rem 0.65rem;
  border-radius: 9999px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  gap: 0.3rem;
  letter-spacing: 0.02em;
}

.pos-item-driver-tag.low {
  background: #DC2626;
  color: #FFFFFF;
  animation: pulseTag 2s infinite ease-in-out;
}

.pos-item-driver-tag.empty {
  background: #4B5563;
  color: #E5E7EB;
}

.pos-item-driver-tag.unassigned {
  background: #9CA3AF;
  color: #FFFFFF;
}

@keyframes pulseTag {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); box-shadow: 0 0 10px rgba(220, 38, 38, 0.6); }
}

.pos-item-card.depleted {
  opacity: 0.55;
  filter: grayscale(0.7);
  cursor: not-allowed;
}

.pos-item-card.depleted:hover {
  transform: none;
  border-color: var(--border);
  box-shadow: none;
}

.pos-tab-btn {
  padding: 0.4rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  border: 1px solid var(--border);
  background: #FFFFFF;
  color: #4B5563;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pos-tab-btn.active {
  background: var(--primary);
  color: #FFFFFF;
  border-color: var(--primary);
  box-shadow: 0 2px 6px rgba(194, 118, 59, 0.3);
}

.pos-item-body {
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.pos-item-name {
  font-weight: 700;
  font-size: 0.9375rem;
  line-height: 1.25;
  margin-bottom: 0.25rem;
  color: var(--text-main);
}

.pos-item-category {
  font-size: 0.6875rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
}

.pos-item-footer {
  margin-top: auto;
  padding-top: 0.6rem;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.pos-item-price {
  font-weight: 800;
  color: var(--primary);
  font-size: 1.25rem;
}

.pos-item-wholesale {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Ticket POS */
.pos-ticket-box {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
}

.ticket-items-list {
  flex-grow: 1;
  max-height: 340px;
  overflow-y: auto;
  border-bottom: 1px dashed var(--border);
  margin-bottom: 1rem;
  padding-bottom: 1rem;
}

.ticket-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 0;
  font-size: 0.875rem;
  border-bottom: 1px solid #F3F4F6;
}

.ticket-row-qty {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-qty {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: #F9FAFB;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

/* Comprobantes Insumos */
.expense-ticket-thumb {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: transform 0.2s ease;
}

.expense-ticket-thumb:hover {
  transform: scale(1.15);
  box-shadow: var(--shadow-md);
}

.photo-upload-dropzone {
  border: 2px dashed #D1D5DB;
  border-radius: var(--radius-md);
  padding: 1.25rem;
  text-align: center;
  cursor: pointer;
  background: #F9FAFB;
  transition: all 0.2s ease;
}

.photo-upload-dropzone:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.photo-preview-box {
  margin-top: 0.75rem;
  max-height: 140px;
  overflow: hidden;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  position: relative;
  display: none;
}

.photo-preview-box img {
  width: 100%;
  height: 140px;
  object-fit: cover;
}

/* ==========================================================================
   VISTA EXCLUSIVA DEL REPARTIDOR: "MI CARGA DE RUTA"
   ========================================================================== */
.my-route-hero {
  background: linear-gradient(135deg, #2E1B13 0%, #1A0E0A 100%);
  color: #FFFFFF;
  border-radius: var(--radius-xl);
  padding: 2.25rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-md);
}

.my-route-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.my-route-card {
  background: #FFFFFF;
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  position: relative;
}

.my-route-card.low-stock {
  border-color: #F59E0B;
}

.my-route-card-title {
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--text-main);
  margin-bottom: 0.35rem;
}

.my-route-stock-large {
  font-size: 3rem;
  font-weight: 900;
  color: var(--primary);
  line-height: 1;
  margin: 0.75rem 0 0.25rem;
}

/* ==========================================================================
   MATRIZ DE FACULTADES Y PERMISOS POR ROL
   ========================================================================== */
.permissions-matrix-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

.permissions-matrix-table th {
  background: #F9FAFB;
  padding: 0.75rem 0.85rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 2px solid var(--border);
  text-align: center;
}

.permissions-matrix-table th:first-child {
  text-align: left;
}

.permissions-matrix-table td {
  padding: 0.85rem;
  border-bottom: 1px solid var(--border);
  text-align: center;
}

.permissions-matrix-table td:first-child {
  text-align: left;
  font-weight: 700;
}

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

/* Driver Corte */
.driver-corte-card {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.driver-corte-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 0.75rem;
}

.driver-tag-box {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.driver-avatar-circle {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.product-admin-thumb {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  border: 1px solid var(--border);
}

.permission-pill {
  display: inline-block;
  background: #F3F4F6;
  border: 1px solid #E5E7EB;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.6875rem;
  color: #374151;
  margin: 0.1rem;
}

/* PDF Preview */
.pdf-preview-sheet {
  background: #FFFFFF;
  border: 1px solid #D1D5DB;
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-md);
  margin-top: 1.5rem;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.pdf-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid var(--primary);
  margin-bottom: 2rem;
}

.pdf-header-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.pdf-header-brand img {
  width: 56px;
  height: 56px;
  object-fit: contain;
}

.pdf-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.pdf-summary-item {
  background: #F9FAFB;
  border: 1px solid #E5E7EB;
  border-radius: var(--radius-sm);
  padding: 1rem;
  text-align: center;
}

.pdf-summary-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: #6B7280;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.pdf-summary-val {
  font-size: 1.4rem;
  font-weight: 800;
  color: #111827;
}

.pdf-signatures-box {
  margin-top: 3.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  text-align: center;
}

.signature-line {
  border-top: 1px solid #9CA3AF;
  padding-top: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #374151;
}

/* Modales */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(18, 10, 7, 0.75);
  backdrop-filter: blur(6px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal-container {
  background: #FFFFFF;
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  padding: 2.25rem;
  position: relative;
}

.modal-close-btn {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid #E5E7EB;
  background: #F9FAFB;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: bold;
}

/* Auth Gate Overlay */
.auth-gate-overlay {
  position: fixed;
  inset: 0;
  background: #170C08;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.auth-gate-card {
  background: #FFFFFF;
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  width: 100%;
  max-width: 460px;
  box-shadow: var(--shadow-lg);
  text-align: center;
}

/* Impresión */
@media print {
  body {
    background: #FFFFFF !important;
  }
  .admin-sidebar, .admin-topbar, .pdf-controls-bar, .modal-backdrop, .btn-admin-primary, .btn-admin-secondary {
    display: none !important;
  }
  .admin-main {
    margin-left: 0 !important;
  }
  .admin-body {
    padding: 0 !important;
  }
  .pdf-preview-sheet {
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    max-width: 100% !important;
  }
}

/* Responsive */
@media (max-width: 1024px) {
  .pos-layout {
    grid-template-columns: 1fr;
  }
  .pdf-summary-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .admin-sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }
  .admin-sidebar.mobile-open {
    transform: translateX(0);
  }
  .admin-main {
    margin-left: 0;
  }
}
