/* ============================================
   Ciudad Creativa - Tema personalizado
   ============================================ */

/* --- Modo claro --- */
[data-bs-theme="light"] {
    --bs-primary:        #f22f2f;
    --bs-primary-rgb:    242, 47, 47;
    --bs-secondary:      #0a0a0a;
    --bs-body-bg:        #e8e8e8;
    --bs-body-color:     #111111;
    --bs-tertiary-bg:    #f0f0f0;
    --bs-border-color:   #cccccc;
    --bs-heading-color:  #0a0a0a;
    --bs-btn-bg: transparent !important;
}

/* --- Headers: fondo rojo, texto blanco --- */
[data-bs-theme="light"] .card-header {
    background: #f22f2f !important;
    color: #ffffff !important;
}

[data-bs-theme="light"] .card-header h1,
[data-bs-theme="light"] .card-header h2,
[data-bs-theme="light"] .card-header h3,
[data-bs-theme="light"] .card-header h4,
[data-bs-theme="light"] .card-header h5,
[data-bs-theme="light"] .card-header h6,
[data-bs-theme="light"] .card-header p,
[data-bs-theme="light"] .card-header span,
[data-bs-theme="light"] .card-header a {
    color: #000000 !important;
}

/* --- Navbar modo claro --- */
[data-bs-theme="light"] .navbar {
    background: #e8e8e8 !important;
    border-bottom: 3px solid #f22f2f;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    padding: 0.5rem 0;
}

[data-bs-theme="light"] .navbar .navbar-nav {
    align-items: center;
    gap: 0.25rem;
}

[data-bs-theme="light"] .navbar .nav-link {
    color: #0a0a0a !important;
    font-weight: 500;
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem !important;
    border-radius: 6px;
    transition: all 0.2s ease;
}

[data-bs-theme="light"] .navbar .nav-link:hover {
    color: #f22f2f !important;
    background: rgba(242, 47, 47, 0.06);
}

[data-bs-theme="light"] .navbar .nav-link.active {
    color: #f22f2f !important;
    font-weight: 600;
    background: rgba(242, 47, 47, 0.1);
}

/* Logo */
[data-bs-theme="light"] .navbar-brand img {
    max-height: 40px;
    width: auto;
}

/* Selector de idioma - alineado */
[data-bs-theme="light"] .navbar .nav-item {
    display: flex;
    align-items: center;
}

[data-bs-theme="light"] .navbar .form-select.js-locale-selector {
    background-color: #ffffff;
    border: 1px solid #d5cfc6;
    color: #0a0a0a;
    border-radius: 6px;
    padding: 0.4rem 2rem 0.4rem 0.75rem;
    font-size: 0.85rem;
    height: auto;
    min-height: auto;
    transition: all 0.2s ease;
}

[data-bs-theme="light"] .navbar .form-select.js-locale-selector:hover {
    border-color: #f22f2f;
}

[data-bs-theme="light"] .navbar .form-select.js-locale-selector:focus {
    border-color: #f22f2f;
    box-shadow: 0 0 0 3px rgba(242, 47, 47, 0.1);
}

/* Toggle móvil */
[data-bs-theme="light"] .navbar-toggler {
    border: 1px solid #d5cfc6;
    border-radius: 8px;
    padding: 0.4rem 0.6rem;
}

[data-bs-theme="light"] .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(10, 10, 10, 0.8)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Dropdown perfil */
[data-bs-theme="light"] .navbar .dropdown-menu {
    background: #ffffff;
    border: 1px solid #e0dbd3;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    padding: 0.4rem;
    margin-top: 0.5rem;
    min-width: 200px;
}

[data-bs-theme="light"] .navbar .dropdown-item {
    color: #0a0a0a;
    border-radius: 6px;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    transition: all 0.15s ease;
}

[data-bs-theme="light"] .navbar .dropdown-item:hover {
    background: rgba(242, 47, 47, 0.08);
    color: #f22f2f;
}

/* Dropdown toggle del perfil */
[data-bs-theme="light"] .client-dropdown .nav-link.dropdown-toggle {
    color: #0a0a0a !important;
}

[data-bs-theme="light"] .client-dropdown .nav-link.dropdown-toggle:hover {
    color: #f22f2f !important;
}
[data-bs-theme="light"] .navbar .nav-link {
    color: #000000 !important;
}

[data-bs-theme="light"] .navbar .nav-link:hover,
[data-bs-theme="light"] .navbar .nav-link.active {
    color: #f22f2f !important;
}

/* --- Tablas --- */
[data-bs-theme="light"] .table thead th {
    background: #f22f2f !important;
    color: #ffffff !important;
    border-bottom: 2px solid #0a0a0a;
}

/* --- Botones primarios --- */
[data-bs-theme="light"] .btn-primary,
[data-bs-theme="dark"] .btn-primary {
    background: white !important;
    border-color: #f22f2f !important;
    color: #000000 !important;
}

[data-bs-theme="light"] .btn-primary:hover,
[data-bs-theme="dark"] .btn-primary:hover {
    background: #c71e1e !important;
    border-color: #c71e1e !important;
    color: #ffffff !important;
}

[data-bs-theme="light"] .btn-outline-primary,
[data-bs-theme="dark"] .btn-outline-primary {
    color: #f22f2f !important;
    border-color: #f22f2f !important;
}

[data-bs-theme="light"] .btn-outline-primary:hover,
[data-bs-theme="dark"] .btn-outline-primary:hover {
    background: #f22f2f !important;
    color: #ffffff !important;
}

/* --- Links --- */
[data-bs-theme="light"] a {
    color: #000000;
    
}
[data-bs-theme="light"] a {
    background-color: transparent;
  }

[data-bs-theme="light"] a:hover {
    background-color: transparent;
    color: #000
  }

/* --- Sidebar --- */
[data-bs-theme="light"] .sidebar .nav-link.active,
[data-bs-theme="light"] .sidebar .nav-link:hover {
    color: #f22f2f !important;
    font-weight: 600;
}

/* --- Footer --- */
[data-bs-theme="light"] .footer {
    background: #0a0a0a !important;
    color: #999999 !important;
    border-top: 3px solid #f22f2f;
}

[data-bs-theme="light"] .footer a {
    color: #f22f2f !important;
}

/* --- Páginas de login/signup --- */
[data-bs-theme="light"] .page-login .card-header,
[data-bs-theme="light"] .page-signup .card-header,
[data-bs-theme="light"] .page-password-reset .card-header {
    background: #f22f2f !important;
    color: #ffffff !important;
}


/* ============================================
   MODO OSCURO
   ============================================ */

[data-bs-theme="dark"] {
    --bs-primary:        #ff4444;
    --bs-primary-rgb:    255, 68, 68;
    --bs-body-bg:        #0a0a0a;
    --bs-body-color:     #e0e0e0;
    --bs-tertiary-bg:    #141414;
    --bs-border-color:   #2a2a2a;
    --bs-heading-color:  #ffffff;
}

/* --- Headers: fondo rojo oscuro, texto blanco --- */
[data-bs-theme="dark"] .card-header {
    background: #f22f2f !important;
    color: #ffffff !important;
}

[data-bs-theme="dark"] .card-header h1,
[data-bs-theme="dark"] .card-header h2,
[data-bs-theme="dark"] .card-header h3,
[data-bs-theme="dark"] .card-header h4,
[data-bs-theme="dark"] .card-header h5,
[data-bs-theme="dark"] .card-header h6,
[data-bs-theme="dark"] .card-header p,
[data-bs-theme="dark"] .card-header span,
[data-bs-theme="dark"] .card-header a {
    color: #ffffff !important;
}

/* --- Navbar --- */
[data-bs-theme="dark"] .navbar {
    background: #0f0f0f !important;
    border-bottom: 2px solid #f22f2f;
}

[data-bs-theme="dark"] .navbar .nav-link {
    color: #e0e0e0 !important;
}

[data-bs-theme="dark"] .navbar .nav-link:hover,
[data-bs-theme="dark"] .navbar .nav-link.active {
    color: #ff4444 !important;
}

/* --- Tablas --- */
[data-bs-theme="dark"] .table thead th {
    background: #f22f2f !important;
    color: #ffffff !important;
    border-bottom: 2px solid #0a0a0a;
}

/* --- Botones (modo oscuro) - forzar rojo sobre azul --- */
[data-bs-theme="dark"] .btn-primary,
[data-bs-theme="dark"] .btn.btn-primary,
[data-bs-theme="dark"] button.btn-primary,
[data-bs-theme="dark"] a.btn-primary {
    background: #f22f2f !important;
    border-color: #f22f2f !important;
    color: #ffffff !important;
}

[data-bs-theme="dark"] .btn-primary:hover {
    background: #c71e1e !important;
    border-color: #c71e1e !important;
    color: #ffffff !important;
}

/* --- Cualquier botón con clase bg-primary --- */
[data-bs-theme="dark"] .bg-primary,
[data-bs-theme="light"] .bg-primary {
    background-color: #f22f2f !important;
        color: #ffffff !important;

}

/* --- Links --- */
[data-bs-theme="dark"] a {
    color: #ff4444;
        color: #ffffff !important;

}

/* --- Sidebar --- */
[data-bs-theme="dark"] .sidebar .nav-link.active,
[data-bs-theme="dark"] .sidebar .nav-link:hover {
    color: #ff4444 !important;
    font-weight: 600;
}

/* --- Footer --- */
[data-bs-theme="dark"] .footer {
    background: #0f0f0f !important;
    color: #999999 !important;
    border-top: 3px solid #f22f2f;
}

[data-bs-theme="dark"] .footer a {
    color: #ff4444 !important;
}

/* --- Páginas de login/signup --- */
[data-bs-theme="dark"] .page-login .card-header,
[data-bs-theme="dark"] .page-signup .card-header,
[data-bs-theme="dark"] .page-password-reset .card-header {
    background: #f22f2f !important;
    color: #ffffff !important;
}


/* ============================================
   GENERAL (ambos modos)
   ============================================ */

/* --- Ocultar marca FOSSBilling --- */
.fossbilling-branding,
.powered-by,
#powered-by {
    display: none !important;
}

/* --- Logo personalizado --- */
.navbar-brand img {
    content: url("/themes/estilosscss/assets/img/logo_cc.png");
    max-height: 45px;
    width: auto;
}

/* Logo en modo oscuro */
[data-bs-theme="dark"] .navbar-brand img {
    content: url("/themes/estilosscss/assets/img/logo_cc.png");
}


