:root {
    --bg-dark-bg: #0b0b0f;
    --bg-dark-card: #12121a;
    --border-dark-border: rgba(255, 255, 255, 0.07);
    --bg-dark-input: #1b1b26;
    --bg-dark-action: #1c1c28;
    
    --primary-gradient: linear-gradient(135deg, #7f00ff 0%, #ff007f 100%);
    --secondary-gradient: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
    --card-gradient: linear-gradient(145deg, rgba(25, 25, 38, 0.6) 0%, rgba(18, 18, 26, 0.8) 100%);
    
    --font-outfit: 'Outfit', sans-serif;
}

body.bg-dark-bg {
    background-color: var(--bg-dark-bg);
}

.font-outfit {
    font-family: var(--font-outfit);
}

/* Colores auxiliares */
.bg-dark-card {
    background-color: var(--bg-dark-card) !important;
}

.border-dark-border {
    border-color: var(--border-dark-border) !important;
}

.bg-dark-input {
    background-color: var(--bg-dark-input) !important;
}

.btn-dark-action {
    background-color: var(--bg-dark-action);
    border: 1px solid var(--border-dark-border);
    color: #e2e2e9;
}

.btn-dark-action:hover {
    background-color: #262638;
    color: #ffffff;
}

/* Degradados */
.bg-gradient-primary {
    background: var(--primary-gradient) !important;
}

.bg-gradient-secondary {
    background: var(--secondary-gradient) !important;
}

.text-gradient-primary {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

/* Wrapper y Layout */
.wrapper {
    display: flex;
    width: 100%;
    align-items: stretch;
}

/* Sidebar */
.sidebar {
    min-width: 280px;
    max-width: 280px;
    min-height: 100vh;
    transition: all 0.3s;
    z-index: 1000;
}

.sidebar.active {
    margin-left: -280px;
}

.sidebar .nav-link {
    color: #a0a0b0;
    transition: all 0.2s ease-in-out;
    font-weight: 500;
}

.sidebar .nav-link:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.03);
    transform: translateX(3px);
}

.sidebar .nav-link.active {
    color: #ffffff;
    background: rgba(127, 0, 255, 0.15);
    border-left: 3px solid #ff007f;
}

.sidebar .nav-link i {
    transition: color 0.2s;
}

.sidebar .nav-link.active i {
    color: #ff007f;
}

/* Contenido */
.content {
    width: 100%;
    transition: all 0.3s;
}

/* Navbar */
.navbar {
    backdrop-filter: blur(10px);
    background-color: rgba(18, 18, 26, 0.85) !important;
}

/* Tarjetas Premium */
.card-premium {
    background: var(--card-gradient);
    border: 1px solid var(--border-dark-border);
    border-radius: 16px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(4px);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.card-premium:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px 0 rgba(127, 0, 255, 0.1);
    border-color: rgba(255, 0, 127, 0.2);
}

/* Tipografía */
.fs-7 {
    font-size: 0.85rem;
}

.fs-8 {
    font-size: 0.75rem;
}

.text-muted {
    color: #7b7b93 !important;
}

.text-light-text {
    color: #e2e2e9;
}

/* Inputs con estilo moderno */
.form-control, .form-select {
    background-color: var(--bg-dark-input) !important;
    border: 1px solid var(--border-dark-border) !important;
    color: #ffffff !important;
    border-radius: 8px !important;
    padding: 0.6rem 2.2rem 0.6rem 1rem !important; /* Espacio para la flecha en select */
    transition: all 0.2s ease-in-out !important;
}

.form-control {
    padding-right: 1rem !important; /* Reset para inputs normales */
}

.form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") !important;
    background-size: 16px 12px !important;
}

.form-control:focus, .form-select:focus {
    background-color: var(--bg-dark-input) !important;
    border-color: #ff007f !important;
    box-shadow: 0 0 0 0.25rem rgba(255, 0, 127, 0.15) !important;
    color: #ffffff !important;
}

/* Soporte para que los calendarios de fecha nativos del navegador se rendericen en modo oscuro */
input[type="date"] {
    color-scheme: dark;
}

.form-control::placeholder {
    color: #58586f;
}

/* Badges estilizados */
.badge-premium {
    padding: 6px 12px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.75rem;
}

/* Dropdown Menu styling */
.dropdown-menu-dark {
    background-color: var(--bg-dark-card) !important;
    border: 1px solid var(--border-dark-border) !important;
}

.dropdown-menu-dark .dropdown-menu-item {
    color: #a0a0b0;
    text-decoration: none;
    display: block;
    transition: all 0.2s;
}

.dropdown-menu-dark .dropdown-menu-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: #ffffff;
}

/* Tablas estilizadas */
.table-premium {
    --bs-table-bg: transparent !important;
    --bs-table-color: #e2e2e9 !important;
    --bs-table-hover-bg: rgba(255, 255, 255, 0.02) !important;
    --bs-table-border-color: rgba(255, 255, 255, 0.07) !important;
    color: #e2e2e9 !important;
    background-color: transparent !important;
    border-collapse: collapse !important;
}

.table-premium th {
    font-weight: 600 !important;
    text-transform: uppercase;
    font-size: 0.75rem;
    color: #7b7b93 !important;
    border-bottom: 2px solid rgba(255, 255, 255, 0.07) !important;
    padding: 0.75rem !important;
    background-color: transparent !important;
}

.table-premium td {
    vertical-align: middle !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07) !important;
    padding: 1rem 0.75rem !important;
    background-color: transparent !important;
    color: #e2e2e9 !important;
}

.table-premium tr:hover td {
    background-color: rgba(255, 255, 255, 0.01) !important;
}

/* Media Queries para Sidebar colapsable en móviles */
@media (max-width: 991.98px) {
    .sidebar {
        margin-left: -280px;
        position: fixed;
        top: 0;
        left: 0;
        height: 100%;
        overflow-y: auto;
        box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    }
    .sidebar.active {
        margin-left: 0;
    }
}

/* Color de texto para los checkboxes y radio buttons en modo oscuro */
.form-check-label {
    color: #e2e2e9 !important;
}

/* Estilos Dark Mode para Tom Select */
.ts-wrapper.form-select {
    padding: 0 !important;
    background: none !important;
    border: none !important;
}
.ts-control {
    background-color: var(--bg-dark-input) !important;
    border: 1px solid var(--border-dark-border) !important;
    color: #ffffff !important;
    border-radius: 8px !important;
    padding: 0.6rem 1rem !important;
    box-shadow: none !important;
    transition: all 0.2s ease-in-out !important;
}
.ts-wrapper.single .ts-control {
    padding-right: 2.5rem !important;
}
.ts-wrapper.focus .ts-control {
    border-color: #ff007f !important;
    box-shadow: 0 0 0 0.25rem rgba(255, 0, 127, 0.15) !important;
}
.ts-control, .ts-wrapper.single.input-active .ts-control {
    background-color: var(--bg-dark-input) !important;
}
.ts-wrapper.single .ts-control:after {
    border-color: #ffffff transparent transparent transparent !important;
    right: 15px !important;
}
.ts-wrapper.single.input-active .ts-control:after {
    border-color: transparent transparent #ffffff transparent !important;
}
.ts-dropdown {
    background-color: var(--bg-dark-card) !important;
    border: 1px solid var(--border-dark-border) !important;
    border-radius: 8px !important;
    color: #ffffff !important;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3) !important;
    z-index: 1100 !important;
    margin-top: 5px !important;
}
.ts-dropdown .option {
    color: #a0a0b0 !important;
    padding: 0.6rem 1rem !important;
    transition: all 0.2s !important;
}
.ts-dropdown .active {
    background-color: rgba(255, 255, 255, 0.05) !important;
    color: #ffffff !important;
}
.ts-dropdown .create {
    color: #ff007f !important;
}
.ts-dropdown .option:hover {
    background-color: rgba(255, 255, 255, 0.05) !important;
    color: #ffffff !important;
}
.ts-control input {
    color: #ffffff !important;
}
.ts-dropdown .dropdown-input-wrap {
    padding: 8px !important;
    background-color: var(--bg-dark-card) !important;
    border-bottom: 1px solid var(--border-dark-border) !important;
}
.ts-dropdown .dropdown-input {
    background-color: var(--bg-dark-input) !important;
    border: 1px solid var(--border-dark-border) !important;
    color: #ffffff !important;
    border-radius: 6px !important;
    padding: 0.4rem 0.8rem !important;
}
.ts-wrapper.disabled {
    opacity: 0.6 !important;
}

