:root {
    --background-light: #ffffff;
    --background-dark: #45436c;
    --background-med: #d5daf0;
    --background-light-grey: #f2f4fb;
    --text: #22272e;
    --text-light:#8698aa;
    --titles: #340962;
    --text-white: #ffffff;
    --highlight: #9a55f3;
    --border: #e1e1e1;
    --menu-before-color:#524d86;

}

body {
    font-family: Poppins, sans-serif;
    background-color: var(--background-light-grey);
    margin: 0;
    padding: 20px;
    color: var(--text);
    font-size: 14px;
}

h1,
h2,
h5 {
    text-align: center;
    color: var(--titles);
}

p,
span {
    color: var(--text);
}

form {
    max-width: 500px;
    margin: 0 auto 20px auto;
    display: flex;
    flex-direction: column;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 10px;
    border: 1px solid var(--border);
    text-align: center;
}

thead {
    color: var(--titles);
}

button {
    padding: 10px;
    background-color: var(--background-dark);
    color: var(--text-white);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    width: 100%;
    margin-top: 15px;
}

#success-message {
    text-align: center;
    color: var(--highlight);
}


#chart-section, #grafico-pesos {
    max-width: 800px;
    margin: 20px auto;
    padding: 7px;
    background-color: var(--background-light);
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

canvas {
    width: 100%;
    height: 400px;
}

input[type="date"],
input[type="time"],
input[type="number"],
input[type="text"],
select {
    width: 95%;
    height: 2rem;
    border-radius: 5px;
    border: solid 1px var(--border);
    background-color: transparent;
}

#notas-form input[type=textarea] {
    height: 80px;
    width: 95%;
}

#notas-form select{
    height: 3rem;
    font-family: Poppins;
}

.form-inputs-cont {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-gap: 10px;
}

.card {
    background-color: var(--background-light);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 8px;
}

section {
    transition: display 0.3s ease-out, opacity 0.1s ease-out;
    margin-top: 60px;
}

.hidden {
    display: none;
}

#menu-icon {
    font-size: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 20px;
}

#menu-icon p {
    font-size: 18px;
    color: var(--titles);
    font-weight: 700;
    margin: 0;
}



.side-menu {
    height: 100%;
    position: fixed;
    top: 0;
    left: 0;
    background-color: var(--background-dark);
    overflow-x: hidden;
    transition: 0.5s;
    transform: translate(-100%);
    padding-top: 60px;
    z-index: 1000;
    box-shadow: none;
    /* Asegura que esté sobre el contenido */
}

.side-menu ul {
    list-style-type: none;
    padding: 0;
}

.side-menu ul li {
    padding: 15px 20px;
    text-decoration: none;
    font-size: 16px;
    color: rgba(255, 255, 255, 0.35);
    display: block;
    transition: opacity 0.3s ease-in-out;
    cursor: pointer;
}


/* Cuando el menú esté abierto */
.side-menu.open {
    width: 250px;
    transform: translate(0);
    box-shadow: 10px 0px 10px rgba(15, 55, 77, 0.3);
}

/* Ícono de cerrar dentro del menú */
.close-icon {
    font-size: 30px;
    color: white;
    position: absolute;
    top: 10px;
    right: 20px;
    cursor: pointer;
}

#side-menu ul li a {
    position: relative;
    padding-bottom: 12px;
    display: flex;
    width: 100%;
}

#side-menu ul li a:before {
    background: var(--menu-before-color);
    border-radius: 0.2em;
    position: absolute;
    bottom: 0;
    content: '';
    height: 0.2em;
    right: 0;
    width: 100%;
    box-sizing: inherit;
}

.side-menu ul li.active a {
    color: var(--text-white);
}

.side-menu ul li.active a:before {
    display: none;
}

.side-menu .active a:after {
    background-image: linear-gradient(to right, #5e42a6, #b74e91);
    border-radius: 0.2em;
    bottom: 0;
    content: '';
    height: 0.2em;
    position: absolute;
    right: 0;
    width: 100%;
}

.export-btn{
    color:var(--highlight);
    margin:10px 0;
    display: flex;
}

/* Formulario de logueo */
#login-form, #singup-form{
    display: flex;
    flex-direction: column;
    justify-content: start;
    position: relative;
    gap: 1rem;
    /*width: calc(100% - 16%);*/
    padding: 3rem 2rem;
    height: fit-content;    
}

#login-form button{
    padding: 10px;
    background-color: var(--background-dark);
    color: var(--text-white);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    white-space: nowrap;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 1rem;
    text-decoration: none;
    width: 100%;
}

.input__wrapper{
    position: relative;
    padding: 0.9375rem 0 0;
    margin-bottom: 0.5rem;
}

.input__field{
    padding: 0.35rem;
    padding-bottom: 0.5rem;
    height: 2rem;
    border: solid 1px var(--border);
    border-radius: 5px;
    width: 100%;
    vertical-align: middle;
    padding-bottom: 0.7rem;
    /*border-bottom: 3px solid var(--border);*/
    transition: border-color 0.2s;
    background: transparent;
    position: relative;
    z-index: 1;
}

.input__field::placeholder{
    color: transparent;
}

.input__label{
    user-select: none;
}

.input__field:placeholder-shown~.input__label{
    cursor: text;
    color: var(--text-light);
    top: 50%;
    left:0.4rem;
}

.input__label,
.input__field:focus~.input__label{
    position:absolute;
    top: -0.5rem;
    left: 0.4rem;
    display: block;
    color: var(--text);
    transition: 0.3s;
    z-index: 0;
}

.input__field:focus~.input__label{
    color: var(--highlight);
}

.input__field:focus{
    border-bottom:2px solid var(--highlight);
}

.form__actions{
    display: flex;
    flex-direction: column;
    align-self: center;
    color: var(--text);
    gap: 1rem;
    margin-top: 0.5rem;
}

.form__actions a{
    color:var(--highlight);
    text-decoration: none;
}

.form__row{
    display: flex;
    gap: 0.5rem;
    justify-content: space-between;
}

.body-login {
    display: flex;
    overflow-x: hidden;
    height: 95dvh;
    align-items: center;
}

.hidden-form{
    /*opacity: 0;*/
    /*width: 0;
    transform: translateX(100%)*/
    transform: translateX(calc(100vw + 20px));    
}

.show-form{
    /*opacity: 1;*/
    /*width: 100%;*/
    transform: translateX(0);
}

#login-form-section,
#signup-form-section{
    transition: transform 0.4s ease-in-out, opacity 0.4s ease-in-out;
    width: calc(100vw - 10%);
    position: absolute;
    margin: 60px auto;
}

/* Sección para anotaciones */
.timeline {
    position: relative;
    padding-left: 30px;
    margin-top: 20px;
}
.timeline::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--background-med);
}
.timeline-item {
    position: relative;
    margin-bottom: 20px;
}
.timeline-item::before {
    content: '';
    position: absolute;
    left: -25px;
    top: 0;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--highlight);
}
.timeline-date {
    font-weight: bold;
    margin-bottom: 10px;
}
.timeline-content {
    background: #f9f9f9;
    padding: 10px;
    border-radius: 5px;
}
#notas-form-cont{
    max-height: 0px;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.4s ease-in-out, padding 0.4s ease-in-out, opacity 0.4s ease-in-out;
    padding: 0;
}

#notas-form-cont.show-notas-form{
    max-height: 500px;
    opacity: 1;
    padding: 8px;
}

.nota-categoria-row{
    display: flex;
    flex-direction: column;
    align-items: end;
}

.nota-categoria {
    background-color: var(--highlight);
    color: var(--text-white);
    padding: 6px;
    font-size: 10px;
    width: fit-content;
    min-width: 90px;
    border-radius: 5px;
    text-align: center;
}

.nota-titulo{
    color:var(--text);
    font-weight: 600;
    text-transform: uppercase;
}
