/* ==================== ADMIN.CSS ==================== */

.admin-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    min-height: calc(100vh - 64px - 120px);
}

/* SIDEBAR */
.admin-sidebar {
    background: #1a1a1a;
    padding: 0;
    position: sticky;
    top: 64px;
    height: calc(100vh - 64px);
    overflow-y: auto;
}

@media (max-width: 900px) {
    .admin-layout {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .admin-sidebar {
        position: static;
        height: auto;
        min-height: auto;
    }
}

.admin-sidebar-header {
    padding: 1.8rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.admin-badge {
    display: inline-block;
    font-size: 9px;
    letter-spacing: 2px;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.12);
    color: #888;
    padding: 3px 8px;
    margin-bottom: 8px;
}

.admin-user-name {
    font-family: 'Playfair Display', serif;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
}

.admin-nav {
    padding: 1rem 0;
}

.admin-nav-item {
    padding: 0.8rem 1.5rem;
    font-size: 11px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #555;
    cursor: pointer;
    border-left: 2px solid transparent;
    transition: all 0.15s;
}

.admin-nav-item:hover {
    color: #aaa;
}

.admin-nav-item.active {
    color: #fff;
    border-left-color: #fff;
    background: rgba(255, 255, 255, 0.04);
}

/* MAIN */
.admin-main {
    padding: 2.5rem 2rem;
}

.admin-seccion-titulo {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e8e8e8;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.admin-seccion-titulo h2 {
    font-family: 'Playfair Display', serif;
    font-size: 22px;
    font-weight: 700;
    color: #1a1a1a;
}

.admin-seccion-sub {
    font-size: 12px;
    color: #aaa;
    letter-spacing: 0.5px;
}

/* TABLA */
.admin-tabla-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.admin-tabla {
    min-width: 500px;
    width: 100%;
    border-collapse: collapse;
}

.admin-tabla th {
    text-align: left;
    font-size: 9px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #bbb;
    padding: 0.5rem 1rem 0.8rem;
    border-bottom: 1px solid #e8e8e8;
}

.admin-tabla td {
    padding: 0.9rem 1rem;
    font-size: 13px;
    color: #444;
    border-bottom: 1px solid #f5f5f5;
}

.admin-tabla tr:hover td {
    background: #fafafa;
}

.admin-tabla .col-nombre {
    font-weight: 500;
    color: #1a1a1a;
}

.admin-tabla .col-hora {
    color: #888;
    font-size: 12px;
}

/* ESTADO BADGE */
.admin-estado {
    font-size: 9px;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 3px 8px;
}

.admin-estado.confirmada {
    background: #f0f5e8;
    color: #4a7a1a;
}

.admin-estado.pendiente {
    background: #fff8e8;
    color: #8a6a00;
}

.admin-estado.cancelada {
    background: #f8f8f8;
    color: #bbb;
}

/* BOTÓN CANCELAR ADMIN */
.btn-admin-cancelar {
    background: none;
    border: 1px solid #e0e0e0;
    color: #bbb;
    font-family: 'DM Sans', sans-serif;
    font-size: 9px;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 3px 8px;
    cursor: pointer;
    transition: all 0.15s;
}

.btn-admin-cancelar:hover {
    border-color: #e24b4a;
    color: #e24b4a;
}

/* LOADING */
.admin-loading {
    text-align: center;
    padding: 3rem 0;
    font-size: 13px;
    color: #ccc;
}

.admin-empty {
    text-align: center;
    padding: 2.5rem 0;
    font-size: 13px;
    color: #bbb;
    font-style: italic;
}

/* FORM BLOQUEOS */
.admin-bloqueo-form {
    display: flex;
    gap: 0.8rem;
    align-items: center;
    flex-wrap: wrap;
}

.admin-input {
    border: 1px solid #e0e0e0;
    padding: 0.6rem 0.9rem;
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    color: #1a1a1a;
    outline: none;
    transition: border-color 0.15s;
    border-radius: 0;
}

.admin-input:focus {
    border-color: #1a1a1a;
}

/* BTN DESBLOQUEAR */
.btn-desbloquear {
    background: none;
    border: 1px solid #e0e0e0;
    color: #bbb;
    font-family: 'DM Sans', sans-serif;
    font-size: 9px;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 3px 8px;
    cursor: pointer;
    transition: all 0.15s;
}

.btn-desbloquear:hover {
    border-color: #e24b4a;
    color: #e24b4a;
}

/* NAV MES */
.admin-mes-nav {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.admin-mes-btn {
    background: #f5f4f0;
    border: 1px solid #e0e0e0;
    color: #555;
    width: 28px;
    height: 28px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}

.admin-mes-btn:hover {
    background: #e8e8e8;
}

#admin-mes-label {
    font-size: 13px;
    color: #555;
    min-width: 120px;
    text-align: center;
    letter-spacing: 0.5px;
}

.admin-estado.servida {
    background: #e8f4fd;
    color: #1a6fa8;
}

.admin-buscador {
    margin-bottom: 1.2rem;
}

.admin-buscador .admin-input {
    width: 300px;
    max-width: 100%;
}


/* ===== PAGINACIÓN ===== */
.admin-paginacion {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 1rem 0 0;
    flex-wrap: wrap;
}

.pagina-btn {
    background: #fff;
    border: 1px solid #e0e0e0;
    color: #555;
    width: 32px;
    height: 32px;
    font-family: 'DM Sans', sans-serif;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pagina-btn:hover {
    border-color: #1a1a1a;
    color: #1a1a1a;
}

.pagina-btn.active {
    background: #1a1a1a;
    color: #fff;
    border-color: #1a1a1a;
}

.pagina-btn:disabled {
    color: #ddd;
    cursor: default;
    border-color: #f0f0f0;
}

.pagina-btn:disabled:hover {
    border-color: #f0f0f0;
    color: #ddd;
}

.pagina-nav {
    font-size: 16px;
}

.pagina-info {
    font-size: 11px;
    color: #aaa;
    margin-left: 8px;
    letter-spacing: 0.5px;
}

/* ===== HORARIOS ===== */
.horarios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.2rem;
}

.horario-dia-card {
    border: 1px solid #e8e8e8;
    padding: 1.2rem;
}

.horario-dia-nombre {
    font-family: 'Playfair Display', serif;
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 1rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid #f0f0f0;
}

.horario-franja {
    margin-bottom: 1rem;
    padding: 0.8rem;
    background: #fafafa;
    border: 1px solid #f0f0f0;
    transition: opacity 0.2s;
}

.horario-franja.inactiva .horario-franja-header,
.horario-franja.inactiva .horario-horas,
.horario-franja.inactiva .horario-franja-label {
    opacity: 0.45;
}

.horario-franja-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.7rem;
}

.horario-franja-label {
    font-size: 11px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #888;
}

.horario-toggle {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 20px;
    cursor: pointer;
}

.horario-toggle input {
    display: none;
}

.toggle-slider {
    position: absolute;
    inset: 0;
    background: #ddd;
    border-radius: 20px;
    transition: background 0.2s;
}

.toggle-slider::after {
    content: '';
    position: absolute;
    width: 14px;
    height: 14px;
    background: #fff;
    border-radius: 50%;
    top: 3px;
    left: 3px;
    transition: left 0.2s;
}

.horario-toggle input:checked+.toggle-slider {
    background: #1a1a1a;
}

.horario-toggle input:checked+.toggle-slider::after {
    left: 19px;
}

.horario-horas {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.7rem;
}

.horario-input {
    flex: 1;
    padding: 0.4rem 0.6rem;
    font-size: 13px;
}

.horario-sep {
    color: #bbb;
    font-size: 12px;
}

.btn-guardar-horario {
    width: 100%;
    text-align: center;
    padding: 0.5rem;
    font-size: 10px;
}

.horario-ok {
    display: block;
    text-align: center;
    font-size: 11px;
    color: #4a7a1a;
    margin-top: 4px;
}


.horario-franja.inactiva .btn-guardar-horario {
    opacity: 1;
    background: #1a1a1a;
    color: #fff;
}

/* ===== MESES ABIERTOS ===== */
.meses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.mes-card {
    border: 1px solid #e8e8e8;
    padding: 1.2rem 1.4rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    transition: border-color 0.15s;
}

.mes-card.abierto {
    border-color: #c8deb0;
    background: #f8fdf2;
}

.mes-card.cerrado {
    background: #fafafa;
}

.mes-card-mes {
    font-family: 'Playfair Display', serif;
    font-size: 15px;
    font-weight: 700;
    color: #1a1a1a;
}

.mes-card-estado {
    font-size: 11px;
    letter-spacing: 0.5px;
}

.mes-card.abierto .mes-card-estado {
    color: #4a7a1a;
}

.mes-card.cerrado .mes-card-estado {
    color: #bbb;
}

.mes-badge-actual {
    font-size: 10px;
    letter-spacing: 0.5px;
    color: #888;
    font-style: italic;
}

.btn-abrir-mes {
    margin-top: 0.3rem;
    background: #1a1a1a;
    color: #fff;
    border: none;
    font-family: 'DM Sans', sans-serif;
    font-size: 10px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 0.45rem 0.8rem;
    cursor: pointer;
    transition: background 0.15s;
    align-self: flex-start;
}

.btn-abrir-mes:hover {
    background: #333;
}

.btn-cerrar-mes {
    margin-top: 0.3rem;
    background: none;
    border: 1px solid #e0e0e0;
    color: #bbb;
    font-family: 'DM Sans', sans-serif;
    font-size: 9px;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 3px 8px;
    cursor: pointer;
    transition: all 0.15s;
    align-self: flex-start;
}

.btn-cerrar-mes:hover {
    border-color: #e24b4a;
    color: #e24b4a;
}

/* Mensaje mes no disponible en reservas */
.mes-no-disponible {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    padding: 2.5rem 1rem;
    font-size: 13px;
    color: #bbb;
    text-align: center;
    letter-spacing: 0.3px;
}

.mes-no-disponible span {
    font-size: 28px;
    opacity: 0.5;
}

/* ===== BOTONES ELIMINAR CITAS ===== */
.btn-admin-cancelar {
    font-size: 11px;
    letter-spacing: 1px;
    text-transform: uppercase;
    background: none;
    border: 1px solid #e24b4a;
    color: #e24b4a;
    padding: 4px 10px;
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
}

.btn-admin-cancelar:hover {
    background: #e24b4a;
    color: #fff;
}

.btn-admin-eliminar {
    background: none;
    border: 1px solid #e24b4a;
    color: #e24b4a;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 14px;
    border-radius: 3px;
    transition: all 0.15s;
    line-height: 1;
}

.btn-admin-eliminar:hover {
    background: #e24b4a;
    color: #fff;
}

.btn-admin-eliminar-bulk {
    font-size: 12px;
    letter-spacing: 0.5px;
    background: #e24b4a;
    border: none;
    color: #fff;
    padding: 6px 14px;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s;
    border-radius: 3px;
}

.btn-admin-eliminar-bulk:hover {
    background: #c03838;
}

.btn-admin-deseleccionar {
    font-size: 12px;
    background: none;
    border: 1px solid #ccc;
    color: #888;
    padding: 5px 12px;
    cursor: pointer;
    font-family: inherit;
    border-radius: 3px;
    transition: all 0.15s;
}

.btn-admin-deseleccionar:hover {
    border-color: #888;
    color: #444;
}

.check-cita {
    width: 15px;
    height: 15px;
    cursor: pointer;
    accent-color: #1a1a1a;
}

#check-todos {
    width: 15px;
    height: 15px;
    cursor: pointer;
    accent-color: #1a1a1a;
}