/* ==========================================================================
   PANELITAS DEL QUINDÍO - PANEL ADMINISTRATIVO
   Design System: Deep Roasted Espresso & Golden Panela
   ========================================================================== */

:root {
  --font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  
  /* Paleta Panela Artesanal */
  --bg-page: #0d0a08;
  --bg-surface: #171310;
  --bg-surface-elevated: #221b16;
  --bg-surface-hover: #2b221c;
  --bg-card: #191411;
  --bg-card-hover: #211a15;
  
  /* Acentos Dorados y Caramelo */
  --panela-primary: #e69110;
  --panela-bright: #f59e0b;
  --panela-light: #fbbf24;
  --panela-glow: rgba(245, 158, 11, 0.25);
  --panela-glow-subtle: rgba(245, 158, 11, 0.1);
  --panela-dark: #b45309;

  /* Colores Semánticos */
  --emerald: #10b981;
  --emerald-bg: rgba(16, 185, 129, 0.15);
  --rose: #ef4444;
  --rose-bg: rgba(239, 68, 68, 0.15);
  --blue: #3b82f6;
  --blue-bg: rgba(59, 130, 246, 0.15);
  
  /* Textos y Contrastes */
  --text-main: #fcf9f4;
  --text-secondary: #c9bfb3;
  --text-muted: #8c8071;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-medium: rgba(255, 255, 255, 0.14);
  --border-focus: var(--panela-bright);

  /* Sombras y Radios */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 30px rgba(245, 158, 11, 0.2);
}

/* Reset Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-page);
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  background-image: 
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(245, 158, 11, 0.08), transparent 70%),
    radial-gradient(circle at 100% 100%, rgba(180, 83, 9, 0.05), transparent 50%);
}

/* Tipografía */
h1, h2, h3, h4 {
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

p {
  color: var(--text-secondary);
}

a {
  color: var(--panela-light);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--text-main);
}

/* ==========================================================================
   VISTA DE AUTENTICACIÓN (LOGIN)
   ========================================================================== */
.auth-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: 
    radial-gradient(circle at 50% 20%, rgba(245, 158, 11, 0.15), transparent 50%),
    radial-gradient(circle at 20% 80%, rgba(180, 83, 9, 0.1), transparent 40%);
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xl);
  padding: 2.5rem 2rem;
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(20px);
}

.auth-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--panela-dark), var(--panela-bright), var(--panela-light));
}

.auth-header {
  text-align: center;
  margin-bottom: 2rem;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.auth-logo {
  height: 48px;
  width: auto;
  border-radius: 8px;
}

.badge-tag {
  background: var(--panela-glow);
  color: var(--panela-light);
  border: 1px solid rgba(245, 158, 11, 0.3);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 0.25rem 0.6rem;
  border-radius: 20px;
}

.auth-header h1 {
  font-size: 1.6rem;
  margin-bottom: 0.5rem;
}

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

.auth-form .form-group {
  margin-bottom: 1.25rem;
}

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

/* ==========================================================================
   FORMULARIOS Y CAMPOS
   ========================================================================== */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

input[type="text"],
input[type="password"],
input[type="number"],
textarea,
select {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  outline: none;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--panela-glow);
  background: #28201a;
}

textarea {
  resize: vertical;
}

.form-help {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.input-icon-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon-wrap input {
  padding-left: 2.75rem;
  padding-right: 2.75rem;
}

.input-icon {
  position: absolute;
  left: 0.9rem;
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  pointer-events: none;
}

.btn-toggle-pass {
  position: absolute;
  right: 0.75rem;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.35rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}

.btn-toggle-pass:hover {
  color: var(--text-main);
}

.btn-toggle-pass svg {
  width: 18px;
  height: 18px;
}

.input-prefix-wrap {
  display: flex;
  align-items: center;
}

.input-prefix {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-right: none;
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--panela-light);
}

.input-prefix-wrap input {
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.form-row {
  display: flex;
  gap: 1rem;
}

.flex-1 { flex: 1; }
.flex-2 { flex: 2; }

/* ==========================================================================
   BOTONES
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  white-space: nowrap;
}

.btn svg {
  width: 18px;
  height: 18px;
}

.btn-block {
  width: 100%;
}

.btn-sm {
  padding: 0.4rem 0.75rem;
  font-size: 0.8rem;
}

.btn-sm svg {
  width: 15px;
  height: 15px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--panela-bright), var(--panela-primary));
  color: #120e0a;
  box-shadow: 0 4px 15px var(--panela-glow);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--panela-light), var(--panela-bright));
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
}

.btn-save {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.btn-save:hover {
  background: linear-gradient(135deg, #34d399, #10b981);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45);
}

.btn-outline {
  background: transparent;
  border-color: var(--border-medium);
  color: var(--text-main);
}

.btn-outline:hover {
  background: var(--bg-surface-elevated);
  border-color: var(--panela-bright);
  color: var(--panela-light);
}

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

.btn-ghost:hover {
  background: var(--bg-surface-elevated);
  color: var(--text-main);
}

.btn-icon-ghost {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-icon-ghost:hover {
  background: var(--bg-surface-elevated);
  color: var(--rose);
}

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

.btn-danger-ghost {
  color: var(--rose);
  background: transparent;
  border: 1px solid transparent;
}

.btn-danger-ghost:hover {
  background: var(--rose-bg);
  border-color: rgba(239, 68, 68, 0.3);
}

/* ==========================================================================
   BARRA SUPERIOR (HEADER)
   ========================================================================== */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.5rem;
  background: rgba(23, 19, 16, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
}

.top-nav-left {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-logo {
  height: 38px;
  width: auto;
  border-radius: 6px;
}

.brand-text h2 {
  font-size: 1.05rem;
  line-height: 1.1;
}

.brand-sub {
  font-size: 0.75rem;
  color: var(--panela-light);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--emerald-bg);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--emerald);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: var(--emerald);
  border-radius: 50%;
  animation: pulseGreen 2s infinite;
}

@keyframes pulseGreen {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.unsaved-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: var(--panela-light);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.3rem 0.75rem;
  border-radius: 20px;
  animation: badgeBlink 3s infinite ease-in-out;
}

.unsaved-pill svg {
  width: 14px;
  height: 14px;
}

@keyframes badgeBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.65; }
}

.top-nav-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* ==========================================================================
   NAVEGACIÓN POR PESTAÑAS (TABS)
   ========================================================================== */
.nav-tabs-bar {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0 1.5rem;
}

.tabs-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.tabs-container::-webkit-scrollbar {
  display: none;
}

.nav-tab {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 1rem 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.nav-tab svg {
  width: 18px;
  height: 18px;
}

.nav-tab:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.02);
}

.nav-tab.active {
  color: var(--panela-light);
  border-bottom-color: var(--panela-bright);
  background: rgba(245, 158, 11, 0.05);
}

.tab-badge {
  background: var(--bg-surface-elevated);
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 10px;
}

.nav-tab.active .tab-badge {
  background: var(--panela-bright);
  color: #1a1410;
}

/* ==========================================================================
   CONTENIDO PRINCIPAL Y PANELES
   ========================================================================== */
.main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.tab-pane {
  display: none;
  animation: fadeIn 0.3s ease;
}

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

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

.pane-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
}

.pane-title-area h1 {
  font-size: 1.8rem;
  margin-bottom: 0.25rem;
}

.pane-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

/* ==========================================================================
   FILTROS Y BÚSQUEDA
   ========================================================================== */
.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.search-wrap {
  position: relative;
  flex: 1;
  min-width: 260px;
}

.search-wrap svg {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-muted);
}

.search-wrap input {
  padding-left: 2.75rem;
  background: var(--bg-surface);
}

.filter-options {
  display: flex;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.25rem;
  gap: 0.25rem;
}

.filter-pill {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.4rem 0.85rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-pill:hover {
  color: var(--text-main);
}

.filter-pill.active {
  background: var(--bg-surface-elevated);
  color: var(--panela-light);
  box-shadow: var(--shadow-sm);
}

/* ==========================================================================
   GRILLA DE PRODUCTOS
   ========================================================================== */
.productos-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1.5rem;
  align-items: center;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  box-shadow: var(--shadow-sm);
}

.product-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-medium);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.product-card.oculto {
  opacity: 0.75;
  border-style: dashed;
}

.prod-thumb-wrap {
  position: relative;
  width: 90px;
  height: 90px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #000000;
  border: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.prod-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

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

.prod-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.prod-title-line {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.prod-title-line h3 {
  font-size: 1.2rem;
  margin: 0;
}

.prod-id-pill {
  background: var(--bg-surface-elevated);
  color: var(--text-muted);
  font-family: monospace;
  font-size: 0.75rem;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  border: 1px solid var(--border-subtle);
}

.prod-desc-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.presentaciones-chips-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.4rem;
  flex-wrap: wrap;
}

.und-chip {
  background: rgba(245, 158, 11, 0.12);
  color: var(--panela-light);
  border: 1px solid rgba(245, 158, 11, 0.25);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
}

.und-chip-price {
  color: var(--text-main);
  margin-left: 0.3rem;
  font-weight: 700;
}

.prod-card-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.reorder-btns {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.btn-arrow {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  width: 28px;
  height: 28px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: all 0.15s ease;
}

.btn-arrow:hover:not(:disabled) {
  color: var(--text-main);
  border-color: var(--panela-bright);
}

.btn-arrow:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.btn-arrow svg {
  width: 14px;
  height: 14px;
}

/* ==========================================================================
   SWITCH TOGGLE (Activo/Inactivo)
   ========================================================================== */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #383028;
  transition: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 24px;
  border: 1px solid var(--border-subtle);
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 2px;
  bottom: 2px;
  background-color: var(--text-main);
  transition: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--emerald);
  border-color: var(--emerald);
}

input:checked + .slider:before {
  transform: translateX(20px);
}

/* ==========================================================================
   TARJETAS DE CONFIGURACIÓN
   ========================================================================== */
.config-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.card-span-2 {
  grid-column: span 2;
}

.card-icon-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

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

.card-icon svg {
  width: 22px;
  height: 22px;
}

.whatsapp-bg { background: var(--emerald-bg); color: var(--emerald); border: 1px solid rgba(16, 185, 129, 0.3); }
.store-bg { background: rgba(245, 158, 11, 0.15); color: var(--panela-light); border: 1px solid rgba(245, 158, 11, 0.3); }
.discount-bg { background: var(--blue-bg); color: var(--blue); border: 1px solid rgba(59, 130, 246, 0.3); }

.whatsapp-test-area {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
}

.discount-modes-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 1.25rem;
}

.discount-mode-card {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  cursor: pointer;
  background: var(--bg-surface-elevated);
  transition: all 0.2s ease;
  position: relative;
  display: block;
}

.discount-mode-card input {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  accent-color: var(--panela-bright);
}

.discount-mode-card:hover {
  background: var(--bg-surface-hover);
  border-color: var(--border-medium);
}

.discount-mode-card.selected {
  border-color: var(--panela-bright);
  background: rgba(245, 158, 11, 0.08);
  box-shadow: 0 0 15px var(--panela-glow-subtle);
}

.mode-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.5rem;
}

.mode-tag {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 10px;
  background: var(--bg-surface);
  color: var(--text-muted);
}

.mode-tag.promo {
  background: rgba(245, 158, 11, 0.2);
  color: var(--panela-light);
}

.mode-desc {
  font-size: 0.88rem;
  line-height: 1.4;
  margin-bottom: 0.75rem;
}

.mode-example {
  background: rgba(0, 0, 0, 0.25);
  padding: 0.6rem 0.8rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  color: var(--text-secondary);
  border-left: 3px solid var(--panela-bright);
}

.toggle-card-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.toggle-card-row.mini {
  padding: 0.6rem 0.8rem;
  background: var(--bg-surface-elevated);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

/* ==========================================================================
   GALERÍA Y UPLOAD DROPZONE
   ========================================================================== */
.upload-dropzone {
  border: 2px dashed rgba(245, 158, 11, 0.3);
  border-radius: var(--radius-lg);
  background: rgba(245, 158, 11, 0.03);
  padding: 2.5rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s ease;
  margin-bottom: 2rem;
}

.upload-dropzone:hover,
.upload-dropzone.dragover {
  border-color: var(--panela-bright);
  background: rgba(245, 158, 11, 0.08);
  box-shadow: var(--shadow-glow);
}

.dropzone-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 1rem;
  background: var(--panela-glow);
  color: var(--panela-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dropzone-icon svg {
  width: 28px;
  height: 28px;
}

.dropzone-content h3 {
  font-size: 1.15rem;
  margin-bottom: 0.4rem;
}

.dropzone-content p {
  font-size: 0.85rem;
  color: var(--text-muted);
  max-width: 480px;
  margin: 0 auto 1.25rem;
}

.gallery-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.gallery-toolbar input {
  max-width: 340px;
}

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

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1.25rem;
}

.gallery-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.2s ease;
}

.gallery-item:hover {
  border-color: var(--border-medium);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.gallery-thumb-wrap {
  width: 100%;
  height: 140px;
  background: #000;
  position: relative;
  overflow: hidden;
}

.gallery-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease;
}

.gallery-item:hover .gallery-thumb {
  transform: scale(1.08);
}

.gallery-item-info {
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.8rem;
}

.gallery-item-name {
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.gallery-item-actions {
  display: flex;
  gap: 0.35rem;
  margin-top: 0.35rem;
  align-items: center;
  flex-wrap: wrap;
}

.gallery-badge {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  background: rgba(18, 14, 11, 0.85);
  backdrop-filter: blur(6px);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 0.25rem;
  z-index: 2;
}

.gallery-badge.system {
  color: var(--text-muted);
  border-color: rgba(255, 255, 255, 0.12);
}

.gallery-badge.in-use {
  color: var(--panela-light);
  border-color: rgba(245, 158, 11, 0.4);
  background: rgba(30, 20, 12, 0.9);
}

.badge-protected {
  font-size: 0.72rem;
  color: var(--text-muted);
  padding: 0.3rem 0.5rem;
  font-style: italic;
}

/* ==========================================================================
   COPIAS DE RESPALDO (BACKUPS)
   ========================================================================== */
.backups-list {
  display: flex;
  flex-direction: column;
}

.backup-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
  gap: 1rem;
}

.backup-item:last-child {
  border-bottom: none;
}

.backup-item-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.backup-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--panela-light);
}

.backup-icon svg {
  width: 18px;
  height: 18px;
}

.backup-name {
  font-weight: 600;
  color: var(--text-main);
  font-size: 0.95rem;
}

.backup-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ==========================================================================
   MODALES
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  animation: fadeIn 0.2s ease;
}

.modal-card {
  width: 100%;
  max-width: 760px;
  max-height: 90vh;
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-card.modal-lg {
  max-width: 900px;
}

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.02);
}

.modal-header h2 {
  font-size: 1.3rem;
  margin: 0;
}

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

.btn-close-modal {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.6rem;
  cursor: pointer;
  line-height: 1;
  padding: 0.25rem;
}

.btn-close-modal:hover {
  color: var(--rose);
}

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  background: rgba(0, 0, 0, 0.2);
}

/* Previsualizador de foto en el modal */
.product-image-picker {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.prod-thumb-preview {
  width: 76px;
  height: 76px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: #000;
  border: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.image-picker-controls {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.image-picker-buttons {
  display: flex;
  gap: 0.5rem;
}

/* ==========================================================================
   PRESENTACIONES Y TABLA DE PRECIOS POR VOLUMEN
   ========================================================================== */
.presentaciones-section {
  margin-top: 1rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-subtle);
}

.section-subhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.presentaciones-cards-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.presentation-card {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.pres-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.pres-und-input-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pres-und-input-wrap input {
  width: 90px;
  text-align: center;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--panela-light);
}

.tiers-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.4rem;
}

.tiers-table th {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  padding: 0.4rem 0.5rem;
  text-align: left;
}

.tiers-table td {
  padding: 0.35rem 0.5rem;
}

.tiers-table input {
  padding: 0.45rem 0.65rem;
  font-size: 0.9rem;
}

.tier-desde-cell {
  width: 130px;
}

.tier-price-cell {
  position: relative;
}

.price-prefix-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.price-prefix-wrap span {
  position: absolute;
  left: 0.6rem;
  color: var(--text-muted);
  font-weight: 700;
}

.price-prefix-wrap input {
  padding-left: 1.4rem;
}

.btn-remove-tier {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 4px;
}

.btn-remove-tier:hover {
  color: var(--rose);
}

/* ==========================================================================
   PICKER DE GALERÍA EN MODAL
   ========================================================================== */
.picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 1rem;
}

.picker-item {
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  background: #000;
  transition: all 0.2s ease;
  position: relative;
  aspect-ratio: 1;
}

.picker-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.picker-item:hover {
  border-color: var(--panela-bright);
  transform: scale(1.04);
}

.picker-item-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.75);
  font-size: 0.7rem;
  padding: 0.2rem 0.4rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-main);
}

/* ==========================================================================
   ALERTAS Y TOASTS
   ========================================================================== */
.alert {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  line-height: 1.4;
  margin-bottom: 1rem;
}

.alert-error {
  background: var(--rose-bg);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}

.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-main);
  font-size: 0.9rem;
  box-shadow: var(--shadow-lg);
  animation: slideInRight 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  min-width: 280px;
}

.toast.toast-success {
  border-color: var(--emerald);
  background: #0f241a;
}

.toast.toast-error {
  border-color: var(--rose);
  background: #281010;
}

.toast svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.toast-success svg { color: var(--emerald); }
.toast-error svg { color: var(--rose); }

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Spinners */
.spinner, .spinner-btn {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}

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

/* ==========================================================================
   PREGUNTAS FRECUENTES (FAQS) EN EL ADMIN
   ========================================================================== */
.faqs-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.faq-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.25rem;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-sm);
}

.faq-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-medium);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.faq-card.oculto {
  opacity: 0.65;
  border-style: dashed;
}

.faq-card-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.faq-question-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.faq-question-title h3 {
  font-size: 1.1rem;
  color: var(--text-main);
  margin: 0;
}

.faq-num-pill {
  background: var(--panela-glow);
  color: var(--panela-light);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.faq-answer-preview {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
  white-space: pre-wrap;
}

.faq-card-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

/* ==========================================================================
   RESPONSIVE DESIGN (Móviles y Tablets)
   ========================================================================== */
@media (max-width: 768px) {
  .top-nav {
    padding: 0.6rem 1rem;
  }

  .btn-hide-mobile {
    display: none;
  }

  .main-content {
    padding: 1.25rem 1rem;
  }

  .product-card {
    grid-template-columns: 70px 1fr;
    gap: 1rem;
  }

  .prod-thumb-wrap {
    width: 70px;
    height: 70px;
  }

  .prod-card-actions {
    grid-column: span 2;
    justify-content: space-between;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-subtle);
  }

  .config-grid,
  .discount-modes-grid {
    grid-template-columns: 1fr;
  }

  .card-span-2 {
    grid-column: span 1;
  }

  .form-row {
    flex-direction: column;
    gap: 0.75rem;
  }

  .toast-container {
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
  }
}
