:root {
    /* Transitions */
    --smooth: all ease-in-out 0.2s;

    /* Shadows */
    --sha-small: 0 0 0.25rem var(--colorshadow);
    --shadow: 0 0 0.5rem var(--colorshadow);

    /* blur */
    --frosted: blur(1.5rem);

    /* Espacios */
    --space: 1rem;
    --space-double: 2rem;

    /* Border Radius */
    --rounded: 2rem;
    --rounded-all: 100vw;

    /* TranslateY */
    --button-hover: translateY(-0.15rem);
    --button-active: translateY(0) scale(0.95);
    
    color-scheme: light dark; /* Soporte para tema claro y oscuro*/
    --textocolor: light-dark(rgb(0, 0, 0), rgb(255, 255, 255));
    --texthover: rgb(from var(--textocolor) r g b / 0.5);
    --text-faded: rgb(from var(--textocolor) r g b / 0.1);
    --colormain: light-dark(rgb(56, 123, 219), rgb(240, 129, 15));
    --colormainhover: hsl(from var(--colormain) h s 60%);
    --coloralt: light-dark(rgb(57, 219, 211), rgb(240, 88, 14));
    --coloralert: rgb(219, 75, 57);
    --colorback: light-dark(rgb(245, 245, 245), rgb(35, 35, 35));
    --colorfore: light-dark(rgba(255, 255, 255, 0.859), rgb(44, 44, 44));
    --colorshadow: light-dark(rgba(44, 44, 44, 0.1), rgba(0, 0, 0, 0.1));
    --colorblur: rgb(from var(--colorfore) r g b / 0.35);
    --backblur: rgb(from var(--colorback) r g b / 0.35);
    --colornombre: light-dark(hsl(from var(--colormain) h s 45), hsl(from var(--colormain) h s 55));
}

/* Tema 1 */
[data-theme='manzana'] {
    --colormain: rgb(240, 48, 26);
    --coloralt: rgb(26, 240, 128);
    --colorback: light-dark(hsl(from var(--colormain) h s 95%), hsl(from var(--colormain) h 10% 15% ));
    --colorfore: light-dark(hsl(from var(--colormain) h s 85%), hsl(from var(--colormain) h s 30%));
    --colorshadow: light-dark(hsl(from var(--colormain) h s 30% / 0.15), rgba(0, 0, 0, 0.25));
}

/* Tema 2 */
[data-theme='naranja'] {
    --colormain: rgb(255, 119, 0);
    --coloralt: rgb(0, 210, 255);
    --colorback: light-dark(hsl(from var(--colormain) h s 95%), hsl(from var(--colormain) h 10% 15% ));
    --colorfore: light-dark(hsl(from var(--colormain) h s 85%), hsl(from var(--colormain) h s 30%));
    --colorshadow: light-dark(hsl(from var(--colormain) h s 30% / 0.15), rgba(0, 0, 0, 0.25));
}

/* Tema 3 */
[data-theme='banana'] {
    --colormain: rgb(255, 208, 0);
    --coloralt: rgb(0, 1, 255);
    --colorback: light-dark(hsl(from var(--colormain) h s 95%), hsl(from var(--colormain) h 10% 15% ));
    --colorfore: light-dark(hsl(from var(--colormain) h s 85%), hsl(from var(--colormain) h s 30%));
    --colorshadow: light-dark(hsl(from var(--colormain) h s 30% / 0.15), rgba(0, 0, 0, 0.25));
}

/* Tema 4 */
[data-theme='menta'] {
    --colormain: rgb(0, 179, 127);
    --coloralt: rgb(179, 40, 0);
    --colorback: light-dark(hsl(from var(--colormain) h s 95%), hsl(from var(--colormain) h 10% 15% ));
    --colorfore: light-dark(hsl(from var(--colormain) h s 85%), hsl(from var(--colormain) h s 30%));
    --colorshadow: light-dark(hsl(from var(--colormain) h s 30% / 0.15), rgba(0, 0, 0, 0.25));
}

/* Tema 5 */
[data-theme='mora'] {
    --colormain: rgb(0, 106, 255);
    --coloralt: rgb(255, 168, 0);
    --colorback: light-dark(hsl(from var(--colormain) h s 95%), hsl(from var(--colormain) h 10% 15% ));
    --colorfore: light-dark(hsl(from var(--colormain) h s 85%), hsl(from var(--colormain) h s 30%));
    --colorshadow: light-dark(hsl(from var(--colormain) h s 30% / 0.15), rgba(0, 0, 0, 0.25));
}

/* Tema 6 */
[data-theme='uva'] {
    --colormain: rgb(179, 0, 255);
    --coloralt: rgb(187, 255, 0);
    --colorback: light-dark(hsl(from var(--colormain) h s 95%), hsl(from var(--colormain) h 10% 15% ));
    --colorfore: light-dark(hsl(from var(--colormain) h s 85%), hsl(from var(--colormain) h s 30%));
    --colorshadow: light-dark(hsl(from var(--colormain) h s 30% / 0.15), rgba(0, 0, 0, 0.25));
}

/* Tema 7 */
[data-theme='frambuesa'] {
    --colormain: rgb(245, 59, 130);
    --coloralt: rgb(59, 245, 71);
    --colorback: light-dark(hsl(from var(--colormain) h s 95%), hsl(from var(--colormain) h 10% 15% ));
    --colorfore: light-dark(hsl(from var(--colormain) h s 85%), hsl(from var(--colormain) h s 30%));
    --colorshadow: light-dark(hsl(from var(--colormain) h s 30% / 0.15), rgba(0, 0, 0, 0.25));
}

/* Configuración Global*/
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    list-style: none;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--textocolor);
    border-style: none;
    text-decoration: none;
    -ms-overflow-style: none;
}

body {
    background-color: var(--colorback);
    padding-top: 7rem;
}

/* Containers de diferentes tamaños */
main {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    align-content: center;
    align-items: center;
    justify-content: center;
    justify-items: center;
    width: 100%;
    height: 100%;
    padding: var(--space-double);
    gap: var(--space);
    overflow-x: hidden;
    overflow-y: scroll;  
}

.maincontainer { /* Para que se alineen siempre en el centro */
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    align-content: center;
    align-items: center;
    justify-content: center;
    justify-items: center;
    width: 100%;
    height: 100%;
    padding: var(--space-double);
    gap: var(--space);
    overflow-x: hidden;
    overflow-y: scroll;
}

.floating {
    display: none;
    position: fixed;
    right: var(--space);
    max-height: calc(100vh - 10rem);
    overflow-x: clip;
    overflow-clip-margin: var(--space);
    overflow-y: auto !important;
    align-items: flex-start;
    justify-content: center;
    border-radius: var(--rounded);
    /* box-shadow: var(--shadow); */
}

.botonesP {
    position: relative;
}

/* Contenedor del panel de usuario: ancla el panel al icono (desktop) */
.userdropdown {
    position: relative;
}

btn {
    user-select: none;
    cursor: pointer;
}

.floatinguser {
    display: flex;
    position: absolute;
    top: calc(100% + 1rem);
    left: calc(-100% - 3rem);
    right: auto;
    margin-top: 0;
    transform: translateX(-50%);
    z-index: 102;
    max-height: calc(100vh - 10rem);
    overflow-x: hidden;
    overflow-y: auto !important;
    align-items: flex-start;
    justify-content: center;
    border-radius: var(--rounded);
    box-shadow: var(--shadow);
    user-select: none;
}

.usertoolsMobile {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    align-content: center;
    align-items: center;
    justify-content: center;
    justify-items: center;
    width: 100%;
    gap: var(--space);
    padding: var(--space) 0;
    user-select: none;
    border-top: var(--text-faded) solid 2px;
    border-bottom: var(--text-faded) solid 2px;
}

.floating .cardglass  {
    box-shadow: none !important;
}

.container_columns {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-content: flex-start;
    align-items: flex-start;
    justify-content: center;
    justify-items: center;
    width: 100%;
    height: 100%;
    gap: var(--space-double);
}

.container_s {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    align-content: center;
    align-items: center;
    justify-content: center;
    justify-items: center;
    width: clamp(18rem, 20rem, 95vh);
    gap: var(--space-double);
}

.container_m {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    align-content: center;
    align-items: center;
    justify-content: center;
    justify-items: center;
    width: 35rem;
    max-width: 95vw;
    min-height: 25vh;
    gap: var(--space-double);
}

.container_l {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    align-content: center;
    align-items: center;
    justify-content: center;
    justify-items: center;
    width: 50rem;
    max-width: 95vw;
    min-height: 25vh;
    gap: var(--space-double);
}

.container_xl {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    align-content: center;
    align-items: center;
    justify-content: center;
    justify-items: center;
    width: 65rem;
    max-width: 95vw;
    min-height: 25vh;
    gap: var(--space-double);
}

.video-fondo {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}

.overlay-video {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.45);
  z-index: -1;
}

.container_item {
    color: var(--colornombre);
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    width: 100%;
    align-content: center;
    align-items: center;
    justify-content: center;
    justify-items: center;
    gap: var(--space-double);
}

/* Contenedores grid */
.container_grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
    justify-items: center;
    align-items: center;
    justify-content: center;
    align-content: center;
    gap: var(--space);
}

.perfect_grid {
    display: grid;
    grid-template-columns: repeat(3, 3rem);
    align-content: center;
    align-items: center;
    justify-content: center;
    justify-items: center;
    gap: var(--space);
}

/* Contenedor texto tag*/
.container_tag {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-content: center;
    align-items: center;
    justify-content: center;
    justify-items: center;
    text-align: center;
    vertical-align: middle;
}

/* Force Left */
.align_left {
    align-content: baseline !important;
    align-items: baseline !important;
}

/* Scrollbar*/
::-webkit-scrollbar {
    width: 0.25rem;
    height: 0.25rem;
}

::-webkit-scrollbar-track {
    background: none;
}

::-webkit-scrollbar-thumb {
    background: var(--texthover);
    border-radius: var(--rounded-all);
    transition: var(--smooth);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--textocolor);
}

/* Overflow */
.auto_x {
    overflow-x: auto !important;
}

.auto_y {
    overflow-y: scroll !important;
}

/* Tablas */
table {
    table-layout: auto;
    width: clamp(900px, calc(100vw - 6rem), 100%);
    box-shadow: var(--shadow);
}

table, th, td{
    border-collapse: collapse;
    border: var(--colorback) solid 0.15rem;
}

th, td {
    padding: var(--space);
    width: fit-content;
}

th {
    background-color: var(--colorback);
    text-align: center;
    vertical-align: middle;
}

td {
       background-color: rgba(from var(--colorback) r g b 0.5);
}

#nom_usuario,.usuarioMenu {
  color: var(--colornombre);
}



.grid_item {
    display: flex;
    flex-wrap: wrap;
    align-content: center;
    align-items: center;
    justify-content: center;
    justify-items: center;
    width: 100%;
    min-height: 3rem;
}

td a {
    color: var(--colormain);
    transition: var(--smooth);
}

td a:hover {
    color: var(--colormainhover);
}

/* DataTables wrapper */
.dataTables_wrapper {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    align-content: center;
    /*align-items: center;*/
    justify-content: center;
    justify-items: center;
    gap: var(--space);
}

.dataTables_wrapper label {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-content: center;
    align-items: center;
    /*justify-content: center;*/
    justify-items: center;
    gap: var(--space);
}

.dataTables_wrapper input[type="search"] {
    display: flex;
    flex-wrap: wrap;
    height: var(--space-double);
    width: 10rem;
    background-color: var(--colorback);
    border: var(--colorfore) solid 2px;
    border-radius: var(--rounded);
    padding: var(--space) 0 var(--space) 0;
    align-content: center;
    justify-content: center;
    text-align: center;
}

.dataTables_wrapper select {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    height: var(--space-double);
    width: 6rem;
    background-color: var(--colorfore);
    border: solid var(--colorback) 2px;
    border-radius: var(--rounded);
    text-align: center;
    cursor: pointer;
    transition: var(--smooth);
}

.dataTables_wrapper select:hover {
    background-color: var(--colorback);
    color: var(--colormain);
}

/* Data Tables length*/
.dataTables_length {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: var(--space-double);
}

/* Frame de textbox */
.frame_textbox {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    width: 100%;
    align-content: left;
    align-items: left;
    justify-content: center;
    justify-items: center;
    gap: var(--space);
}

.frame_textbox p{
    padding-left: var(--space);
}

.dataTables_info {
    color: var(--texthover);
}

/* Frame close button */
.frame_close {
    display: flex;
    flex-direction: row-reverse;
    flex-wrap: wrap;
    width: 100%;
    align-content: center;
    align-items: center;
    justify-content: left;
    gap: var(--space);
}

.frame_close p {
    display: flex;
    flex-wrap: wrap;
    align-content: center;
    align-items: center;
    justify-content: center;
    justify-items: center;
    height: 3rem;
}

.closecontainer path{
    fill: var(--textocolor);
    transition: var(--smooth);
}

.closecontainer:hover path{
    fill: var(--coloralert);
}

.closecontainer {
    cursor: pointer;
    transition: var(--smooth);
}

.closecontainer:hover {
    transform: var(--button-hover);
}

/* Inputs */
/* Textbox*/
.textbox,
.textarea,
.datetime {
    display: flex;
    flex-wrap: wrap;
    height: 3rem;
    width: 100%;
    background-color: var(--colorback);
    border: var(--text-faded) solid 2px;
    border-radius: var(--rounded);
    padding: var(--space) 0 var(--space) 0;
    align-content: center;
    justify-content: center;
    text-align: center;
    transition: var(--smooth);
}

.textarea {
    height: auto;
    resize: none;
    padding: 1.5rem;
    justify-content: left;
    justify-items: left;
    text-align: start;
}

/* file */
.file {
    display: block;
    min-height: 6rem;
    width: 100%;
    background-color: var(--colorback);
    color: var(--texthover);
    border: var(--text-faded) solid 2px;
    border-radius: var(--rounded);
    padding: 1rem 2rem 2rem 2rem;
    overflow: hidden;
}

::file-selector-button {
    position: relative;
    left: 0;
    height: 2rem;
    font-size: x-small;
    margin: var(--space) 0 var(--space) 0;
}

.preview {
    display: flex;
    flex-wrap: wrap;
    width: clamp(1vw, 25rem, 100%);
    align-content: center;
    align-items: center;
    justify-content: center;
    justify-items: center;
    border: solid var(--text-faded) 2px;
    border-radius: var(--rounded);
    box-shadow: var(--shadow);
}

/* Cambiar los display */
.d-none {
    display: none !important;
}

.d-flex {
    display: flex;
}

/* Forzar dimensiones */
.widest {
    width: 100% !important;
}

.fitcontent {
    width: fit-content !important;
}

/* Headers */
h1 {
    padding: 1rem 0;
    text-align: center;
    /*font-size: clamp(14px, 2rem, 4rem);*/
}

/* Seccion de botones*/
.btnsection {
    width: clamp(6rem, 24rem, 36rem);
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space);
}

.ImagenTache{
    width: 2%;
}

.crear-notas{
    width: 100%;
    border: 2px solid #00000054;
    border-radius: 10px;
    padding: 10px 10px 12px 15px;
}

.leyenda_imagen{
    border: 2px solid #00000054;
    border-radius: 10px;
    padding: 10px 10px 12px 15px;
    width: 100%;
}

.ImagenDestacada{
padding: 10px 10px 12px 12px;
    border: 2px solid;
    display: flex;
    width: 100%;
    background-color: var(--colorback);
    border: var(--text-faded) solid 2px;
    border-radius: var(--rounded);
   
}

.barra_cuerpo_nota{
    width: 100%;
    border: 2px solid #00000063;
    border-radius: 10px;

}

.button {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 3rem;
    width: 100%;
    background-color: var(--colormain);
    border: solid var(--texthover) 2px;
    border-radius: var(--rounded-all);
    text-transform: uppercase;
    color: rgb(255, 255, 255);
    box-shadow: var(--sha-small);
    cursor: pointer;
    transition: var(--smooth);
    font-weight: 700;
}

.button:hover {
    color: rgba(255, 255, 255, 0.5);
    background-color: var(--colormainhover);
    transform: var(--button-hover);
}

.button:active {
    transform: var(--button-active);
    color: rgb(255, 255, 255);
}

.buttonlight,
.form_select,
::file-selector-button {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 3rem;
    min-width: 6rem;
    background-color: var(--text-faded);
    border: solid var(--text-faded) 2px;
    border-radius: var(--rounded-all);
    padding: 0 var(--space);
    text-transform: uppercase;
    color: var(--textocolor);
    box-shadow: var(--sha-small);
    cursor: pointer;
    text-align: center;
    transition: var(--smooth);
    font-weight: 700;
}

.buttonlight:hover,
.form_select:hover,
::file-selector-button:hover {
    color: var(--texthover);
    background-color: var(--backblur);
    transform: var(--button-hover);
}

.buttonlight:active {
    background-color: var(--text-faded);
    transform: var(--button-active);
    color: var(--textocolor);
}

.buttonthemes {
    width: 2rem;
    aspect-ratio: 1;
    border-radius: var(--rounded-all);
    border: solid var(--texthover) 2px;
    box-shadow: var(--sha-small);
    cursor: pointer;
    transition: var(--smooth);
}

.buttonthemes:hover {
    transform: var(--button-hover);
    border: solid var(--textocolor) 2px;
}

.buttonthemes:active {
    transform: var(--button-active);
}

.button_grid {
    display: flex;
    flex-direction: column;
    background: none;
    cursor: pointer;
}

.button_grid * {
    text-align: center;
    min-width: 100%;
    transition: var(--smooth);
}

.button_grid:hover * {
    color: var(--texthover);
    transform: var(--button-hover);
}

.button_grid:active * {
    color: var(--textocolor);
    transform: var(--button-active);
}

.toolsButton {
    display: flex;
    flex-wrap: wrap;
    position: fixed;
    bottom: var(--space-double);
    right: var(--space-double);
    align-content: center;
    align-items: center;
    justify-content: center;
    justify-items: center;
    padding: var(--space);
    width: 4rem;
    aspect-ratio: 1 / 1 ;
    min-height: 0;
    background-color: var(--colorblur);
    backdrop-filter: var(--frosted);
    box-shadow: var(--shadow);
    cursor: pointer;
    border-radius: var(--rounded-all);
    border: solid var(--text-faded) 2px;
    transition: var(--smooth);
}

.toolsButton:hover .buttonsvg path {
    fill: var(--texthover);
}

.toolsButton:hover {
    transform: var(--button-hover);
}

/* page navigation */
.dataTables_paginate {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    position: fixed;
    bottom: var(--space-double);
    left: var(--space-double);
    height: 4rem;
    width: calc(100vw - 4rem);
    align-content: center;
    align-items: center;
    justify-content: center;
    justify-items: center;
    gap: var(--space);
    /* z-index: 1000;*/
}

.dataTables_paginate span {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    height: 4rem;
    align-content: center;
    align-items: center;
    justify-content: center;
    justify-items: center;
    gap: var(--space);
}

.paginate_button.current {
    display: flex;
    height: 4rem;
    aspect-ratio: 1;
    background-color: var(--colormain);
    border: var(--backblur) solid 2px;
    border-radius: var(--rounded-all);
    backdrop-filter: var(--frosted);
    box-shadow: var(--shadow);
    align-content: center;
    align-items: center;
    justify-content: center;
    justify-items: center;
    font-size: 2rem;
    color: var(--textocolor);
    transition: var(--smooth);
}

.paginate_button.current:hover {
    background-color: var(--colormainhover);
}

.paginate_button {
    display: flex;
    height: 3rem;
    aspect-ratio: 1;
    background-color: var(--colorblur);
    border: var(--backblur) solid 2px;
    border-radius: var(--rounded-all);
    backdrop-filter: var(--frosted);
    box-shadow: var(--shadow);
    align-content: center;
    align-items: center;
    justify-content: center;
    justify-items: center;
    font-size: 1.25rem;
    color: var(--texthover);
    cursor: pointer;
    transition: var(--smooth);
}

.paginate_button:hover {
    background-color: var(--backblur);
    transform: var(--button-hover);
    color: var(--textocolor);
}

.paginate_button.next, .paginate_button.previous{
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    height: 3rem;
    background-color: var(--colorblur);
    border: var(--backblur) solid 2px;
    border-radius: var(--rounded-all);
    backdrop-filter: var(--frosted);
    box-shadow: var(--shadow);
    align-content: center;
    align-items: center;
    justify-content: center;
    justify-items: center;
    font-size: 1.25rem;
    color: var(--texthover);
    padding: 0 var(--space);
    transition: var(--smooth);
}

.paginate_button.next:hover, .paginate_button.previous:hover {
    background-color: var(--backblur);
    color: var(--textocolor);
}

.logo {
    display: contents;
    /*flex-direction: column;*/
    flex-wrap: wrap;
    align-items: center;
    /*justify-content: center;*/
}

.logo img {
      width: 15%;
      height: auto;
      display: block;
    }

.logout *{
    display: flex;
    flex-wrap: wrap;
    align-content: center;
    align-items: center;
    justify-content: center;
    justify-items: center;
    fill: var(--textocolor);
    height: 1.5rem;
    aspect-ratio: 1;
    transition: var(--smooth);
}

.logout:hover *{
    transform: var(--button-hover);
    fill: var(--coloralert);
}

/* Checkboxes */
.checkbox { /* Contenedor del checkbox */ 
    display: flex;
    height: 3rem;
    width: fit-content;
    position: relative; 
    padding: var(--space);
    padding-left: 3rem;
    cursor: pointer;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    align-items: center;
    
}

.checkbox input { /* Para ocultar el checkbox de default*/
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkbox input:checked ~ .checkmark{ /* Color principal cuando está seleccionado */
    background-color: var(--colormain);
}

#toast-container {
  position: fixed;
  top: 100px;
  right: 20px;
  z-index: 9999;
  width: 350px; /* Ancho fijo para PC */
  pointer-events: none; /* Permite hacer clic a través del contenedor */
}

.toast-mensaje {
 pointer-events: auto;
  background: #333;
  color: white;
  padding: 16px;
  margin-bottom: 12px;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
  font-family: sans-serif;
  font-size: 14px;

  /* --- TRANSICIÓN Y ANIMACIÓN --- */
  transition: opacity 0.4s ease, transform 0.4s ease; /* Para la salida */
  animation: slideIn 0.5s cubic-bezier(0.18, 0.89, 0.32, 1.28); /* Entrada elástica */
}
/* Definición de la entrada desde la derecha */
@keyframes slideIn {
  from {
    transform: translateX(120%); /* Empieza fuera de la pantalla */
    opacity: 0;
  }
  to {
    transform: translateX(0);    /* Llega a su posición original */
    opacity: 1;
  }
}

/* Clase extra para cuando queramos ocultarlo por JS */
.toast-mensaje.hidden {
  opacity: 0;
  transform: translateX(50%);
}

.medioCheck{
    min-width: auto;
    max-width: 320px;
}
.columna .medioCheck {
    font-size: 16px;
    outline: none;
    padding: 20px 15px;
    display: block;
    width: 300px;
    border: 2px solid var(--colormain);
    border-radius: 1rem;
   
}

.columna .medioCheck:focus,
.columna .medioCheck:valid {
    border-color: var(--colormainhover);
}

.columna {
    position: relative;
    margin-top: 40px;
}

.columna .MediosTitulos {
    color: #999;
    font-size: 16px;
    font-weight: normal;
    position: absolute;
    pointer-events: none;
    left: 15px;
    top: 20px;
    display: flex;
}

.columna .char {
    transition: var(--smooth);
    transition-delay: calc(var(--index) * .05s);
}

.columna .medioCheck:focus~.MediosTitulos .char,
.columna .medioCheck:valid~.MediosTitulos .char {
    transform: translateY(-3rem);
    font-size: 1rem;
    color: var(--colornombre);
    background: transparent;
}

.checkmark {
    position: absolute;
    left: 0.5rem;
    width: 2rem;
    aspect-ratio: 1;
    background-color: var(--colorback);
    border: solid var(--text-faded) 2px;
    border-radius: var(--rounded-all);
    transition: var(--smooth);
}

.checkbox:hover input ~ .checkmark {
    background-color: var(--text-faded);
}

.checkbox:hover input:checked ~ .checkmark {
    background-color: var(--colormainhover);
}



/* Create the checkmark/indicator (hidden when not checked) */
.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

/* Show the checkmark when checked */
.checkbox input:checked ~ .checkmark:after {
    display: block;
}

/* Style the checkmark/indicator */
.checkbox .checkmark:after {
    content:"";
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 1.2rem;
    aspect-ratio: 1;
    background-image: url('../../assets/img/iconos/tick.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    display: none;
}

/* Configuración Navbar */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    justify-content: center;
    background-color: var(--colorback);
    border-bottom: var(--text-faded) solid 2px;
    box-shadow: 0 0 0.5rem var(--colorshadow);
    user-select: none;
    z-index: 100;
}

/* La barra de navegación */
.headercontent {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 6rem;
    max-width: 65rem;
    padding: 0 var(--space-double);
    margin: 0 auto; /* Sin esto no se centra el contenido */ 
}

.nav {
    height: 100%;
    align-items: center;
}
.navlist {
    display: flex;
    column-gap: var(--space-double);
    align-items: center;
    height: 100%;
}

.navlink {
    height: 100%;
    width: 8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: var(--smooth);
}

.navlink:hover {
    background-color: #1b4b913d;
    color: var(--texthover);
}

a.navlink.logout:hover {
    background-color: var(--coloralert);
}

.navlink.logout:hover path {
    fill: white;
}

.navitem {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.usericon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    aspect-ratio: 1;
    cursor: pointer;
    transition: var(--smooth);
}

.usericon:hover {
    transform: var(--button-hover);
}

.usericon:active {
    transform: var(--button-active);
}

.usericon path {
    fill: var(--textocolor);
    transition: var(--smooth);
}

.usericon:hover path {
    fill: var(--texthover);
}

.usericon:active path {
    fill: var(--textocolor);
}

.logosvg {
    display: flex;
    align-content: center;
    justify-content: center;
    align-items: center;
    justify-items: center;
    height: 4rem;
    aspect-ratio: 1;
}
.logosvg path {
    fill: var(--textocolor);
    transition: var(--smooth);
}

.logo:hover path {
    fill: var(--texthover);
}

.buttonsvg {
    width: 2rem;
    height: 2rem;
    cursor: pointer;
}

.buttonsvg path {
    fill: var(--textocolor);
    transition: var(--smooth);
}

.button_grid:hover .buttonsvg path {
    color: var(--texthover);
    fill: var(--texthover);
    transform: var(--button-hover);
}

.button_grid:active .buttonsvg path {
    color: var(--textocolor);
    fill: var(--textocolor);
    transform: var(--button-active);
}

/* Configuracion del sidebar */
.sidebar {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 250px;
    z-index: 9999;
    background-color: var(--colorblur);
    backdrop-filter: var(--frosted);
    box-shadow: var(--shadow);
    display: none;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    user-select: none;
}

.sidebar .navitem {
    height: 5rem;
    width: 100%;
}

.sidebar .navlink {
    width: 100%;
}

.sidebar .navlink:hover {
    background-color: var(--colormain);
}

.backimg {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.backimgsvg {
    width: 100%;
    height: 100%;
}

.backimgsvg path {
    fill: var(--colormain);
}

/* El form de los enlaces*/
.form {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    width: 100%;
    align-items: center;
    justify-items: center;
    align-content: center;
    justify-content: center;
    gap: var(--space);
}

.enlace {
    width: 100%;
    transition: var(--smooth);
}

.enlace:hover {
    color: var(--texthover);
}

.hideOnDesktop {
    display: none;
}

/* Cards */
.card {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    align-content: center;
    align-items: center;
    justify-content: center;
    justify-items: center;
    width: 100%;
    background-color: var(--colorfore);
    border-radius: var(--rounded);
    border: var(--text-faded) solid 2px;
    padding: var(--space-double);
    box-shadow: var(--shadow);
    gap: var(--space);
}

.cardglass {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    align-content: center;
    align-items: center;
    justify-content: center;
    justify-items: center;
    width: 100%;
    background-color: var(--colorblur);
    backdrop-filter: var(--frosted);
    border-radius: var(--rounded);
    border:  #00000057 solid 2px;
    box-shadow: var(--shadow);
    padding: var(--space-double);
    gap: var(--space);
}

.carditem{
    display: flex;
    flex-direction: column;
    align-content: center;
    justify-content: center;
    align-items: center;
    justify-items: center;
    width: 100%;
    scroll-margin-top: var(--space);
    gap: var(--space-double);
}

/* Listas */
.lista {
    display: flex;
    flex-direction: column;
    align-items: center;
    align-content: center;
    justify-items: left;
    justify-content: left;
    width: 100%;
}

.listaitem {
    display: flex;
    flex-direction: column;
    align-items: center;
    align-content: center;
    width: 100%;
    padding-bottom: var(--space);
}

/* Pillbox para textos: tienen forma de píldora */
.pill {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    height: 3rem;
    background-color: var(--colorback);
    border: var(--colorfore) solid 2px;
    border-radius: var(--rounded-all);
    box-shadow: var(--sha-small);
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    align-content: center;
    justify-content: center;
    transition: var(--smooth);
}

.pill:hover {
    color: var(--texthover);
}

.label {
    padding-right: var(--space);
}

/* Tabla*/
/* Responsive */
@media(max-width:1300px) {
    .floating {
        position: fixed;
        right: var(--space);
    }
}

@media(max-width: 800px){
    /* Modificaciones globales */
    /*h1 {
        font-size: 1rem;
    }*/

    h3 {
        font-size: 0.75rem;
    }

    /* Contenedores en tablets */
    .container_xl {
        width: 100%;
    }

    /* Cards en telefono */
    .card {
        padding: var(--space-double) var(--space) var(--space-double) var(--space);
    }
    
    /* Grid en telefonos */
    .container_grid {
        width: 100%;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .button_grid {
        aspect-ratio: 3 / 2;
    }
    
    .navlist .navitem.hideOnDesktop {
        display: flex;
        align-items: center;
        justify-content: center;
        height: 100%;
    }

    /* Hiders */
    .hideOnMobile{
        display: none;
    }

    .hideOnDesktop {
        display: none;
    }

    /* paginate */
    .dataTables_paginate {
        flex-wrap: nowrap;
        justify-content: start;
        height: 3rem;
        border-radius: var(--rounded);
        border: var(--texthover) solid 2px;
        background-color: var(--colorblur);
        backdrop-filter: var(--frosted);
        gap: 8px;
        width: fit-content;
        max-width: calc(100vw - 4rem);
        overflow-y: hidden;
        overflow-x: auto;
        scrollbar-width: none !important;
        box-shadow: var(--sha-small);
        /* z-index: 1000;*/
    }

    .dataTables_paginate * {
        font-size: 1rem !important;
    }

    .dataTables_paginate span {
        flex-wrap: nowrap;
        height: 3rem;
        background-color: transparent;
        backdrop-filter: none;
        gap: 0;
    }

    .paginate_button {
        background-color: transparent;
        border-radius: 0;
        border: none;
        box-shadow: none;
        backdrop-filter: none;
    }

    .paginate_button.current {
        border-radius: 0;
        border: var(--colormainhover) solid 2px;
        box-shadow: none;
        backdrop-filter: none;
        height: 3rem;
        width: 3rem;
    }

    .paginate_button.previous, .paginate_button.next {
        background-color: transparent;
        border: none;
        border-radius: 0;
        box-shadow: none;
        backdrop-filter: none;
    }
}


@media(max-width:500px){
    .logo img {
        width: 35%;
    }
    /* Grid en telefonos */
    .container_grid {
        width: 100%;
        grid-template-columns: repeat(1, minmax(0, 1fr));
    }

    .floating .container_grid {
        width: 100%;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    /* Contenedor de botones en telefonos */
    .btnsection {
        width: 100%;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .button_grid {
        aspect-ratio: unset;
    }

    /* pagination */
    .dataTables_paginate {
        height: 2rem;
    }
    .paginate_button, .paginate_button.current {
        height: 2rem;
        aspect-ratio: 1;
    }
}

@media (max-width: 480px) {
  #toast-container {
    top: 10px;
    right: 10px;
    left: 10px; /* Al poner left y right, se estira */
    width: auto; /* Quita el ancho fijo de 350px */
  }

  .toast-mensaje {
    text-align: center; /* Centra el texto para que se vea mejor */
    font-size: 16px;    /* Un poco más grande para facilitar la lectura */
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  }
}

@media(max-width: 400px){
    .container_s {
        width: 100%;
    }

    .floating {
        width: calc(100vw - var(--space-double));
    }

    .sidebar {
        width: 100%;
    }
}