/* Estilos para tema claro/oscuro - Aplicar a todas las páginas */

/* Tema Oscuro (por defecto) */
body.dark-theme {
    background: #1e293b;
    color: white;
}

body.dark-theme .navbar {
    background: rgba(30, 41, 59, 0.95) !important;
}

body.dark-theme .navbar-brand,
body.dark-theme .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
}

body.dark-theme .footer {
    background: rgba(30, 41, 59, 0.98) !important;
    color: white;
}

body.dark-theme .text-white-50 {
    color: rgba(255, 255, 255, 0.7) !important;
}

body.dark-theme .card,
body.dark-theme .category-card,
body.dark-theme .product-card {
    background: linear-gradient(145deg, #1e293b, #334155);
    color: white;
}

body.dark-theme .modal-content {
    background: #1e293b !important;
    color: white;
}

body.dark-theme .modal-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

body.dark-theme .dropdown-menu {
    background: rgba(30, 41, 59, 0.98) !important;
    color: white;
}

/* Tema Claro */
body.light-theme {
    background: #f8fafc;
    color: #1e293b;
}

body.light-theme .navbar {
    background: rgba(255, 255, 255, 0.95) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

body.light-theme .navbar-brand {
    color: #6366f1 !important;
}

body.light-theme .nav-link {
    color: #1e293b !important;
}

body.light-theme .nav-link:hover {
    color: #6366f1 !important;
}

body.light-theme .footer {
    background: rgba(255, 255, 255, 0.98) !important;
    border-top: 2px solid rgba(99, 102, 241, 0.2);
    color: #1e293b;
}

body.light-theme .text-white-50 {
    color: rgba(30, 41, 59, 0.7) !important;
}

body.light-theme .card,
body.light-theme .category-card,
body.light-theme .product-card {
    background: white;
    color: #1e293b;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

body.light-theme .modal-content {
    background: white !important;
    color: #1e293b;
}

body.light-theme .modal-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

body.light-theme .dropdown-menu {
    background: white !important;
    color: #1e293b;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

body.light-theme .dropdown-item {
    color: #1e293b;
}

body.light-theme .dropdown-item:hover {
    background: rgba(99, 102, 241, 0.1);
    color: #6366f1;
}

/* Ubicación global del botón de volver a inicio: lado izquierdo */
.back-to-home {
    left: 30px !important;
    right: auto !important;
}

body.light-theme .client-container {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

body.light-theme .hero-section {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(99, 102, 241, 0.1)) !important;
}

body.light-theme .category-card:hover,
body.light-theme .product-card:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

body.light-theme hr {
    border-color: rgba(0, 0, 0, 0.1);
}

body.light-theme .purchase-card,
body.light-theme .product-card,
body.light-theme .category-card {
    background: white !important;
    color: #1e293b !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
}

body.light-theme .purchase-header {
    background: linear-gradient(45deg, #6366f1, #8b5cf6) !important;
    color: white !important;
}

body.light-theme input,
body.light-theme textarea,
body.light-theme select {
    background: white !important;
    color: #1e293b !important;
    border: 1px solid rgba(0, 0, 0, 0.2) !important;
}

body.light-theme input::placeholder,
body.light-theme textarea::placeholder {
    color: rgba(30, 41, 59, 0.5) !important;
}

body.light-theme .form-label {
    color: #1e293b !important;
    font-weight: 600;
}

body.light-theme .text-muted {
    color: rgba(30, 41, 59, 0.6) !important;
}

body.light-theme .btn-primary {
    background: linear-gradient(45deg, #6366f1, #8b5cf6) !important;
    border: none !important;
    color: white !important;
}

body.light-theme .btn-secondary {
    background: #6c757d !important;
    color: white !important;
}

/* Asegurar que el toggle esté siempre visible y en la misma posición */
#themeToggle {
    position: relative !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    background: rgba(99, 102, 241, 0.1) !important;
    border: 1px solid rgba(99, 102, 241, 0.3) !important;
    transition: all 0.3s ease !important;
    cursor: pointer !important;
    color: rgba(255, 255, 255, 0.9) !important;
    padding: 0 !important;
    margin: 0 0.5rem !important;
}

body.light-theme #themeToggle {
    background: rgba(99, 102, 241, 0.15) !important;
    border-color: rgba(99, 102, 241, 0.4) !important;
    color: #6366f1 !important;
}

#themeToggle:hover {
    background: rgba(99, 102, 241, 0.2) !important;
    transform: scale(1.1) !important;
    border-color: rgba(99, 102, 241, 0.5) !important;
}

body.light-theme #themeToggle:hover {
    background: rgba(99, 102, 241, 0.25) !important;
}

#themeToggle i {
    font-size: 1.1rem !important;
}

