/* ==========================================================================
   BLOOM BEAUTY - PANEL DE ADMINISTRACIÓN PROFESIONAL VIP & FÁCIL DE USAR
   Diseño Ultraclaro, Intuitivo y Elegante en Dark Luxury con Champagne Gold
   ========================================================================== */

:root {
  --admin-bg-base: #0B0B0D;
  --admin-bg-surface: #131316;
  --admin-bg-card: #1A1A1F;
  --admin-bg-card-hover: #22222A;
  --admin-border: rgba(212, 175, 55, 0.22);
  --admin-border-subtle: rgba(255, 255, 255, 0.08);
  
  --gold-primary: #D4AF37;
  --gold-light: #FDE68A;
  --gold-hover: #C5A028;
  --gold-gradient: linear-gradient(135deg, #E6CA65 0%, #D4AF37 50%, #997315 100%);
  --gold-glow: 0 0 25px rgba(212, 175, 55, 0.25);
  
  --text-main: #F4F4F6;
  --text-muted: #A3A3AF;
  --text-dim: #71717E;
  
  --success: #10B981;
  --success-bg: rgba(16, 185, 129, 0.14);
  --danger: #EF4444;
  --danger-bg: rgba(239, 68, 68, 0.14);
  --warning: #F59E0B;
  --warning-bg: rgba(245, 158, 11, 0.14);
  --info: #3B82F6;
  --info-bg: rgba(59, 130, 246, 0.14);
  
  --font-sans: 'Outfit', 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  
  --sidebar-w: 270px;
  --topbar-h: 74px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --transition: all 0.22s ease-in-out;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--admin-bg-base);
  color: var(--text-main);
  line-height: 1.5;
  overflow-x: hidden;
}

/* ==========================================================================
   BANNER DE GUÍA RÁPIDA SUPERIOR (ULTRA ENTENDIBLE)
   ========================================================================== */
.admin-guide-card {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.12) 0%, rgba(20, 20, 24, 0.85) 100%);
  border: 1px solid var(--admin-border);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.guide-text h3 {
  color: var(--gold-light);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.guide-text p {
  color: #D1D1DB;
  font-size: 0.88rem;
  line-height: 1.4;
}

.guide-quick-actions {
  display: flex;
  gap: 0.6rem;
  flex-shrink: 0;
}

.btn-guide-pill {
  background: var(--admin-bg-card);
  border: 1px solid var(--admin-border);
  color: #FFF;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}

.btn-guide-pill:hover {
  background: var(--gold-primary);
  color: #000;
  transform: translateY(-2px);
}

/* ==========================================================================
   PANTALLA DE ACCESO / LOGIN SENCILLO
   ========================================================================== */
.admin-login-overlay {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 50% 30%, #1c1c24 0%, #08080a 100%);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.login-card {
  width: 100%;
  max-width: 450px;
  background: var(--admin-bg-surface);
  border: 1px solid var(--admin-border);
  border-radius: var(--radius-lg);
  padding: 2.75rem 2.25rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8), var(--gold-glow);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.login-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gold-gradient);
}

.login-brand-logo {
  width: 82px;
  height: 82px;
  border-radius: 50%;
  border: 2px solid var(--gold-primary);
  margin: 0 auto 1.25rem;
  object-fit: cover;
  box-shadow: var(--gold-glow);
}

.login-title {
  font-family: var(--font-serif);
  font-size: 2.1rem;
  font-weight: 700;
  color: #FFF;
  letter-spacing: 0.5px;
}

.login-title span {
  color: var(--gold-light);
}

.login-subtitle {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 2rem;
}

.login-form .form-group {
  text-align: left;
  margin-bottom: 1.25rem;
}

.login-form label {
  display: block;
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--gold-light);
  margin-bottom: 0.4rem;
  font-weight: 600;
}

.login-form input {
  width: 100%;
  background: var(--admin-bg-card);
  border: 1px solid var(--admin-border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1rem;
  color: #fff;
  font-size: 1rem;
  transition: var(--transition);
}

.login-form input:focus {
  outline: none;
  border-color: var(--gold-primary);
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.35);
}

.btn-admin-primary {
  background: var(--gold-gradient);
  color: #0b0b0d;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.5px;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.9rem 1.4rem;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-admin-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(212, 175, 55, 0.45);
}

.login-alert-error {
  display: none;
  background: var(--danger-bg);
  border: 1px solid var(--danger);
  color: #FCA5A5;
  padding: 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
}

/* ==========================================================================
   SIDEBAR (CLARO, ORDENADO Y CON ICONOS GRANDES)
   ========================================================================== */
.admin-wrapper {
  display: flex;
  min-height: 100vh;
}

.admin-sidebar {
  width: var(--sidebar-w);
  background: var(--admin-bg-surface);
  border-right: 1px solid var(--admin-border-subtle);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 1000;
  transition: var(--transition);
}

.sidebar-brand-box {
  padding: 1.5rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--admin-border-subtle);
}

.sidebar-logo {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid var(--gold-primary);
  object-fit: cover;
}

.sidebar-brand-text h2 {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  color: #FFF;
  line-height: 1.1;
}

.sidebar-brand-text span {
  font-size: 0.72rem;
  color: var(--gold-light);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  font-weight: 700;
}

.sidebar-nav {
  flex: 1;
  padding: 1.25rem 0.85rem;
  overflow-y: auto;
}

.nav-section-title {
  font-size: 0.7rem;
  text-transform: uppercase;
  color: var(--gold-primary);
  letter-spacing: 1.5px;
  padding: 0.85rem 0.75rem 0.35rem;
  font-weight: 800;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0.8rem 0.95rem;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: var(--radius-sm);
  margin-bottom: 0.3rem;
  font-size: 0.94rem;
  font-weight: 500;
  transition: var(--transition);
  cursor: pointer;
  border: 1px solid transparent;
}

.nav-item:hover {
  color: #FFF;
  background: rgba(255, 255, 255, 0.05);
}

.nav-item.active {
  color: #FFF;
  background: rgba(212, 175, 55, 0.14);
  border-color: rgba(212, 175, 55, 0.4);
  font-weight: 600;
}

.nav-item.active .nav-icon {
  transform: scale(1.15);
}

.nav-icon {
  font-size: 1.15rem;
  transition: var(--transition);
}

.nav-badge {
  margin-left: auto;
  font-size: 0.75rem;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: var(--admin-bg-card);
  color: var(--gold-light);
  border: 1px solid var(--admin-border);
  font-weight: 700;
}

.sidebar-footer {
  padding: 1.1rem;
  border-top: 1px solid var(--admin-border-subtle);
  background: rgba(0, 0, 0, 0.25);
}

.live-users-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 0.95rem;
  background: var(--admin-bg-card);
  border: 1px solid var(--admin-border-subtle);
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  color: var(--text-muted);
}

.live-dot {
  width: 9px;
  height: 9px;
  background: var(--success);
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 10px var(--success);
  animation: pulse-dot 1.8s infinite;
}

@keyframes pulse-dot {
  0% { transform: scale(0.95); opacity: 0.7; }
  50% { transform: scale(1.25); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.7; }
}

/* ==========================================================================
   TOPBAR
   ========================================================================== */
.admin-main {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.admin-topbar {
  height: var(--topbar-h, 72px);
  min-height: var(--topbar-h, 72px);
  background: rgba(18, 16, 14, 0.95);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(212, 175, 55, 0.18);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.75rem;
  position: sticky;
  top: 0;
  z-index: 900;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
  gap: 1.25rem;
  box-sizing: border-box;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 0;
  flex: 1 1 auto;
}

.btn-sidebar-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(212, 175, 55, 0.28);
  color: var(--gold-light, #FDE68A);
  font-size: 1.25rem;
  border-radius: var(--radius-sm, 8px);
  cursor: pointer;
  flex-shrink: 0;
  transition: var(--transition);
}

.btn-sidebar-toggle:hover {
  background: rgba(212, 175, 55, 0.15);
  border-color: var(--gold-primary, #D4AF37);
  color: #FFFFFF;
  transform: scale(1.04);
}

.topbar-title-view {
  font-size: 1.28rem;
  font-weight: 700;
  color: #FFFFFF;
  letter-spacing: -0.01em;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-shrink: 0;
}

.topbar-badge-sync {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 0.95rem;
  font-size: 0.82rem;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34D399;
  border-radius: 999px;
  font-weight: 600;
  white-space: nowrap;
  user-select: none;
  box-sizing: border-box;
}

.live-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #34D399;
  box-shadow: 0 0 10px #34D399;
  animation: pulseDot 2s infinite ease-in-out;
  flex-shrink: 0;
}

@keyframes pulseDot {
  0% { transform: scale(0.9); opacity: 0.8; box-shadow: 0 0 4px #34D399; }
  50% { transform: scale(1.2); opacity: 1; box-shadow: 0 0 12px #34D399; }
  100% { transform: scale(0.9); opacity: 0.8; box-shadow: 0 0 4px #34D399; }
}

.topbar-btn-store {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 38px;
  padding: 0 1.15rem;
  font-size: 0.84rem;
  color: #0F0E0D;
  text-decoration: none;
  border-radius: var(--radius-sm, 8px);
  background: var(--gold-gradient, linear-gradient(135deg, #FDE68A 0%, #D4AF37 50%, #996515 100%));
  font-weight: 700;
  transition: var(--transition);
  box-shadow: 0 4px 14px rgba(212, 175, 55, 0.28);
  white-space: nowrap;
  box-sizing: border-box;
}

.topbar-btn-store:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.45);
  color: #000;
}

.topbar-user {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  box-sizing: border-box;
}

.user-avatar-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--gold-gradient, linear-gradient(135deg, #FDE68A 0%, #D4AF37 50%, #996515 100%));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #0F0E0D;
  font-size: 0.84rem;
  border: 1.5px solid rgba(255, 255, 255, 0.22);
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.btn-topbar-logout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 38px;
  padding: 0 0.95rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--admin-border-subtle, rgba(255, 255, 255, 0.12));
  color: var(--text-muted, #9CA3AF);
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 600;
  transition: var(--transition);
  border-radius: var(--radius-sm, 8px);
  white-space: nowrap;
  box-sizing: border-box;
}

.btn-topbar-logout:hover {
  color: #FFF;
  border-color: var(--danger, #EF4444);
  background: var(--danger-bg, rgba(239, 68, 68, 0.18));
  transform: translateY(-1px);
}

/* ==========================================================================
   ÁREA DE CONTENIDO Y TARJETAS
   ========================================================================== */
.admin-content-area {
  padding: 2rem;
  flex: 1;
}

.admin-view {
  display: none;
}

.admin-view.active {
  display: block;
  animation: fadeIn 0.25s ease-out;
}

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

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

.kpi-card {
  background: var(--admin-bg-surface);
  border: 1px solid var(--admin-border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: var(--transition);
}

.kpi-card:hover {
  border-color: var(--admin-border);
  transform: translateY(-3px);
  box-shadow: 0 10px 25px -5px rgba(0,0,0,0.4);
}

.kpi-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.kpi-label {
  font-size: 0.82rem;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.8px;
  font-weight: 700;
}

.kpi-icon-wrap {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: rgba(212, 175, 55, 0.12);
  color: var(--gold-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.kpi-value {
  font-size: 1.95rem;
  font-weight: 700;
  color: #FFF;
  line-height: 1.1;
  margin-bottom: 0.45rem;
}

.kpi-foot {
  font-size: 0.82rem;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 6px;
}

.kpi-foot .badge-real {
  background: rgba(16, 185, 129, 0.15);
  color: #34D399;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-weight: 700;
}

.card-panel {
  background: var(--admin-bg-surface);
  border: 1px solid var(--admin-border-subtle);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  margin-bottom: 1.75rem;
}

.panel-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.4rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.panel-title {
  font-size: 1.22rem;
  font-weight: 700;
  color: #FFF;
  display: flex;
  align-items: center;
  gap: 10px;
}

.panel-title span.tag {
  font-size: 0.75rem;
  padding: 0.2rem 0.65rem;
  background: var(--admin-bg-card);
  border: 1px solid var(--admin-border);
  color: var(--gold-light);
  border-radius: 999px;
  font-weight: 600;
}

.panel-actions-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}

/* ==========================================================================
   TABLAS ESTILIZADAS Y ULTRA ENTENDIBLES
   ========================================================================== */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

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

.admin-table th {
  background: var(--admin-bg-card);
  color: var(--gold-light);
  text-transform: uppercase;
  font-size: 0.76rem;
  letter-spacing: 1px;
  padding: 0.95rem 1.1rem;
  border-bottom: 1px solid var(--admin-border-subtle);
  white-space: nowrap;
  font-weight: 700;
}

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

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

.admin-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.025);
}

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

/* PRECIO CLICABLE / EDITABLE DIRECTO AL TOCAR */
.clickable-image-container {
  position: relative;
  width: 50px;
  height: 50px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  overflow: hidden;
  border: 1.5px dashed rgba(212, 175, 55, 0.5);
  transition: var(--transition);
  display: inline-block;
}

.clickable-image-container:hover {
  transform: scale(1.08);
  border-color: var(--gold-light);
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
}

.clickable-image-container .table-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.clickable-image-container .img-change-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition);
  color: #FFF;
  font-size: 0.68rem;
  font-weight: 700;
  text-align: center;
  line-height: 1.1;
  padding: 2px;
}

.clickable-image-container:hover .img-change-overlay {
  opacity: 1;
}

.clickable-price-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px dashed rgba(16, 185, 129, 0.45);
  color: #34D399;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 1.05rem;
  font-weight: 700;
  transition: var(--transition);
  position: relative;
  user-select: none;
}

.clickable-price-badge:hover {
  background: rgba(16, 185, 129, 0.25);
  border-color: #10B981;
  color: #6EE7B7;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.clickable-price-badge .edit-hint-icon {
  font-size: 0.85rem;
  opacity: 0.8;
  transition: var(--transition);
}

.clickable-price-badge:hover .edit-hint-icon {
  opacity: 1;
  transform: scale(1.2);
}

.inline-price-input {
  width: 130px;
  background: #000;
  border: 2px solid var(--gold-primary);
  border-radius: var(--radius-sm);
  color: #FFF;
  padding: 0.35rem 0.6rem;
  font-size: 1rem;
  font-weight: 700;
  outline: none;
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

/* CELDAS EDITABLES AL TOCAR (NOMBRE, MARCA, CATEGORIA) */
.editable-text-cell {
  cursor: pointer;
  padding: 0.3rem 0.5rem;
  border-radius: 6px;
  border: 1px dashed transparent;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
}

.editable-text-cell:hover {
  background: rgba(212, 175, 55, 0.12);
  border-color: rgba(212, 175, 55, 0.4);
}

.editable-text-cell:hover::after {
  content: '✏️';
  font-size: 0.75rem;
  opacity: 0.8;
}

.editable-pill-cell {
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.editable-pill-cell:hover {
  transform: scale(1.05);
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

.inline-edit-input {
  background: #0B0B0E;
  border: 2px solid var(--gold-primary);
  border-radius: 6px;
  color: #FFF;
  padding: 0.4rem 0.65rem;
  font-size: 0.92rem;
  font-weight: 600;
  width: 100%;
  min-width: 180px;
  outline: none;
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.4);
}

.inline-edit-select {
  background: #141418;
  border: 2px solid var(--gold-primary);
  border-radius: 6px;
  color: var(--gold-light);
  padding: 0.35rem 0.6rem;
  font-size: 0.88rem;
  font-weight: 700;
  outline: none;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.35);
}

/* EDICIÓN DE DISTINTIVOS (BADGES) Y DESCUENTOS */
.editable-badge-wrap {
  margin-top: 4px;
  cursor: pointer;
  display: inline-block;
}

.badge-chip {
  font-size: 0.75rem;
  color: var(--gold-light);
  background: rgba(212, 175, 55, 0.15);
  border: 1px dashed rgba(212, 175, 55, 0.4);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-weight: 700;
  transition: var(--transition);
}

.badge-chip:hover {
  background: var(--gold-primary);
  color: #000;
}

.badge-chip-empty {
  font-size: 0.72rem;
  color: var(--text-dim);
  border: 1px dashed rgba(255, 255, 255, 0.15);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  transition: var(--transition);
}

.badge-chip-empty:hover {
  color: var(--gold-light);
  border-color: var(--gold-primary);
}

.btn-toggle-discount {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition);
}

.btn-toggle-discount.active {
  background: rgba(239, 68, 68, 0.18);
  border-color: rgba(239, 68, 68, 0.45);
  color: #FCA5A5;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.25);
}

.btn-toggle-discount:hover {
  transform: scale(1.05);
  filter: brightness(1.2);
}

/* BOTONES DE ACCIÓN VISIBLES CON TEXTO CLARO */
.btn-table-action {
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: var(--transition);
  text-decoration: none;
  border: 1px solid transparent;
  margin-right: 4px;
}

.btn-table-action.primary {
  background: rgba(212, 175, 55, 0.15);
  border-color: var(--admin-border);
  color: var(--gold-light);
}

.btn-table-action.primary:hover {
  background: var(--gold-primary);
  color: #000;
}

.btn-table-action.danger {
  background: var(--danger-bg);
  border-color: rgba(239, 68, 68, 0.3);
  color: #F87171;
}

.btn-table-action.danger:hover {
  background: var(--danger);
  color: #FFF;
}

.btn-table-action.neutral {
  background: var(--admin-bg-card);
  border-color: var(--admin-border-subtle);
  color: var(--text-muted);
}

.btn-table-action.neutral:hover {
  color: #FFF;
  border-color: rgba(255, 255, 255, 0.2);
}

.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
}

.badge-status.active {
  background: var(--success-bg);
  color: #34D399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.badge-status.inactive {
  background: rgba(107, 114, 128, 0.2);
  color: #9CA3AF;
  border: 1px solid rgba(107, 114, 128, 0.35);
}

/* ==========================================================================
   FORMULARIOS Y MODALES
   ========================================================================== */
.search-input-wrap {
  position: relative;
}

.search-input-wrap input {
  background: var(--admin-bg-card);
  border: 1px solid var(--admin-border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.65rem 1rem 0.65rem 2.3rem;
  color: #FFF;
  font-size: 0.9rem;
  min-width: 260px;
}

.search-input-wrap .search-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  font-size: 0.9rem;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1rem;
}

.form-group-admin {
  margin-bottom: 1.1rem;
}

.form-group-admin label {
  display: block;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--gold-light);
  margin-bottom: 0.4rem;
  font-weight: 700;
}

.form-group-admin input,
.form-group-admin select,
.form-group-admin textarea {
  width: 100%;
  background: var(--admin-bg-card);
  border: 1px solid var(--admin-border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.95rem;
  color: #FFF;
  font-size: 0.92rem;
  font-family: inherit;
  transition: var(--transition);
}

.form-group-admin input:focus,
.form-group-admin select:focus,
.form-group-admin textarea:focus {
  outline: none;
  border-color: var(--gold-primary);
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.25);
}

.admin-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(6px);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.admin-modal-overlay.open {
  display: flex;
}

.admin-modal-box {
  background: var(--admin-bg-surface);
  border: 1px solid var(--admin-border);
  border-radius: var(--radius-md);
  width: 100%;
  max-width: 620px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.9), var(--gold-glow);
}

.admin-modal-header {
  padding: 1.4rem 1.6rem;
  border-bottom: 1px solid var(--admin-border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.admin-modal-header h3 {
  color: #FFF;
  font-size: 1.25rem;
  font-family: var(--font-serif);
}

.admin-modal-body {
  padding: 1.6rem;
}

.admin-modal-footer {
  padding: 1.1rem 1.6rem;
  border-top: 1px solid var(--admin-border-subtle);
  display: flex;
  justify-content: flex-end;
  gap: 0.85rem;
}

.btn-secondary {
  background: var(--admin-bg-card);
  border: 1px solid var(--admin-border-subtle);
  color: var(--text-muted);
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
}

.btn-secondary:hover {
  color: #FFF;
  border-color: rgba(255, 255, 255, 0.3);
}

/* ==========================================================================
   VISTA DE TELEMETRÍA Y HUELLA DIGITAL
   ========================================================================== */
.telemetry-card-box {
  background: var(--admin-bg-surface);
  border: 1px solid var(--admin-border-subtle);
  border-radius: var(--radius-md);
  padding: 1.6rem;
  margin-bottom: 1.6rem;
}

.session-badge-active {
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid var(--success);
  color: #34D399;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
}

.session-badge-closed {
  background: rgba(156, 163, 175, 0.15);
  border: 1px solid rgba(156, 163, 175, 0.35);
  color: #9CA3AF;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  font-size: 0.78rem;
}

.fp-pill {
  font-family: monospace;
  background: #0f0f12;
  padding: 0.25rem 0.6rem;
  border-radius: 5px;
  border: 1px solid rgba(212, 175, 55, 0.35);
  color: var(--gold-light);
  font-size: 0.82rem;
  font-weight: 700;
}

.geo-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #60A5FA;
  font-weight: 600;
}

.viewed-prods-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.viewed-prod-tag {
  background: var(--admin-bg-card);
  border: 1px solid var(--admin-border-subtle);
  border-radius: 8px;
  padding: 0.4rem 0.75rem;
  font-size: 0.84rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.viewed-prod-tag .time-spent {
  color: #000;
  font-weight: 700;
  font-size: 0.75rem;
  background: var(--gold-light);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
}

.action-timeline-item {
  position: relative;
  padding-left: 22px;
  margin-bottom: 12px;
  font-size: 0.85rem;
  border-left: 2px solid var(--admin-border);
}

.action-timeline-item::before {
  content: '';
  position: absolute;
  left: -5px;
  top: 4px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold-primary);
}

/* ==========================================================================
   RESPONSIVE DESIGN V4 (MULTIDISPOSITIVOS: LAPTOPS, TABLETS & CELULARES)
   ========================================================================== */
.btn-sidebar-toggle {
  display: none;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--admin-border);
  color: var(--gold-light);
  font-size: 1.25rem;
  width: 40px;
  height: 40px;
  border-radius: 9px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-right: 0.65rem;
}

.btn-sidebar-toggle:hover {
  background: rgba(212, 175, 55, 0.15);
  border-color: var(--gold-primary);
  color: #FFFFFF;
}

.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1040;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.sidebar-backdrop.active {
  display: block;
  opacity: 1;
}

@media (max-width: 1200px) {
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 992px) {
  .btn-sidebar-toggle {
    display: inline-flex;
  }
  .admin-sidebar {
    transform: translateX(-100%);
    z-index: 1050;
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.7);
  }
  .admin-sidebar.mobile-open {
    transform: translateX(0);
  }
  .admin-main {
    margin-left: 0;
  }
  .topbar-left {
    display: flex;
    align-items: center;
  }
  .form-grid-2, .form-grid-3 {
    grid-template-columns: 1fr;
  }
  .admin-guide-card {
    flex-direction: column;
    align-items: flex-start;
  }
  .sync-text {
    display: none;
  }
}

@media (max-width: 768px) {
  .admin-topbar {
    padding: 0 1rem;
    height: 64px;
    min-height: 64px;
    gap: 0.75rem;
    flex-wrap: nowrap;
  }
  .topbar-title-view {
    font-size: 1.05rem;
  }
  .topbar-right {
    gap: 0.5rem;
  }
  .topbar-btn-store {
    height: 34px;
    padding: 0 0.8rem;
    font-size: 0.78rem;
    border-radius: 7px;
  }
  .topbar-badge-sync {
    height: 34px;
    padding: 0 0.55rem;
  }
  .user-avatar-circle {
    width: 34px;
    height: 34px;
    font-size: 0.76rem;
  }
  .btn-topbar-logout {
    height: 34px;
    padding: 0 0.7rem;
    font-size: 0.78rem;
    border-radius: 7px;
  }
  .kpi-grid {
    grid-template-columns: 1fr;
  }
  .admin-content-area {
    padding: 1rem;
  }
  .admin-card {
    padding: 1rem;
    border-radius: 12px;
  }
  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .admin-modal-card {
    width: 95vw !important;
    max-width: 95vw !important;
    padding: 1.25rem 1rem !important;
    margin: 10px auto;
  }
  .admin-toast-container {
    bottom: 12px;
    right: 12px;
    left: 12px;
  }
  .admin-toast-item {
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .admin-topbar {
    padding: 0 0.65rem;
    height: 60px;
    min-height: 60px;
    gap: 0.45rem;
    flex-wrap: nowrap;
  }
  .btn-sidebar-toggle {
    width: 36px;
    height: 36px;
    font-size: 1.15rem;
  }
  .topbar-title-view {
    font-size: 0.92rem;
  }
  .topbar-right {
    gap: 0.35rem;
  }
  .topbar-btn-store {
    height: 32px;
    padding: 0 0.55rem;
    font-size: 0.74rem;
  }
  .topbar-badge-sync {
    height: 32px;
    padding: 0 0.45rem;
  }
  .user-avatar-circle {
    width: 32px;
    height: 32px;
    font-size: 0.72rem;
  }
  .btn-topbar-logout {
    height: 32px;
    padding: 0 0.55rem;
    font-size: 0.74rem;
  }
  .btn-topbar-logout .logout-text {
    display: none;
  }
  .balance-mode-tabs {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   SISTEMA DE NOTIFICACIONES TOAST & ADMINISTRACIÓN DE "TU SALDO" (V4)
   ========================================================================== */
.admin-toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.admin-toast-item {
  pointer-events: auto;
  background: #17171D;
  color: #F4F4F6;
  border: 1px solid var(--admin-border);
  border-left: 4px solid var(--gold-primary);
  padding: 0.85rem 1.25rem;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 390px;
  animation: adminToastSlideIn 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.admin-toast-item.toast-success {
  border-left-color: #10B981;
}

.admin-toast-item.toast-error {
  border-left-color: #EF4444;
}

.admin-toast-item.toast-warning {
  border-left-color: #F59E0B;
}

@keyframes adminToastSlideIn {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}

.balance-customer-banner {
  background: rgba(16, 185, 129, 0.09);
  border: 1px solid rgba(16, 185, 129, 0.28);
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1.1rem;
  text-align: center;
}

.balance-banner-tag {
  font-size: 0.74rem;
  color: #9CA3AF;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.balance-customer-banner h4 {
  color: #FFFFFF;
  font-size: 1.18rem;
  margin: 3px 0;
}

.balance-customer-banner > span {
  font-size: 0.84rem;
  color: #34D399;
}

.balance-current-pill {
  margin-top: 8px;
  display: inline-block;
  padding: 0.3rem 0.9rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.38);
  border: 1px solid rgba(52, 211, 153, 0.3);
  font-size: 0.85rem;
  color: #D1D5DB;
}

.balance-current-pill strong {
  color: #34D399;
  font-size: 0.96rem;
}

.balance-mode-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  background: #101014;
  padding: 5px;
  border-radius: 10px;
  border: 1px solid var(--admin-border-subtle);
  margin-bottom: 1rem;
}

.balance-mode-tab {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.55rem 0.4rem;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.balance-mode-tab:hover {
  color: #FFFFFF;
}

.balance-mode-tab.active {
  background: var(--admin-bg-card-hover);
  color: var(--gold-light);
  border: 1px solid rgba(212, 175, 55, 0.35);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.balance-quick-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: -4px;
}

.balance-quick-chips .btn-secondary {
  flex: 1;
  min-width: 72px;
  padding: 0.38rem 0.45rem;
  font-size: 0.78rem;
  text-align: center;
}

.balance-live-preview-box {
  margin-top: 1rem;
  background: #111116;
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.balance-live-preview-box .preview-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.balance-live-preview-box .preview-final {
  margin-top: 4px;
  padding-top: 7px;
  border-top: 1px dashed rgba(255, 255, 255, 0.12);
  font-size: 0.96rem;
  color: #FFFFFF;
}

.balance-live-preview-box .preview-final strong {
  color: #34D399;
  font-size: 1.15rem;
}

.balance-modal-tx-wrap {
  margin-top: 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--admin-border-subtle);
  border-radius: 10px;
  padding: 0.75rem 0.95rem;
}

.balance-tx-head {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--gold-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.balance-modal-tx-list {
  max-height: 120px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.balance-tx-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  padding-bottom: 4px;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.06);
}

.balance-tx-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.btn-approve-recharge {
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  color: #FFFFFF;
  border: none;
  padding: 0.4rem 0.85rem;
  border-radius: 7px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
  transition: all 0.2s ease;
}

.btn-approve-recharge:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.38);
}

/* ==========================================================================
   BLOOM BEAUTY ADMIN V6 — NUEVOS MÓDULOS AVANZADOS & 100% MOBILE-FIRST UX
   ========================================================================== */

/* Mostrar / Ocultar Contraseña */
.admin-pass-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.admin-pass-input-wrap input {
  width: 100%;
  padding-right: 2.9rem !important;
}

.btn-admin-pass-toggle {
  position: absolute;
  right: 0.55rem;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(212, 175, 55, 0.28);
  color: var(--gold-light);
  width: 34px;
  height: 34px;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.95rem;
  transition: var(--transition);
}

.btn-admin-pass-toggle:hover {
  background: rgba(212, 175, 55, 0.2);
  border-color: var(--gold-primary);
}

.btn-sidebar-close-mobile {
  display: none;
  margin-left: auto;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--admin-border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--gold-light);
  font-size: 1rem;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

/* Filtros en línea (Selects & Date Pickers) */
.admin-inline-filter-select {
  background: var(--admin-bg-card);
  border: 1px solid var(--admin-border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.9rem;
  color: #FFF;
  font-size: 0.88rem;
  font-family: inherit;
  min-height: 40px;
  cursor: pointer;
  color-scheme: dark;
  transition: var(--transition);
}

.admin-inline-filter-select:focus {
  outline: none;
  border-color: var(--gold-primary);
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.25);
}

/* Huella y Rastro Digital v6 */
.telemetry-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
}

.telemetry-user-identity-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, rgba(212, 175, 55, 0.08) 100%);
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: 10px;
  padding: 0.65rem 0.95rem;
  margin-bottom: 0.75rem;
}

.telemetry-time-box {
  text-align: right;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--admin-border-subtle);
  padding: 0.7rem 1rem;
  border-radius: 10px;
}

.telemetry-hw-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
  background: var(--admin-bg-card);
  padding: 0.95rem 1.1rem;
  border-radius: 10px;
  margin-bottom: 1rem;
  font-size: 0.85rem;
  border: 1px solid var(--admin-border-subtle);
}

/* Informes Diarios y Vistas Divididas */
.report-split-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.35rem;
  margin-top: 0.5rem;
}

.report-subcard {
  background: var(--admin-bg-card);
  border: 1px solid var(--admin-border-subtle);
  border-radius: var(--radius-md);
  padding: 1.2rem;
}

.report-subcard h4 {
  color: var(--gold-light);
  font-size: 0.96rem;
  margin-bottom: 0.85rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--admin-border-subtle);
}

.report-mini-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.report-mini-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 0.5rem 0.65rem;
  background: rgba(255, 255, 255, 0.025);
  border-radius: 8px;
  font-size: 0.86rem;
}

/* Administración de Notificaciones Inteligentes */
.notif-rules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 1.1rem;
}

.notif-rule-card {
  background: var(--admin-bg-card);
  border: 1px solid var(--admin-border);
  border-radius: var(--radius-md);
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: var(--transition);
}

.notif-rule-card.rule-paused {
  opacity: 0.68;
  border-color: var(--admin-border-subtle);
}

.notif-rule-preview {
  background: #101014;
  border: 1px dashed rgba(212, 175, 55, 0.3);
  border-radius: 8px;
  padding: 0.75rem 0.85rem;
}

.notif-rule-preview strong {
  display: block;
  color: #FFF;
  font-size: 0.86rem;
  margin-bottom: 3px;
}

.notif-rule-preview p {
  color: var(--text-muted);
  font-size: 0.8rem;
  line-height: 1.4;
}

.notif-delivery-log-list {
  max-height: 440px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 4px;
}

.notif-log-item {
  background: var(--admin-bg-card);
  border: 1px solid var(--admin-border-subtle);
  border-left: 3px solid var(--gold-primary);
  border-radius: 8px;
  padding: 0.7rem 0.9rem;
}

/* Modal de Pedido Manual */
.manual-order-items-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 0.75rem;
}

.manual-order-item-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 80px 130px auto;
  gap: 8px;
  align-items: center;
  background: rgba(255, 255, 255, 0.03);
  padding: 0.55rem;
  border-radius: 8px;
  border: 1px solid var(--admin-border-subtle);
}

.manual-order-total-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(16, 185, 129, 0.11);
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
}

.manual-order-total-bar strong {
  color: #34D399;
  font-size: 1.2rem;
}

/* ==========================================================================
   OPTIMIZACIÓN MÓVIL INTEGRAL (100% FLUIDO EN CELULARES Y PANTALLAS PEQUEÑAS)
   ========================================================================== */
@media (max-width: 992px) {
  .admin-sidebar {
    width: min(86vw, 300px);
    max-width: 300px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .btn-sidebar-close-mobile {
    display: inline-flex;
  }

  .report-split-grid {
    grid-template-columns: 1fr;
  }

  .guide-quick-actions {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
  }

  .btn-guide-pill {
    justify-content: center;
    text-align: center;
    padding: 0.65rem 0.6rem;
    font-size: 0.82rem;
  }
}

@media (max-width: 768px) {
  html, body {
    max-width: 100vw;
    overflow-x: hidden;
  }

  .admin-login-overlay {
    padding: 1rem;
  }

  .login-card {
    padding: 2rem 1.35rem;
  }

  .admin-content-area {
    padding: 0.9rem 0.75rem 2.5rem;
  }

  .card-panel,
  .telemetry-card-box {
    padding: 1.05rem 0.9rem;
    border-radius: 12px;
    margin-bottom: 1.1rem;
  }

  .panel-header-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.85rem;
  }

  .panel-title {
    font-size: 1.06rem;
    flex-wrap: wrap;
  }

  .panel-actions-row {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0.6rem;
  }

  .panel-actions-row > *,
  .search-input-wrap,
  .search-input-wrap input,
  .admin-inline-filter-select,
  .panel-actions-row .btn-admin-primary,
  .panel-actions-row .btn-secondary {
    width: 100% !important;
    min-width: 0 !important;
  }

  /* Evitar auto-zoom molesto en iOS Safari y mejorar tacto en Android */
  .login-form input,
  .form-group-admin input,
  .form-group-admin select,
  .form-group-admin textarea,
  .search-input-wrap input,
  .admin-inline-filter-select {
    font-size: 16px !important;
  }

  .telemetry-card-top {
    flex-direction: column;
    align-items: stretch;
  }

  .telemetry-time-box {
    text-align: left;
    width: 100%;
  }

  .telemetry-hw-grid {
    grid-template-columns: 1fr 1fr;
    padding: 0.8rem;
    font-size: 0.8rem;
  }

  .manual-order-item-row {
    grid-template-columns: 1fr 1fr;
  }

  .manual-order-item-row .man-item-prod-select {
    grid-column: 1 / -1;
  }

  .admin-modal-overlay {
    padding: 0.55rem;
    align-items: flex-end;
  }

  .admin-modal-box {
    width: 100% !important;
    max-width: 100% !important;
    max-height: 92vh;
    max-height: 92dvh;
    border-radius: 16px 16px 12px 12px;
  }

  .admin-modal-header {
    padding: 1rem 1.1rem;
    position: sticky;
    top: 0;
    background: var(--admin-bg-surface);
    z-index: 5;
  }

  .admin-modal-body {
    padding: 1.05rem;
  }

  .admin-modal-footer {
    padding: 0.9rem 1.05rem;
    flex-wrap: wrap;
  }

  .admin-modal-footer button {
    flex: 1 1 130px;
    justify-content: center;
  }
}

/* Conversión inteligente a Tarjetas Móviles para lectura perfecta sin pellizcar */
@media (max-width: 640px) {
  .kpi-value {
    font-size: 1.55rem;
  }

  .kpi-card {
    padding: 1.15rem;
  }

  .notif-rules-grid {
    grid-template-columns: 1fr;
  }

  .telemetry-hw-grid {
    grid-template-columns: 1fr;
  }

  .store-btn-text {
    display: none;
  }

  .topbar-btn-store {
    padding: 0 0.65rem;
  }

  /* Tablas con data-label se adaptan como tarjetas apiladas limpias en celular */
  .admin-table:has(td[data-label]),
  .admin-table:has(td[data-label]) tbody,
  .admin-table:has(td[data-label]) tr,
  .admin-table:has(td[data-label]) td {
    display: block;
    width: 100%;
  }

  .admin-table:has(td[data-label]) thead {
    display: none;
  }

  .admin-table:has(td[data-label]) tbody tr {
    background: var(--admin-bg-card);
    border: 1px solid var(--admin-border-subtle);
    border-radius: 12px;
    padding: 0.85rem 0.95rem;
    margin-bottom: 0.85rem;
  }

  .admin-table:has(td[data-label]) tbody td[data-label] {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding: 0.48rem 0;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.06);
    text-align: right !important;
    max-width: 100% !important;
    white-space: normal !important;
  }

  .admin-table:has(td[data-label]) tbody td[data-label]:last-child {
    border-bottom: none;
    padding-bottom: 0.1rem;
    padding-top: 0.65rem;
  }

  .admin-table:has(td[data-label]) tbody td[data-label]::before {
    content: attr(data-label);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gold-light);
    text-align: left;
    flex-shrink: 0;
    max-width: 42%;
  }
}

@media (max-width: 400px) {
  .guide-quick-actions {
    grid-template-columns: 1fr;
  }
}


/* ============================================================================
   14. BLOOM ADMIN v6.5 — SERVIDOR EN VIVO, TRANSICIONES FLUIDAS & UX MULTI-PANTALLA
   ============================================================================ */
.admin-view.active {
  animation: adminViewSlideIn 0.36s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes adminViewSlideIn {
  0% {
    opacity: 0;
    transform: translate3d(0, 10px, 0);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

.cloud-status-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.15rem;
  padding: 1.15rem 1.3rem;
  border-radius: 14px;
  margin-bottom: 1.2rem;
  border: 1px solid rgba(212, 175, 55, 0.28);
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.08), rgba(17, 17, 22, 0.92));
  transition: all 0.3s ease;
}

.cloud-status-banner.status-online {
  border-color: rgba(16, 185, 129, 0.45);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(17, 17, 22, 0.94));
}

.cloud-status-banner.status-offline {
  border-color: rgba(239, 68, 68, 0.45);
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.12), rgba(17, 17, 22, 0.94));
}

.cloud-status-main {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex: 1 1 320px;
}

.cloud-status-indicator {
  font-size: 1.35rem;
  line-height: 1;
  color: var(--gold-light);
  text-shadow: 0 0 12px rgba(212, 175, 55, 0.65);
}

.cloud-status-banner.status-online .cloud-status-indicator {
  color: #34D399;
  text-shadow: 0 0 12px rgba(52, 211, 153, 0.75);
}

.cloud-status-banner.status-offline .cloud-status-indicator {
  color: #F87171;
  text-shadow: 0 0 12px rgba(248, 113, 113, 0.75);
}

.cloud-status-main strong {
  display: block;
  color: #FFFFFF;
  font-size: 0.98rem;
  margin-bottom: 3px;
}

.cloud-status-main p {
  color: var(--text-muted);
  font-size: 0.82rem;
  line-height: 1.45;
  margin: 0;
}

.cloud-metrics-strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.cloud-metric-chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 0.48rem 0.8rem;
  min-width: 98px;
}

.cloud-metric-chip small {
  display: block;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-dim);
}

.cloud-metric-chip strong {
  display: block;
  font-size: 0.88rem;
  color: var(--gold-light);
  margin-top: 2px;
}

.cloud-ops-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.85rem;
}

.cloud-op-btn {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 12px !important;
  text-align: left !important;
  padding: 0.85rem 1rem !important;
  border-radius: 12px !important;
  background: rgba(255, 255, 255, 0.03) !important;
  border: 1px solid rgba(212, 175, 55, 0.22) !important;
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease !important;
}

.cloud-op-btn:hover {
  transform: translateY(-2px);
  border-color: var(--gold-primary) !important;
  background: rgba(212, 175, 55, 0.09) !important;
}

.cloud-op-btn > span {
  font-size: 1.35rem;
  flex-shrink: 0;
}

.cloud-op-btn strong {
  display: block;
  color: #FFFFFF;
  font-size: 0.86rem;
}

.cloud-op-btn small {
  display: block;
  color: var(--text-muted);
  font-size: 0.74rem;
  font-weight: 400;
  margin-top: 2px;
  line-height: 1.3;
}

/* Scrollbar sutil de lujo en el panel */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #0D0D11;
}

::-webkit-scrollbar-thumb {
  background: rgba(212, 175, 55, 0.28);
  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(212, 175, 55, 0.52);
}

@media (max-width: 768px) {
  .cloud-status-banner {
    padding: 0.95rem;
  }
  .cloud-metrics-strip {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }
}
