/* ==============================================================================
   admin-theme.css - Sistema Global de Modo Claro / Modo Oscuro
   para todos los paneles Backoffice de chancay.lat
   ============================================================================== */

/* Botón Conmutador de Tema (Presente en la barra superior) */
.btn-theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-card, #1e293b);
  border: 1px solid var(--border, #334155);
  color: var(--text, #f8fafc);
  padding: 6px 12px;
  border-radius: 6px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}
.btn-theme-toggle:hover {
  background: var(--bg-card-hover, #243247);
  border-color: var(--orange, #ff5722);
}

/* ─────────────────────────────────────────────────────────────────────────────
   VARIABLES Y ESTILOS PARA MODO CLARO (body.light-theme)
   ───────────────────────────────────────────────────────────────────────────── */
body.light-theme {
  --bg: #f8fafc !important;
  --bg-panel: #ffffff !important;
  --bg-card: #f1f5f9 !important;
  --bg-card-hover: #e2e8f0 !important;
  --border: #cbd5e1 !important;
  --border-light: #e2e8f0 !important;
  --text: #0f172a !important;
  --text-muted: #475569 !important;
  --text-dim: #64748b !important;
  background-color: #f8fafc !important;
  color: #0f172a !important;
}

/* Header & Nav */
body.light-theme .admin-nav {
  background: #ffffff !important;
  border-bottom: 1px solid #cbd5e1 !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}
body.light-theme .brand-title {
  color: #0f172a !important;
}
body.light-theme .btn-nav,
body.light-theme .btn-view-store,
body.light-theme .pill-btn,
body.light-theme .btn-refresh,
body.light-theme .btn-theme-toggle {
  background: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
  color: #1e293b !important;
}
body.light-theme .btn-nav:hover,
body.light-theme .btn-view-store:hover,
body.light-theme .pill-btn:hover,
body.light-theme .btn-refresh:hover,
body.light-theme .btn-theme-toggle:hover {
  background: #e2e8f0 !important;
  color: #0f172a !important;
}
body.light-theme .btn-nav.active,
body.light-theme .pill-btn.active {
  background: var(--orange, #ff5722) !important;
  border-color: var(--orange, #ff5722) !important;
  color: #ffffff !important;
}

/* Tarjetas, Paneles y Contenedores */
body.light-theme .kpi-card,
body.light-theme .toolbar-card,
body.light-theme .table-container,
body.light-theme .telemetry-banner,
body.light-theme .hero-banner,
body.light-theme .feed-item,
body.light-theme .sidebar-pane,
body.light-theme .product-list-item,
body.light-theme .drawer-content,
body.light-theme .search-wrap,
body.light-theme .info-card {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #0f172a;
}
body.light-theme .kpi-card h4,
body.light-theme .stat-chip,
body.light-theme .occ-label {
  color: #475569 !important;
}
body.light-theme .kpi-card .num {
  color: #0f172a !important;
}
body.light-theme .kpi-card.orange .num { color: #ea580c !important; }
body.light-theme .kpi-card.amber .num { color: #d97706 !important; }
body.light-theme .kpi-card.cyan .num { color: #0284c7 !important; }
body.light-theme .kpi-card.green .num { color: #059669 !important; }

/* Formularios, Inputs y Selects */
body.light-theme input[type="text"],
body.light-theme input[type="password"],
body.light-theme input[type="search"],
body.light-theme input[type="tel"],
body.light-theme input[type="email"],
body.light-theme select,
body.light-theme textarea,
body.light-theme .search-input,
body.light-theme .form-input,
body.light-theme .form-select,
body.light-theme .form-textarea,
body.light-theme .sidebar-filter-box input,
body.light-theme .sidebar-select {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}
body.light-theme input::placeholder,
body.light-theme textarea::placeholder {
  color: #94a3b8 !important;
}

/* Tablas */
body.light-theme table {
  background: #ffffff !important;
}
body.light-theme table th {
  background: #f1f5f9 !important;
  color: #475569 !important;
  border-bottom: 1px solid #cbd5e1 !important;
}
body.light-theme table td {
  border-bottom: 1px solid #f1f5f9 !important;
  color: #1e293b !important;
}
body.light-theme tr:hover td {
  background: #f8fafc !important;
}
body.light-theme .cust-name,
body.light-theme .order-code-link {
  color: #0f172a !important;
}
body.light-theme .btn-action-manage {
  background: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}
body.light-theme .btn-action-manage:hover {
  background: var(--orange, #ff5722) !important;
  color: #ffffff !important;
}

/* Modales */
body.light-theme .modal-dialog {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15) !important;
  color: #0f172a !important;
}
body.light-theme .modal-header {
  border-bottom: 1px solid #e2e8f0 !important;
}
body.light-theme .modal-header h3 {
  color: #0f172a !important;
}
body.light-theme .modal-footer {
  border-top: 1px solid #e2e8f0 !important;
}
body.light-theme .btn-modal-cancel {
  background: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
  color: #334155 !important;
}

/* Admin Curador de Fotos */
body.light-theme .sidebar-filter-box {
  background: #f8fafc !important;
  border-bottom-color: #cbd5e1 !important;
}
body.light-theme .sidebar-pane {
  background: #ffffff !important;
  border-right-color: #cbd5e1 !important;
}
body.light-theme .product-list-item {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
}
body.light-theme .product-list-item:hover {
  background: #f1f5f9 !important;
  border-color: #38bdf8 !important;
}
body.light-theme .product-list-item.selected {
  background: #e0f2fe !important;
  border-color: #0284c7 !important;
}
body.light-theme .product-list-item.selected .pli-name {
  color: #0369a1 !important;
}
body.light-theme .pli-name {
  color: #0f172a !important;
}
body.light-theme .f-pill {
  background: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
  color: #475569 !important;
}
body.light-theme .f-pill.active {
  background: #0284c7 !important;
  color: #ffffff !important;
  border-color: #0284c7 !important;
}
body.light-theme .stage-header {
  background: #f8fafc !important;
  border-bottom-color: #cbd5e1 !important;
}
body.light-theme .stage-container {
  background: #ffffff !important;
}
body.light-theme .stage-img-box {
  background: #f8fafc !important;
  border-color: #cbd5e1 !important;
}

/* Admin Analítica */
body.light-theme .activity-feed .feed-item {
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
}
body.light-theme .chart-card,
body.light-theme .breakdown-card,
body.light-theme .zero-search-alert {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}
body.light-theme .zero-search-alert {
  background: #fef2f2 !important;
  border-color: #fecaca !important;
  color: #991b1b !important;
}

/* Transiciones suaves */
body, .admin-nav, .kpi-card, .table-container, .modal-dialog, input, select, button {
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
