/* ===== BASE ===== */
body {
    background: #191A1B;
    color: #FFFFFF;
    font-family: system-ui, sans-serif;
}

/* ===== CARD ===== */
.card-app {
    background: #1f2022;
    border-radius: 15px;
    padding: 20px;
}

/* ===== INPUTS ===== */
.form-control {
    background: #2a2b2d;
    border: none;
    color: #fff;
}

.form-control:focus {
    box-shadow: none;
    border: 1px solid #F37012;
}

/* ===== BOTONES ===== */
.btn-custom {
    background: #2a2b2d;
    color: #F37012;
    border-radius: 10px;
}

.btn-custom:hover {
    background: #F37012;
    color: #fff;
}

/* ===== TEXTO ===== */
.text-orange {
    color: #F37012;
}

/***********/
/* LOGIN   */
/***********/

body {
    background: #191A1B;
    color: #fff;
}

.card-login {
    background: #1f2022;
    border-radius: 15px;
    padding: 25px;
}

.form-control {
    background: #2a2b2d;
    border: none;
    color: #fff;
}

.form-control:focus {
    box-shadow: none;
    border: 1px solid #F37012;
}

.btn-custom {
    background: #2a2b2d;
    color: #F37012;
    border-radius: 10px;
}

.btn-custom:hover {
    background: #F37012;
    color: #fff;
}

/* ===== CARD LOGIN / REGISTER ===== */
.card-auth {
    background: #1f2022;
    border-radius: 20px;
    padding: 25px 20px;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
}

/* ===== LABELS ===== */
.form-label {
    font-size: 0.8rem;
    color: #aaa;
    margin-bottom: 3px;
}

/* ===== INPUTS ===== */
.form-control {
    height: 42px;
    font-size: 0.9rem;
    border-radius: 10px;
}

/* ===== ESPACIADO ===== */
.form-group {
    margin-bottom: 12px;
}

/* ===== BOTÓN ===== */
.btn-custom {
    height: 45px;
    font-size: 0.95rem;
}

/*************/
/* DASHBOARD */
/*************/

body {
    background: #191A1B;
    color: #fff;
}

.card-menu {
    background: #1f2022;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    color: #F37012;
    font-weight: 500;
}

.card-menu i {
    width: 40px;
    height: 40px;
    margin-bottom: 6px;
    color: #F37012;
    stroke-width: 1.3;
}

/* TEXTO */
.card-menu div {
    color: #FFFFFF; /* blanco */
    font-size: 0.9rem;
}

.card-menu {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* EJERCICIOS */

/* Color naranja que usas para los botones */
.btn-custom {
    background-color: #F37012;
    color: white;
    border: none;
    font-weight: bold;
}

.btn-custom:hover {
    background-color: #d65f0e;
    color: white;
}

/* Estilo de la tarjeta de ejercicio */
.card-ejercicio {
    border-left: 4px solid #F37012; /* Un detalle de color a la izquierda */
    transition: transform 0.2s;
    cursor: pointer;
}

.card-ejercicio:active {
    transform: scale(0.98);
}

.form-control:focus, .form-select:focus {
    border-color: #F37012;
    box-shadow: 0 0 0 0.25rem rgba(243, 112, 18, 0.25);
}

/* DASHBOARD */

/* Estado base del botón gigante */
.card-btn-gigante {
    background: #252525; 
    border-radius: 24px;
    padding: 35px 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid #333; /* Borde sutil inicial */
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

/* Texto del botón siempre blanco */
.card-btn-gigante span {
    color: #ffffff !important; /* Forzamos el blanco */
    margin-top: 15px;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* EFECTO SOBRESALIR (Al pasar el mouse) */
.card-btn-gigante:hover {
    transform: translateY(-8px) scale(1.03); /* Sube y crece */
    background: #2a2a2a;
    /* Quitamos el borde naranja, mantenemos el color de borde original o uno levemente más claro */
    border-color: #444; 
    box-shadow: 0 15px 30px rgba(0,0,0,0.6);
}

/* EFECTO HUNDIR (Al hacer clic) */
.card-btn-gigante:active {
    transform: translateY(2px) scale(0.95);
    background: #1e1e1e;
    border-color: #333; /* Mantenemos el borde sobrio al hundirse */
    box-shadow: inset 0 4px 10px rgba(0,0,0,0.8);
}

.saludo-titulo {
    font-family: 'Kanit', sans-serif;
    font-weight: 200; /* Aquí está el secreto: muy delgado */
    /*font-style: italic; */
    font-size: 2rem;
    letter-spacing: 1px; /* Un poco más de espacio entre letras al ser fino */
    margin-bottom: 25px;
    color: #ffffff;
}

.nombre-naranja {
    color: #F37012;
    font-weight: 400; /* El nombre un poquito más marcado que el "Hola" */
}

/* CARD DE GRUPOS MUSCULARES */

.card-app {
    background: #1f2022;
    padding: 12px 15px;
    border-radius: 10px;
    color: #fff;
}

/* Botones de navegación (volver / +) */
.btn-nav {
    min-width: 40px;
    height: 40px;
    font-size: 1rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== SWEETALERT CUSTOM ===== */

/* ===== SWEETALERT BOTONES LIMPIOS ===== */

/* Confirmar (Guardar / Aceptar) */
.swal2-confirm {
    background: #F37012 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 10px !important;
    padding: 8px 16px !important;
    box-shadow: none !important;
}

/* Hover */
.swal2-confirm:hover {
    background: #d95f0f !important;
}

/* Cancelar */
.swal2-cancel {
    background: #2a2b2d !important;
    color: #F37012 !important;
    border: none !important; /* 🔥 QUITA EL BORDE */
    border-radius: 10px !important;
    padding: 8px 16px !important;
    box-shadow: none !important;
}

/* Hover cancelar */
.swal2-cancel:hover {
    background: #3a3b3d !important;
}

/* Quitar focus feo */
.swal2-confirm:focus,
.swal2-cancel:focus {
    outline: none !important;
    box-shadow: none !important;
}

/* espacio entre botones SweetAlert */
.swal2-actions {
    gap: 10px; /* ajusta a tu gusto (8–12 ideal) */
}

.swal2-popup {
    background: #1f2022 !important;
    color: #fff !important;
    padding: 20px !important;
}

/* 🔥 Inputs dentro de SweetAlert */
.swal2-popup .custom-input {
    width: 100%;
    padding: 10px;
    font-size: 14px;
    border-radius: 8px;
    margin-bottom: 10px;
}

/* 🔥 Textarea más grande */
.swal2-popup textarea.custom-input {
    min-height: 120px;
    resize: none;
}

/* 🔥 Select más cómodo */
.swal2-popup select.custom-input {
    height: 45px;
}

/* ===== BOTÓN BASE ===== */
.btn-app {
    background: #2a2b2d;
    color: #F37012;
    border-radius: 10px;
    padding: 8px 12px;
    border: none;
    font-size: 0.9rem;
    transition: 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.btn-app i {
    width: 18px;
    height: 18px;
}

/* Hover general */
.btn-app:hover {
    background: #F37012;
    color: #fff;
}

/* ===== BOTÓN PRINCIPAL (guardar / aceptar) ===== */
.btn-app-primary {
    background: #F37012;
    color: #fff;
}

.btn-app-primary:hover {
    background: #d95f0f;
}

/* ===== BOTÓN PELIGRO (eliminar) ===== */
.btn-app-danger {
    background: #2a2b2d;
    color: #ff4d4d;
}

.btn-app-danger:hover {
    background: #ff4d4d;
    color: #fff;
}

/* botones solo icono */
.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
}

.btn-icon:disabled {
    opacity: 0.4;                 
    pointer-events: none;
}

/* EJERCICIOS */
/* Inputs dentro de SweetAlert */
/* inputs más compactos */

/* contenedor del contenido */
.swal2-html-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* select mismo estilo */
.custom-input option {
    background: #191A1B;
    color: #fff;
}

/* Quitar blanco feo del select */
.swal2-select {
    background-color: #191A1B !important;
    color: #fff !important;
}

.custom-input {
    background: #2c2c2c !important;
    border: 1px solid #3d3d3d !important;
    color: #fff !important;
    padding: 10px 15px;
    border-radius: 10px;
    outline: none;
    transition: all 0.3s;
}

.custom-input:focus {
    border-color: #F37012 !important;
    background: #333 !important;
    box-shadow: 0 0 0 2px rgba(243, 112, 18, 0.2);
}

/* Placeholder más suave */
.custom-input::placeholder {
    color: #aaa;
}

.swal2-input,
.swal2-select,
.swal2-textarea {
    width: 100% !important;
    box-sizing: border-box;
}

.top-search {
    margin-bottom: 10px;
}

.bottom-pag {
    margin-top: 10px;
    text-align: center;
}

/* BOOTSTRAP PAGINATION FIX */
/* 🔥 ELIMINAR COMPLETAMENTE EL AZUL DE BOOTSTRAP */

.dataTables_wrapper .pagination .page-link:focus,
.dataTables_wrapper .pagination .page-link:active,
.page-link:focus,
.page-link:active {
    outline: none !important;
    box-shadow: none !important;
    background-color: transparent !important;
}

/* 🔥 BOTÓN ACTIVO */
.dataTables_wrapper .pagination .page-item.active .page-link {
    background-color: #F37012 !important;
    border-color: #F37012 !important;
    color: #fff !important;
    box-shadow: none !important;
}

/* 🔥 BOTONES NORMALES */
.dataTables_wrapper .pagination .page-link {
    color: #F37012 !important;
    background-color: transparent !important;
    border: 1px solid #F37012 !important;
}

/* 🔥 HOVER */
.dataTables_wrapper .pagination .page-link:hover {
    background-color: #F37012 !important;
    color: #fff !important;
}

/* TEXTO GENERAL PAGINADOR */
.dataTables_wrapper .pagination .page-link {
    color: #fff !important;
}

/* BOTÓN ACTIVO */
.dataTables_wrapper .pagination .page-item.active .page-link {
    color: #fff !important;
}

/* HOVER */
.dataTables_wrapper .pagination .page-link:hover {
    color: #fff !important;
}

/* DISABLED (opcional) */
.dataTables_wrapper .pagination .page-item.disabled .page-link {
    color: #666 !important;
}

/* placeholder visible */
.dataTables_wrapper .dataTables_filter input::placeholder {
    color: #aaa !important;
    opacity: 1;
}

/* por si el navegador es quisquilloso */
.dataTables_wrapper .dataTables_filter input::-webkit-input-placeholder {
    color: #aaa !important;
}

/* 🔥 HOVER FILAS DATATABLE */
/* 🔥 HOVER FORZADO */
#tablaUsuarios.dataTable tbody tr:hover > * {
    background-color: #2a2b2d !important;
}

#tablaUsuarios td {
    vertical-align: middle;
}

.titulo-app {
    font-size: 1.4rem;
    font-weight: 600;
    color: #fff;
    margin: 0;
}

@media (min-width: 768px) {
    .titulo-app {
        font-size: 1.8rem;
    }
}

/* VISOR DE EJERCICIO */

.card-app div[onclick] {
    transition: 0.2s;
}

.card-app div[onclick]:hover {
    transform: scale(1.01);
}

/* 🔥 estado deshabilitado */
.btn-add-serie[disabled] {
    opacity: 0.4;
    background: #2A2B2D !important;
    color: #7e7e7e !important;
    border-color: #1F2022 !important;
    cursor: not-allowed;
}

/* 🔥 sin hover */
.btn-add-serie[disabled]:hover,
.btn-add-serie[disabled]:focus,
.btn-add-serie[disabled]:active {
    background: #2A2B2D !important;
    color: #7e7e7e !important;
    border-color: #1F2022 !important;
    transform: none !important;
    box-shadow: none !important;
}


/* 🔥 SWITCH DELGADO Y LARGO */
.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 24px; /* 👈 más delgado */
}

.switch input {
    display: none;
}

.slider {
    position: absolute;
    cursor: pointer;
    background-color: #444;
    border-radius: 50px;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    transition: 0.3s;
}

.slider:before {
    content: "";
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: 0.3s;
}

/* ACTIVO */
.switch input:checked + .slider {
    background-color: #F37012;
}

.switch input:checked + .slider:before {
    transform: translateX(34px);
}

.input-timer {
    width: 55px;
    text-align: center;
    display: none;
}

.timer-grande {
    font-size: 48px;
    font-weight: 900;
    color: #F37012;
    line-height: 1;
}

.check-ok {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    height: 100%;

    background: #16a34a;
    color: #fff;

    border-radius: 8px; /* igual que tus botones */
    font-weight: bold;
}

/* CENTRAR TEXTO EN CIRCULO DEL CONTADOR DE DESCANSO*/

.timer-wrapper {
    position: relative;
    width: 140px;
    height: 140px;
    margin: 10px auto;
}

.timer-wrapper svg {
    display: block;
    width: 140px;
    height: 140px;
}

.timer-text {
    position: absolute;
    top: 0;
    left: 0;
    width: 140px;
    height: 140px;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 42px;
    font-weight: bold;
    color: #F37012;
}

.swal2-html-container {
    overflow: visible !important;
}

/* FORMATO PARA LOS MULTI SELECTOR PARA LAS RUTINAS*/

.rutinas-dia {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-width: 100%;
}

.chip {
    position: relative;
}

.chip input {
    display: none;
}

.chip span {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    background: #1f1f1f;
    color: #ccc;
    font-size: 13px;
    cursor: pointer;
    border: 1px solid #333;
    transition: all 0.2s ease;
}

.chip span:hover {
    background: #2a2a2a;
}

.chip input:checked + span {
    background: #F37012;
    color: #fff;
    border-color: #F37012;
}

.rutinas-resumen {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    cursor: pointer;
}

.chip-mini {
    background: #F37012;
    color: #fff;
    padding: 4px 8px;
    border-radius: 10px;
    font-size: 12px;
}

.resumen-rutinas {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.chip-mini {
    background: #F37012;
    color: #fff;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 11px;
}

/* PARA EL DT DE LOS CODIGOS DE ACCESO */ 

#tablaCodigos_wrapper .dataTables_paginate .paginate_button.current {
    background: #F37012 !important;
    border-color: #F37012 !important;
    color: white !important;
    border-radius: 8px;
}

.text-orange { color: #F37012; }

.badge {
    padding: 0.5em 0.8em;
    font-weight: 500;
}

/* Evitar que la tabla se vea apretada en móviles */
#tablaCodigos td {
    vertical-align: middle;
    padding: 12px 8px;
}

/* Estado Disponible: Fondo verde, texto blanco */
.badge-disponible {
    background-color: #28a745 !important;
    color: #ffffff !important;
    padding: 6px 12px;
    border-radius: 8px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
}

/* Estado Usado: Fondo rojo, texto blanco */
.badge-usado {
    background-color: #dc3545 !important;
    color: #ffffff !important;
    padding: 6px 12px;
    border-radius: 8px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
}

/* Estilo para el botón deshabilitado */
button:disabled {
    pointer-events: none;
}

/* Asegura que el icono esté sobre cualquier fondo naranja */
.btn-app.btn-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-app.btn-icon i {
    position: relative;
    z-index: 2; /* Siempre arriba */
    transition: color 0.3s ease;
}

/* Cuando el botón se pinte de naranja al pasar el mouse */
.btn-app.btn-icon:hover i {
    color: #ffffff !important; /* El icono se vuelve blanco para resaltar */
}

/* Ajuste específico para móviles */
@media (max-width: 768px) {
    .btn-app.btn-icon i {
        width: 20px !important;
        height: 20px !important;
    }
}

/* Estilo para la card de salir */
.btn-salir {
    border: 1px solid rgba(220, 53, 69, 0.2) !important; /* Borde rojo muy tenue */
}

.btn-salir:hover {
    background: rgba(220, 53, 69, 0.1) !important;
}

/* Si quieres que el icono de salir sea rojo en lugar de naranja */
.btn-salir i {
    color: #dc3545 !important;
}

/* Añade esto a tu styles.css */
.btn-logout-especial {
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    transition: all 0.3s ease;
}

.btn-logout-especial:hover {
    background: rgba(220, 53, 69, 0.1) !important; /* Un toque rojo muy suave al fondo */
    border-color: #dc3545 !important;
}

.btn-logout-especial:hover i {
    color: #dc3545 !important; /* El icono cambia a rojo al pasar el mouse */
}

.swal2-popup {
    border-radius: 20px !important;
    border: 1px solid rgba(243, 112, 18, 0.2) !important;
}
.swal2-title {
    font-family: 'Kanit', sans-serif !important;
    font-weight: 400 !important;
    letter-spacing: 2px;
}

/* Estilo exclusivo para el selector de segundos del Timer */
.input-timer-descanso {
    width: 95px !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(243, 112, 18, 0.4) !important;
    color: white !important;
    border-radius: 10px !important;
    font-size: 1.2rem !important;
    font-weight: 700 !important;
    padding: 8px 5px !important;
    text-align: center !important;
    transition: all 0.3s ease !important;
    outline: none !important;
}

.input-timer-descanso:focus {
    border-color: #F37012 !important;
    background: rgba(243, 112, 18, 0.1) !important;
    box-shadow: 0 0 10px rgba(243, 112, 18, 0.2);
}

/* Quita las flechitas de subir/bajar para que se vea más limpio */
.input-timer-descanso::-webkit-inner-spin-button,
.input-timer-descanso::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.top-session-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background: rgba(26, 26, 26, 0.8); /* Fondo oscuro con transparencia */
    backdrop-filter: blur(10px); /* Efecto de cristal esmerilado */
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* La "Pill" o pastilla del Rol */
.user-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(243, 112, 18, 0.1); /* Tu naranja con baja opacidad */
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid rgba(243, 112, 18, 0.3);
}

.icon-role {
    width: 14px;
    height: 14px;
    color: #F37012;
}

.role-text {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #F37012;
}

/* Lado derecho: Nombre */
.user-identity {
    display: flex;
    gap: 5px;
    font-family: 'Kanit', sans-serif;
}

.welcome-mini {
    color: #888;
    font-size: 14px;
}

.user-name-top {
    color: #fff;
    font-size: 14px;
    font-weight: 700; /* Negrita imponente */
}

.mini-nav-session {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 25px;
    background: transparent; /* Sin fondo para no saturar */
    font-family: 'Kanit', sans-serif;
    letter-spacing: 0.5px;
}

/* Bloque Izquierdo */
.session-status {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dot-online {
    width: 8px;
    height: 8px;
    background: #F37012; /* Tu naranja */
    border-radius: 2px; /* Cuadradito para toque más técnico */
    box-shadow: 0 0 8px rgba(243, 112, 18, 0.5);
}

.text-status {
    font-size: 11px;
    color: #666;
    font-weight: 400;
}

.rol-highlight {
    color: #F37012;
    font-weight: 700;
}

/* Bloque Derecho */
.session-user {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
}

.user-greeting {
    font-size: 11px;
    color: #666;
}

.user-name-bold {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
}

/* Línea decorativa naranja debajo del nombre */
.user-line {
    position: absolute;
    bottom: -4px;
    right: 0;
    width: 20px;
    height: 2px;
    background: #F37012;
    border-radius: 2px;
}

/* LISTA DE RUTINAS */

/* Tarjeta Principal */
.rutina-card {
    background: #1e1e1e;
    border-radius: 20px;
    padding: 1.2rem;
    border: 1px solid #2c2c2c;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.rutina-card:hover {
    border-color: #F37012;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(243, 112, 18, 0.1);
}

/* Título en Naranja */
.rutina-titulo {
    color: #F37012;
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 4px;
    letter-spacing: 0.5px;
}

/* Badges y Textos */
.badge-tipo {
    font-size: 0.7rem;
    color: #888;
    font-weight: 700;
    letter-spacing: 1px;
}

.badge-count {
    background: rgba(243, 112, 18, 0.15);
    color: #F37012;
    padding: 2px 10px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.text-muted-dark {
    color: #555;
    font-size: 0.7rem;
}

.rutina-footer {
    border-top: 1px solid #2a2a2a;
    padding-top: 10px;
}

/* Botones de acción */
.btn-icon-modern {
    background: #2a2a2a;
    border: none;
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-icon-modern.edit:hover { background: #F37012; }
.btn-icon-modern.delete:hover { background: #dc3545; }

.btn-icon-modern i {
    width: 18px;
}