:root {
    --bg-body: #111111;
    --bg-card: #000000;
    --text-main: #ffffff;
    --text-muted: #888;
    --border-neon: #00d2ff;
    --accent-yellow: #FFD700;
}

/* RESET */
.cs-wrapper img, .cs-modal-box img {
    max-width: 100% !important; 
    /*display: inline-block !important;*/
    padding: 0 !important; box-shadow: none !important;
}

/* CONTENEDOR */
.cs-wrapper {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background-color: var(--bg-body) !important;
    padding: 30px;
    border-radius: 0; 
    color: var(--text-main);
    box-sizing: border-box;
    width: 100%;
}

/* FULL WIDTH */
#cs-main-container {
    width: 100vw; position: relative; left: 50%; right: 50%;
    margin-left: -50vw; margin-right: -50vw; background: var(--bg-body);
}

.cs-desktop-only { display: table; }
.cs-mobile-only { display: none; }

/* HEADER */
.cs-nav-container { 
    display: flex; justify-content: space-between; align-items: center; 
    margin-bottom: 30px; max-width: 1400px; margin-left: auto; margin-right: auto; padding: 0 20px;
}
.cs-week-title { font-size: 2em; font-weight: 700; margin: 0; color: #fff; letter-spacing: 0.5px; }
.cs-nav-buttons { display: flex; gap: 8px; }
.cs-nav-btn { 
    background: #333; color: #fff; text-decoration: none; padding: 10px 20px; 
    border-radius: 6px; font-size: 14px; font-weight: 600; transition: 0.2s; 
    border: 1px solid #444; min-width: 40px; justify-content: center; display: flex; align-items: center;
}
.cs-nav-btn:hover { background: #555; }
#btn-today-week { 
background: #ffffff !important; 
    color: #000000 !important; 
    border: 1px solid #ffffff !important;
    /* Este es el resplandor neón */
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.6); 
    text-transform: uppercase; 
    font-weight: 900;
    transition: 0.3s;
}

#btn-today-week:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.9); /* Más brillo al pasar mouse */
}

/* ADMIN */
.cs-admin-bar { max-width: 1400px; margin: 0 auto 20px auto; padding: 15px; background: #000; border: 1px solid #333; border-radius: 8px; display:flex; gap:10px; flex-wrap:wrap; }
.cs-btn-mini { cursor: pointer; padding: 8px 15px; background: #222; border: 1px solid #444; border-radius: 4px; font-weight:bold; color: #fff; font-size: 12px; text-transform: uppercase;}
.cs-btn-green { background: #10b981; border-color: #059669; color:#fff;}

/* TABLA */
.cs-table { width: 100%; max-width: 1600px; margin: 0 auto; border-collapse: separate; border-spacing: 12px; }
.cs-table th { background: #fff; color: #000; padding: 12px; border-radius: 12px; font-size: 13px; font-weight: 800; text-align: center; border: none; text-transform: uppercase; }
.cs-hora-label { 
   background: transparent !important;
    background-color: transparent !important;
    color: #fff;
    font-weight: 800; /* Un poco más grueso para que se lea mejor */
    font-size: 14px;
    
    /* ESTO HACE LA MAGIA DEL CENTRADO EN TABLAS */
    text-align: center;
    vertical-align: middle !important;
    
    /* El borde */
    border: 2px solid #fff;
    border-radius: 16px;
    
    /* Asegura que el texto no toque los bordes laterales */
    padding: 0 5px;
    }

/* CELDAS */
.cs-celda { 
  background-color: var(--bg-card) !important; 
    border-style: solid; border-width: 2px; border-radius: 25px; 
    /* CAMBIO: De 140px a 180px para que quepa la foto de 70px */
    height: 180px; 
    padding: 10px !important; /* Un poco más de padding interno */
    cursor: pointer; box-sizing: border-box; 
    transition: transform 0.2s, box-shadow 0.2s; position: relative; vertical-align: middle;
}
.cs-celda:hover { transform: scale(1.02); box-shadow: 0 0 25px rgba(255, 255, 255, 0.6); border-color: #fff !important; z-index: 5; }
.cs-celda-content { display: flex; flex-direction: column; height: 100%; justify-content: center; align-items: center; text-align: center; margin: 5px; }
.cs-txt-clase { color: #fff; font-weight: 800; font-size: 13px; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px; width:80px; }
.cs-txt-coach { font-size: 11px; color: #ccc; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; margin-top: 8px; }
.cs-avatar-container-cell { 
    display: flex; 
    justify-content: center; align-items: center; 
    /* CAMBIO: Altura suficiente para la foto de 70px */
    height: 75px; 
    
    position: relative; margin-bottom: 8px; /* Un poco más de margen abajo */    
}
.cs-coach-avatar-cell { 
    width: 70px !important; 
    height: 70px !important; 
    border-radius: 50% !important; object-fit: cover !important; 
    border: 2px solid #fff !important; display: block !important; 
    background: #333; position: relative; z-index: 1;
}
.cs-avatar-container-cell img:nth-child(2) { margin-left: -15px; z-index: 2; }
.cs-celda-vacia {  border-radius: 20px; border: none; }

/* MODALES */
.cs-modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(0,0,0,0.9); z-index: 99990; justify-content: center; align-items: center; backdrop-filter: blur(8px); }
.cs-modal-box { background: #111; width: 90%; max-width: 450px; padding: 35px; border-radius: 30px; border: 2px solid var(--accent-yellow); box-shadow: 0 0 60px rgba(0,0,0,1); position: relative; max-height: 95vh; overflow-y: auto; color: #fff; }
.cs-close { position: absolute; top: 20px; right: 25px; font-size: 30px; cursor: pointer; color: #666; }

/* FOTOS MODAL */
.cs-avatar-container-modal { display: flex; justify-content: center; align-items: center; min-height: 90px; margin-bottom: 10px; gap:16px;}
.cs-avatar-user-view { width: 90px !important; height: 90px !important; border-radius: 50% !important; object-fit: cover !important; border: 3px solid #fff !important; display: none; background: #000; z-index: 1; position: relative; }
.cs-avatar-user-view.visible + .cs-avatar-user-view.visible { margin-left: -30px; z-index: 2; }

/* FORM */
.cs-palette { display: flex; gap: 10px; margin-top: 5px; margin-bottom: 0; justify-content: center; padding:8px;}
.cs-palette .cs-color-btn:hover{
    transform:scale(1.2);
}
.cs-color-btn { width: 30px; height: 30px; border-radius: 50%; cursor: pointer; border: 2px solid #333; transition: 0.2s; }
.cs-color-btn.selected { border-color: #fff; transform: scale(1.2); box-shadow: 0 0 15px rgba(255,255,255,0.5); }
.cs-form-row { margin-bottom: 15px; }
.cs-form-row label { display: block; font-size: 12px; color: #aaa; margin-bottom: 5px; text-transform: uppercase; letter-spacing: 1px;}

.cs-form-row input, .cs-form-row select, .cs-form-row textarea { 
    width: 100% !important;
    height: 45px !important;
    /* FIX CONTRA EL TEMA */
    line-height: normal !important;  /* Mata el 1.5 del tema */
    margin: 0 !important;
    
    padding: 0 12px !important; 
    background: #222; 
    border: 1px solid #444 !important; 
    border-radius: 8px !important; 
    box-sizing: border-box !important; 
    color: #fff; 
    font-size: 14px;
    
    /* Centrado vertical estricto */
    display: block; 
    
    /* Reset de estilos nativos */
    -webkit-appearance: none; 
    -moz-appearance: none; 
    appearance: none;
    
}
.cs-btn { width: 100%; padding: 15px; border: none; font-weight: 800; color: #000; cursor: pointer; margin-top: 15px; border-radius: 50px; font-size: 14px; text-transform: uppercase; letter-spacing: 1px; }
.cs-save { 
    background: #39FF14 !important; 
    transition:0.3s;} 
.cs-save:hover { background: #27B30E !important; 
}
.cs-coach-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 15px; }
.cs-coach-item { display: flex; align-items: center; gap: 10px; padding: 10px; background: #222; border-radius: 8px; cursor: pointer; border: 1px solid #333; color: #fff; }
.cs-coach-item img { width: 35px !important; height: 35px !important; border-radius: 50% !important; object-fit: cover !important; }
#coach-img-preview { width: 100px !important; height: 100px !important; border-radius: 50% !important; object-fit: cover !important; border: 4px solid #fff !important; margin: 15px auto !important; display: block !important; background: #222; }

#btn-borrar:hover{background:red !important;}

.cs-txt-sub {
    display: block;
    font-size: 11px;
    color: var(--accent-yellow); /* Amarillo para resaltar */
    font-weight: normal;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: -4px; /* Pegadito al titulo principal */
    margin-bottom: 6px;
    font-style: italic;
}

/* --- NUEVO: REPETIR DIAS (BOLITAS) --- */
.cs-repeat-label {
    display: block; font-size: 12px; color: #aaa; margin-bottom: 8px; text-transform: uppercase; letter-spacing: 1px;
}
.cs-repeat-container {
    display: flex; gap: 8px; justify-content: space-between; margin-bottom: 15px;
}
/* El Checkbox real está oculto */
.cs-repeat-check { display: none; }

/* El diseño del boton */
.cs-day-circle {
    width: 32px; height: 32px;
    background: #222; border: 1px solid #444;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #888; font-size: 11px; font-weight: bold;
    cursor: pointer; transition: 0.2s; user-select: none;
}

/* Cuando el checkbox está marcado (usando el selector +) */
.cs-repeat-check:checked + .cs-day-circle {
    background: var(--accent-yellow);
    color: #000;
    border-color: var(--accent-yellow);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.4);
    transform: scale(1.1);
}

.cs-copy-section {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #333;
    display: none; /* Oculto por defecto */
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 10px;
}

.cs-btn-copy-toggle {
    background: #ff006c !important; 
    color: #fff !important;
    margin-top: 10px !important;
}
.cs-btn-copy-toggle:hover { background: #7C133F !important; }

.cs-btn-confirm-copy {
    background: #28a745 !important; /* Verde */
    color: #fff !important;
    margin-top: 10px !important;
}
/* AJUSTE PARA BOLITAS EN PANEL DE COPIA */
.cs-copy-section .cs-repeat-label {
    color: #fff; /* Texto blanco en fondo oscuro */
    margin-top: 10px;
}

.cs-copy-section .cs-day-circle {
    background: #000; /* Fondo más oscuro para contraste */
    border-color: #555;
}

/* Cuando se marca en el panel de copia */
.cs-copy-section .cs-repeat-check:checked + .cs-day-circle {
    background: #6f42c1; /* Morado para diferenciar de la creación normal */
    color: #fff;
    border-color: #6f42c1;
    box-shadow: 0 0 10px rgba(111, 66, 193, 0.6);
}



/* --- NUEVO v33: CAMPO DURACION Y ALERTAS --- */
.cs-time-preview {
    font-size: 10px;
    color: var(--accent-yellow); /* Amarillo para que resalte */
    font-weight: 600;
    white-space: nowrap; /* Que no se rompa en dos lineas */
    margin-top: -12px;
  margin-bottom: 5px;
}
.cs-time-preview span {
    color: var(--border-neon);
    font-weight: bold;
}

/* Alerta de conflicto en la lista de confirmación */
.cs-conflict-time {
    color: var(--danger);
    font-size: 11px;
    display: block;
    margin-top: 2px;
}

/* =======================================================
   FIX: NEUTRALIZAR ESTILOS DEL TEMA WORDPRESS
   ======================================================= */

/* 1. Quitar el efecto HOVER gris en los encabezados (TH) y celdas */
table.cs-table tbody tr:hover > th,
table.cs-table tbody tr:hover > td {
    background-color: transparent !important;
}

/* 2. Quitar el efecto CEBRA (rayas alternadas) */
table.cs-table tbody > tr:nth-child(2n+1) > td,
table.cs-table tbody > tr:nth-child(2n+1) > th {
    background-color: transparent !important;
}

/* 3. Asegurar que la fila completa sea transparente */
table.cs-table tbody tr {
    background-color: transparent !important;
    border: none !important;
}

/* 4. Forzar que nuestra columna de hora mantenga su estilo */
.cs-hora-label {
    background-color: transparent !important;
}

/* (Solo en móvil) La hora necesita fondo negro para el sticky */
@media (max-width: 768px) {
    .cs-hora-label {
        background-color: var(--bg-body) !important;
    }
}

/* =======================================================
   FIX 2: QUITAR BORDES SUPERIORES DEL TEMA (THEME OVERRIDE)
   ======================================================= */

/* Atacamos específicamente la cabecera de nuestra tabla */
table.cs-table caption + thead tr:first-child th,
table.cs-table colgroup + thead tr:first-child th,
table.cs-table thead:first-child tr:first-child th,
table.cs-table thead tr th {
    border-block-start: 0 !important;
    border-top: none !important;
    border-bottom: none !important; /* Por si acaso */
    box-shadow: none !important;
}

/* Asegurar que el contenedor de la tabla no tenga bordes extraños */
.cs-wrapper table {
    border: none !important;
}

/* --- ESTILOS LISTA DE CONFIRMACIÓN (v34) --- */
.cs-confirm-list {
    display: flex; flex-direction: column; gap: 10px; 
    margin-top: 15px; max-height: 300px; overflow-y: auto;
}

.cs-confirm-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 15px; 
    border-radius: 12px; 
    border: 1px solid #333;
    background: #1a1a1a;
    transition: 0.2s;
}

/* Estados de color */
.cs-confirm-item.clean { border-left: 4px solid var(--success); }
.cs-confirm-item.conflict { border-left: 4px solid var(--danger); background: rgba(220, 53, 69, 0.05); }

/* Contenedor de textos */
.cs-conf-info { display: flex; flex-direction: column; gap: 2px; }

/* LINEA 1: FECHA (Grande y Blanca) */
.cs-conf-date-main { 
    font-size: 14px; 
    font-weight: 800; 
    color: #fff; 
    text-transform: uppercase; 
    letter-spacing: 0.5px;
}

/* LINEA 2: HORARIO (Amarillo y más pequeño) */
.cs-conf-time-sub { 
    font-size: 12px; 
    color: var(--accent-yellow); 
    font-weight: 600; 
    font-family: monospace; /* Para que los números se alineen bonito */
}

/* Estado de Conflicto */
.cs-conf-status { font-size: 10px; text-transform: uppercase; letter-spacing: 1px; margin-top: 2px;}
.clean .cs-conf-status { color: var(--success); }
.conflict .cs-conf-status { color: var(--danger); font-weight: bold; }

/* Checkbox */
.cs-conf-check { width: 22px !important; height: 22px !important; cursor: pointer; accent-color: var(--accent-yellow); }

.cs-flex{
    display:flex;
    gap: 8px;
}

[type=button], [type=submit]{
    border-radius:12px !important;
    border: 1px solid #fff0 !important;
    color:white !important;
    text-shadow: 1px 1px 5px black;
}
/* MOBILE */
@media (max-width: 768px) {
    .cs-desktop-only { display: none; }
    .cs-mobile-only { display: flex !important; }
    .cs-wrapper { padding: 15px 0; background: #000 !important; }
    #cs-main-container { width: 100%; margin: 0; left: 0; }
    .cs-nav-container { flex-direction: column; gap: 10px; text-align: center; }
    .cs-week-title { font-size: 1.4em; }
    .cs-mobile-layout { display: flex; gap: 10px; min-height: 400px; padding: 0 10px; }
    .cs-mob-sidebar { width: 65px; flex-shrink: 0; display: flex; flex-direction: column; gap: 8px; }
    .cs-mob-day-btn { background: #111; border: 1px solid #333; border-radius: 12px; padding: 10px 2px; text-align: center; cursor: pointer; transition: 0.2s; color: #666; }
    .cs-mob-day-btn.active { background: #fff; color: #000; border-color: #fff; font-weight: 800; transform: scale(1.05); box-shadow: 0 0 20px rgba(255, 255, 255, 0.7); }
    .cs-mob-day-num { font-size: 18px; display: block; line-height: 1; margin-bottom: 3px; }
    .cs-mob-day-name { font-size: 10px; text-transform: uppercase; }
    .cs-mob-content { flex-grow: 1; }
    .cs-mob-day-panel { display: none; animation: fadeIn 0.3s; }
    .cs-mob-day-panel.active { display: block; }
    @keyframes fadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
    .cs-mob-card { background: #000; border: 2px solid #333; border-radius: 20px; padding: 15px; margin-bottom: 12px; display: flex; align-items: center; justify-content: space-between; box-shadow: 0 4px 10px rgba(0,0,0,0.5); }
    .cs-mob-card-left { text-align: left; }
    .cs-mob-time { font-size: 1.4em; font-weight: 800; color: #fff; display: block; margin-bottom: 5px; }
    .cs-mob-class { font-size: 1em; color: #ccc; text-transform: uppercase; letter-spacing: 1px; }
    .cs-mob-card-right { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 60px; }
    .cs-txt-sub {
        font-size: 10px;
        margin-top: -2px;
    }
}