.light-mode {
    --fondo: #f8fafc;
    --card: #ffffff;
    --boton: #0891b2;
    --texto: #1e293b;
    --texto-secundario: #64748b;
    --input-bg: #ffffff;
    --borde: #e2e8f0;
    --acento: #06b6d4;
    --icono-principal: #0891b2;
    --icono-alegre: rgb(208, 151, 17);
    /* Prioridades */
    --baja-bg: #f0fdf4;
    --baja-txt: #166534;
    --media-bg: #fffbeb;
    --media-txt: #92400e;
    --alta-bg: #fef2f2;
    --alta-txt: #991b1b;
}

:root {
    --fondo: #0f172a;
    --card: #1e293b;
    --boton: #22d3ee;
    --texto: #f1f5f9;
    --texto-secundario: #94a3b8;
    --input-bg: #0f172a;
    --borde: #334155;
    --acento: #67e8f9;
    --icono-principal: #22d3ee;
    --icono-alegre: rgb(246, 231, 27);

    /* Prioridades Dark */
    --baja-bg: rgba(34, 197, 94, 0.1);
    --baja-txt: #4ade80;
    --media-bg: rgba(245, 158, 11, 0.1);
    --media-txt: #fbbf24;
    --alta-bg: rgba(239, 68, 68, 0.1);
    --alta-txt: #f87171;
}

* {
    box-sizing: border-box;
}

body {
    max-width: 100vw;
    min-height: 100vh;
    display: flex;
    margin: 0;
    padding: 0;
    background-color: var(--fondo);
    color: var(--texto);
    font-family: "Rubik", sans-serif;
    font-optical-sizing: auto;
    font-weight: 300;
    font-style: normal;
    overflow-x: hidden;
    overflow-y: auto;
}

/* Diseño para el contenedor de error */
.contAlerta,
.contNuevo {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    justify-content: center;
    align-items: center;
    margin: auto;
    flex-direction: column;
    background-color: var(--card);
    padding: 1em;
    border-radius: .5em;
    border: 1px solid var(--borde);
    z-index: 999;
}

.cabError {
    display: flex;
    /* align-items: */
    width: 100%;
    /* justify-content: space-between; */
    flex-direction: row;
    gap: 20px
}

.errorIcon,
.sonrisaIcon {
    fill: var(--alta-txt);
    width: 30px;
}

.sonrisaIcon {
    fill: var(--icono-alegre);
}

.cerrarCont {
    width: 100%;
    display: flex;
    justify-content: end;
    align-items: center;
}

.cerrarAlert {
    fill: var(--boton);
    width: 20px;
    margin: 0;
    margin-left: auto;
    ;
}

.cuerpoError {
    display: flex;
    flex-direction: row;
    width: 100%;
    align-items: center;
}

#logError {
    color: var(--error);
}

.contBtnModo {
    position: fixed;
    right: 10px;
    top: 10px;
}

.btnModo {
    background-color: var(--boton);
    border: none;
    border-radius: 90%;
    padding: 1.1em;
    display: flex;
    align-items: center;
    justify-content: center;
}


.login-port {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.cont-form {
    padding: 1.3em;
    border-radius: .5em;
    background-color: var(--card);
    border: 1px solid var(--borde);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

input,
.selector {
    font-size: 17px;
    padding: .5em .4em;
    margin: 0 -5px;
    border: none;
    border-bottom: 1px solid var(--borde);
    border-radius: .3em;
    outline: none;
    color: var(--texto);
    background-color: var(--input-bg);
}

.textExtra {
    font-size: 16px;
}

.colorText,
.flecha {
    color: var(--texto);
    text-decoration: underline;
    cursor: pointer;
}

/* Diseño del Formulario de Loggin */
.cont-log {
    display: flex;
    flex-direction: column;
    gap: .5em;
}

.inContra {
    width: 85%;
}

.iconCont {
    fill: var(--boton);
}

.contra {
    /* width: 100%; */
    display: flex;
    justify-content: space-between;
}

.contra_btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
    border: none;
    cursor: pointer;
}


.log-btn,
.btnCambiarEstado {
    width: 50%;
    font-size: 16px;
    padding: .6em 0em;
    margin: auto;
    border-radius: .5em;
    border: none;
    background-color: var(--boton);
    cursor: pointer;
}

/* Cambiar el color del boton al dobre poner el mouse */
.log-btn:hover {
    background-color: var(--alta-txt);
    transition: .2s ease-in;
}

/* Formulario de registro */
.cont-sign {
    display: flex;
    flex-direction: column;
    gap: .5em;
}



/*  =============================
    Diseño para el panel principal. 
    ==============================*/
.panelPrincipal {
    display: flex;
    width: 100%;
}


.contEsquina {
    display: flex;
    /* background-color: rgb(248, 148, 148); */
    width: 0 auto;
    margin: 0 0 auto;
    padding: .5em;
    position: absolute
}

.contIconoMenu {
    display: flex;
    flex-direction: column;
    fill: var(--texto);
    padding: .4em;
}

.iconoMenu,
.iconoMenu2 {
    width: 30px;
    fill: var(--icono-principal);
    cursor: pointer;
}

.iconoMenu2 {
    display: none;
}

.contSecciones {
    padding: .2em 1em;
    background-color: var(--card);
    border: 1px solid var(--borde);
    border-radius: .4em;
}

.etiquetaF {
    border: 0px solid var(--icono-principal);
    border-width: 0 0 1.5px;
    color: var(--icono-principal);
    line-height: 1.5;
    cursor: pointer;
    padding: 0 1em;
}

/*  =====================
    Seccion usuarios
    =====================
*/

.contUsuario {
    display: flex;
    width: 100%;
    justify-content: center;
    align-items: center;
    margin: auto;
}

.cardUsuario {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--borde);
    border-radius: .5em;
    padding: 1.5em;
    background-color: var(--card);
    font-size: 16px;
}

.cardUsuario label {
    color: var(--acento)
}

.contIcUsuario {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .5em;
}

.contIcUsuario svg {
    fill: var(--icono-principal);
    width: 50px;
}

.btnDatos {
    font-size: 15px;
    padding: .6em;
    margin: auto;
    border-radius: .3em;
    border: none;
    background-color: var(--boton);
    cursor: pointer;
    color: var(--texto);
}


.contIcUsuario label {
    color: var(--acento);
    font-size: 13px;
    display: flex;
    justify-content: left;
    width: 100%;
}



/*  ======================================================
    Diseño para el contenedor padre de crear y ver tareas 
    ========================================================*/
/* .contTo-DoGen {
    width: 100%;
    display: flex;
} */
.contTo-DoGen {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: flex-start;
    gap: 40px;
    width: 90%;
    margin: 2em auto;
}


/*  ========================================
    Diseño para contenedor de crear tareas.
    ======================================== */

.contInptsCrear {
    display: flex;
    flex-direction: column;
    gap: .5em;
}

.contInCreOrd {
    display: flex;
    flex-direction: column;
}

.contInptsCrear label {
    margin-top: .5em;
}

.contCrearTarea {
    margin: auto;
}

.cardCrearTar {
    border-radius: var(--borde);
    background-color: var(--card);
    border-radius: .5em;
    padding: 1.4em;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.svgCont {
    width: 60px;
    fill: var(--icono-principal);

    /* background-color: rgb(201, 51, 51); */
}


.crearTarea {
    margin-top: .5em;
    font-size: 15px;
    padding: .6em;
    /* margin: auto; */
    border-radius: .3em;
    border: none;
    background-color: var(--boton);
    cursor: pointer;
    color: var(--texto);
}

/*  ================================== 
    Diseño para mostrar las tarjetas.
    ==================================*/
.contDesplazable {
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
    -webkit-overflow-scrolling: touch;
    height: 70%;
}

.contDesplazable::-webkit-scrollbar {
    width: 12px;
}

.contTareas {
    width: 100%;
    display: flex;
    margin: auto;
    height: 75%;
}

.cardTareas {
    width: 100%;
    border-radius: .5em;
    border: 1px solid var(--borde);
    padding: 1em;
    display: flex;
    margin: 0 auto;
    flex-direction: column;
    background-color: var(--card);
    max-height: 80%;

}

/* Subdiseño de tarjetas unicas */
.contTarea {
    display: flex;
    flex-direction: column;
    border-bottom: 1px solid var(--borde);
    padding: .7em .6em;
}

.cab {
    display: flex;
    align-items: center;
    gap: 1em;
    font-size: 20px;
    border-bottom: 2px solid var(--borde);
    padding-bottom: .4em;
}

.cab svg,
.flecha {
    fill: var(--icono-principal);
    width: 30px;

}

.cabTarea {
    display: flex;
    justify-content: space-between;
}

.contIzq {
    display: flex;
    flex-direction: column;
    margin: .5em 0;
    gap: .5em;
}

.contIzq p {
    margin: 0;
}

.contMasInfoTar {
    font-size: 14px;
    display: flex;
    flex-direction: column;
    gap: .8em
}

.fechas {
    display: flex;
    justify-content: space-between;
    /* margin-bottom: .8em; */
}

.contMasInfoTar p {
    margin: 0;
}

.estado {
    font-size: 15px;
    font-weight: 400;
}


/* Colores para las diferentes prioridades de la tarea. */
.baja {
    color: var(--baja-txt)
}

.media {
    color: var(--media-txt)
}

.alta {
    color: var(--alta-txt);
}

/* Dispositivos mas pequeños */

@media (min-width: 320px) and (max-width: 375px) {
    body {
        font-size: 15px;
        width: 100%;
    }

    .cont-form {
        width: 90%;
        padding: .6em;
    }
}

@media (min-width: 425px) and (max-width: 750px) {
    .contTareas {
        width: 90%;
    }

    .contCrearTarea {
        /* width: 70%; */
        margin: auto;
    }

    .cardCrearTar {
        width: 100%;
    }

    .contInptsCrear {
        flex-direction: column;
        gap: 1em;
    }

    .filaCont {
        display: flex;
        flex-direction: row;
        gap: 1em;
    }

    .contInCreOrd {
        flex-direction: column;
    }
}


@media (min-width: 750px) {
    body {
        font-size: 16px;
        width: 100%;
    }

    .contBtnModo {
        right: 10px;
    }

    .contInptsCrear {
        flex-direction: column;
        gap: 1em;
    }

    .filaCont {
        display: flex;
        flex-direction: row;
        gap: 1em;
    }

    .contInCreOrd {
        flex-direction: column;
    }

    .cardTareas {
        width: 100%;
        max-height: 85vh;
    }
}


@media (width >=1000px) {
    body {
        max-width: 100%;
        font-size: 16px;
        overflow-y: hidden;
    }

    .iconoMenu2 {
        display: flex
    }

    .contBtnModo {
        bottom: 30px;
        right: 15px;
    }

    .login-port {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
    }

    .cont-form {
        padding: 3em;
    }

    .contCrearTarea.panel.cerrar,
    .contTareas.panel.cerrar {
        flex: 1;
        width: auto;
        visibility: visible;
        opacity: 1;
        position: relative;
    }

    .cardTareas {
        width: 100%;
        max-height: 85vh;
    }

    /* Ahora para alturas desde 1000 no se debera de usar el btn hamburguesa,
    si no botones unicos. */
    /*Desactivamos el boton general. */
    .iconoMenu {
        visibility: hidden;
        opacity: 0;
        position: absolute;
    }
}

/* Etiquetas reutilizables. */
.ocultar {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    transition: all .5s ease;

}

/* No cuenta con transicion, de una se elimina el contenido. */
.cerrar {
    visibility: hidden;
    opacity: 0;
    position: absolute;
}

/* Estilos para el Control Segmentado de Tareas (iOS Style) */
.contFiltros {
    display: flex;
    background-color: var(--input-bg);
    border: 1px solid var(--borde);
    padding: 3px;
    border-radius: 10px;
    margin: 1em 0;
    width: 100%;
}

.btnFiltro {
    flex: 1;
    padding: 0.6em;
    border: none;
    background: transparent;
    color: var(--texto-secundario);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btnFiltro.active {
    background-color: var(--boton);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Tema Claro específico para el filtro activo */
.light-mode .btnFiltro.active {
    background-color: var(--boton);
    color: white;
}

/* Estilos de Tarea Completada */
.contTarea.completada {
    opacity: 0.6;
    background-color: rgba(0, 0, 0, 0.02);
}

.contTarea.completada .contIzq p span b {
    text-decoration: line-through;
    color: var(--texto-secundario);
}

/* Modo Edición Integrada */
.input-edit {
    display: none;
    width: 100%;
    margin-top: 5px;
    font-family: inherit;
    font-size: 14px;
}

.contTarea.editando .input-edit {
    display: block;
}

.contTarea.editando .texto-vista {
    display: none;
}

.contAcciones {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    width: 100%;
}

.btnEditar, .btnGuardar {
    flex: 1;
    font-size: 14px;
    padding: 0.6em;
    border-radius: 5px;
    border: 1px solid var(--borde);
    background-color: var(--card);
    color: var(--texto);
    cursor: pointer;
    transition: all 0.3s ease;
}

.btnEditar:hover {
    background-color: var(--borde);
}

.btnGuardar {
    background-color: var(--boton);
    color: white;
    border: none;
}

.selector-mini {
    padding: 3px;
    font-size: 13px;
}

textarea.input-edit {
    min-height: 60px;
    resize: vertical;
    padding: 8px;
    border: 1px solid var(--borde);
    border-radius: 4px;
    background-color: var(--input-bg);
    color: var(--texto);
}