/* --- LATITUD ZERO: CSS MAESTRO UNIFICADO (VERSIÓN FINAL) --- */

:root {
    --primary: #9146FF;
    --primary-hover: #772ce8;
    --bg-dark: #0e0e10;
    --card-bg: #18181b;
    --hover-bg: #1f1f23;
    --border-color: #303036;
    --text-main: #efeff1;
    --text-muted: #adadb8;
    --danger: #eb0400;
    --success: #00f593;
}

/* --- ESTILOS BASE --- */
body {
    background: transparent; /* Cambiado de var(--bg-dark) */
    color: var(--text-main);
    font-family: 'Inter', 'Roobert', sans-serif;
    margin: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Evita scroll en el body para manejarlo internamente */
}

/* --- BARRA SUPERIOR (TOP BAR) --- */
.top-bar {
    height: 70px;
    min-height: 70px;
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    position: relative;
    z-index: 1000;
}

/* --- ESTRUCTURA DE CONTENEDORES --- */
.main-wrapper {
    display: flex;
    flex: 1; /* Ocupa todo el espacio restante debajo de la top-bar */
    overflow: hidden;
}

.sidebar {
    width: 260px;
    min-width: 260px;
    background: var(--card-bg);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    height: 100%;
    z-index: 10;
}

.content { 
    flex: 1; 
    padding: 40px; 
    overflow-y: auto; 
    /* background-color: var(--bg-dark); */ /* Quitamos esto */
}

/* --- NAVEGACIÓN Y LOGO --- */
.logo {
    padding: 25px;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.nav-link {
    padding: 15px 25px;
    color: var(--text-muted);
    text-decoration: none !important;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: 0.3s;
    border-left: 4px solid transparent;
}

.nav-link:hover, .nav-link.active {
    background-color: var(--hover-bg);
    color: white;
    border-left: 4px solid var(--primary);
}

.nav-link i { width: 20px; text-align: center; }

.nav-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: 2px solid var(--primary);
}

/* --- COMPONENTES (CARDS) --- */
.card, .discord-card, .stat-card {
    background: var(--card-bg) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 12px !important;
    padding: 25px;
    margin-bottom: 30px;
    color: var(--text-main) !important;
}

/* --- ANALYTICS CARDS --- */
.stat-card { text-align: center; }
.stat-value { font-size: 2rem; font-weight: 800; color: var(--primary); display: block; }
.stat-label { color: var(--text-muted); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1px; }

/* --- TABLAS --- */
table { width: 100%; border-collapse: collapse; margin-top: 15px; }
th { text-align: left; color: var(--text-muted); padding: 12px; border-bottom: 2px solid var(--border-color); font-size: 0.8rem; text-transform: uppercase; }
td { padding: 12px; border-bottom: 1px solid var(--border-color); }

/* --- BOTONES --- */
.btn-primary, .btn-save, .btn-dash {
    background-color: var(--primary) !important;
    border: none !important;
    color: white !important;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary:hover { background-color: var(--primary-hover) !important; }
.btn-danger { background-color: var(--danger) !important; color: white !important; }

/* --- SWITCHES CUSTOM --- */
.custom-control.custom-switch { padding-left: 2.25rem; position: relative; display: inline-block; }
.custom-control-input { position: absolute; z-index: -1; opacity: 0; }
.custom-control-label { position: relative; cursor: pointer; }
.custom-control-label::before {
    position: absolute; top: .25rem; left: -2.25rem; display: block; width: 1.75rem; height: 1rem;
    content: ""; background-color: #333; border-radius: .5rem; transition: 0.2s;
}
.custom-control-label::after {
    position: absolute; top: calc(.25rem + 2px); left: calc(-2.25rem + 2px); display: block; width: calc(1rem - 4px); height: calc(1rem - 4px);
    content: ""; background-color: #fff; border-radius: 50%; transition: 0.2s;
}
.custom-control-input:checked ~ .custom-control-label::before { background-color: var(--primary); }
.custom-control-input:checked ~ .custom-control-label::after { transform: translateX(.75rem); }

/* --- RESPONSIVE DESIGN --- */
@media (max-width: 768px) {
    .main-wrapper { flex-direction: column; overflow-y: auto; }
    .sidebar { width: 100%; height: auto; border-right: none; border-bottom: 1px solid var(--border-color); }
    .content { overflow-y: visible; padding: 20px; }
}
/* Contenedor del video */
.video-bg-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -10; /* Muy al fondo */
    overflow: hidden;
    background-color: #000; /* Color de respaldo */
}

.video-bg-wrapper video {
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    object-fit: cover;
}

/* Capa para oscurecer el video y que el texto se lea */
.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6); /* Ajusta este 0.6 para más o menos oscuridad */
}

/* IMPORTANTE: Hacer transparentes los fondos actuales */
body, .main-wrapper, .content {
    background: transparent !important;
}

/* Si el sidebar tiene un fondo muy sólido, podrías darle un toque transparente */
.sidebar {
    background: rgba(18, 18, 18, 0.8) !important;
    backdrop-filter: blur(10px);
}
/* --- UNIFICACIÓN DE CAMPOS DE ESCRITURA (ANTI-AZUL) --- */

/* 1. Fondo, texto y bordes base */
input[type="text"], 
input[type="number"], 
input[type="password"],
textarea, 
select {
    background-color: var(--card-bg) !important;
    color: var(--text-main) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 8px !important;
    padding: 10px 15px !important;
    outline: none !important; /* Quita el borde azul del navegador */
    box-shadow: none !important; /* Quita la sombra azul de Bootstrap */
    transition: border-color 0.2s ease;
}

/* 2. Color del texto de ejemplo (ej: redes) */
input::placeholder, 
textarea::placeholder {
    color: var(--text-muted) !important;
    opacity: 0.6;
}

/* 3. Estado al hacer clic (Focus) - Cambiamos el azul por tu violeta */
input:focus, 
textarea:focus, 
select:focus {
    border-color: var(--primary) !important; /* Borde violeta suave */
    background-color: var(--hover-bg) !important; /* Se oscurece un poco al escribir */
    outline: none !important;
    box-shadow: 0 0 0 2px rgba(145, 70, 255, 0.2) !important; /* Brillo violeta muy sutil */
}

/* 4. Estilo para los menús desplegables (Select) */
select option {
    background-color: var(--card-bg);
    color: var(--text-main);
}
/* --- AJUSTES DE TIMERS --- */

.timer-row {
    display: flex;
    gap: 20px; /* Espacio entre los dos cuadros */
    margin-bottom: 20px;
}

.input-group {
    flex: 2; /* El nombre toma más espacio */
}

.input-group.small {
    flex: 0.5; /* El número de minutos se queda pequeño */
    min-width: 120px;
}

/* El botón ya no será gigante */
.btn-timer-save {
    width: auto !important; /* Quita el ancho del 100% */
    padding: 12px 40px !important; /* Más elegante */
    min-width: 200px;
    display: block;
    margin-left: auto; /* Lo empuja a la derecha, muy estilo Dashboard Pro */
}

/* Ajuste para el textarea (Mensaje) */
textarea {
    width: 100%;
    min-height: 100px;
    resize: vertical; /* Para que el usuario lo ajuste si quiere */
    margin-bottom: 20px;
}