@import url('https://fonts.googleapis.com/css2?family=Nunito+Sans:ital,opsz,wght@0,6..12,200..1000;1,6..12,200..1000&display=swap');

:root {
    --background-color: #ffffff;
    --text-tittle-color: #053D4E;
    --text-color: #32363B;
    --icon-color: #32363B;
    --icon-menu-color: #707780;
    --menu-color: #707780;

    --text-selected-color: #355CC0;
    --background-selected: #EBF0FF;
    --background-hover: #F7F9FA;

    --border-color: #E6E9ED;
}

body.dark {
    --color-bg: #121212;
    --color-text: #f1f1f1;
    --color-primary: #121212;
    --color-secondary: #adb5bd;
    --color-border: #2a2a2a;
    --sidebar-color: #121212;
    --text-light: #fff;
    background: #242526;
}

*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Nunito Sans", sans-serif;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;      /* root never scrolls */
}

body {
    /* no padding; main will handle offsets itself */
    margin: 0;
    padding: 0;
}

main {
    position: absolute;
    top: 4rem;           /* below header (header height) */
    left: 4rem;          /* matches collapsed sidebar width */
    right: 0;
    bottom: 0;
    padding: 2rem;
    transition: left 0.5s ease;
    background: #F8F9FA;
    overflow: auto;     /* scrolls inside main only */
}

main.menu-toggle {
    /* slide to right when sidebar expands */
    left: 18.75rem;     /* equal to expanded sidebar width */
}

@media (max-width: 500px) {
    main,
    main.menu-toggle {
        left: 0;
    }
}

header {
    z-index: 200;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0.45rem 2rem 0.45rem 1.27rem;
    border-bottom: 1px solid var(--border-color);
    position: fixed;
    background-color: var(--background-color);
    top: 0;
    left: 0;
}

.left {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.4rem;
}

.menu-container {
    height: 100%;
    display: flex;
    align-items: center;
    cursor: pointer;
}

.menu {
    width: 1.5rem;
    height: 37%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.menu div {
    width: 100%;
    height: 0.15rem;
    background-color: var(--menu-color);
    transition: all 0.2s ease;
}

.menu.menu-toggle div:first-child {
    width: 40%;
    transform: rotate(-35deg) translate(-30%,175%);
}

.menu.menu-toggle div:last-child {
    width: 40%;
    transform: rotate(35deg) translate(-30%,-160%);
}

.brand {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.6rem;
}

.brand .logo {
    width: 1.7rem;
}

.brand .name {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--text-tittle-color);
}

.right {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.6rem;
}

.right a {
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 0.5rem;
    transition: background-color 0.2s ease;
}

.right a:hover {
    background-color: var(--background-hover);
}

.right img {
    width: 1.5rem;
    margin: 0.5rem;
}

.right .user {
    width: 2.1rem;
    border-radius: 50%;
}

/*sidebar*/
.sidebar {
    margin-top: 4rem;
    width: 4rem;
    height: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    padding: 1.1rem 0;
    border-right: 1px solid var(--border-color);
    overflow-y: auto;
    background-color: var(--background-color);
    transition: width 0.5s ease;
}

.sidebar.menu-toggle {
    width: 18.75rem;
}

.sidebar nav ul,
.sidebar nav ul li {
    margin: 0;
    padding: 0;
    list-style: none !important; /* remove bullets (extra strong) */
}

.sidebar a {
    display: flex;
    align-items: center;
    gap: 1.3rem;
    padding: 0.9rem 0.7rem;
    text-decoration: none;
    margin: 0 0.5rem;
    border-radius: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    color: var(--text-color)
}

.sidebar a.selected {
    color: var(--text-selected-color);
    background-color: var(--background-selected);
}

.sidebar a.search {
    padding: 1rem 0.7rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 0.2rem;
}

.sidebar i {
    width: 1.6rem;
}

.sidebar img {
    width: 1.6rem;
}

.form-floating {
    position: relative;
}

.form-floating .validation-message {
    position: absolute;
    top: 0.25rem; /* más cerca del borde superior */
    right: 0.75rem; /* un poco más pegado al borde derecho */
    color: #dc3545; /* rojo Bootstrap */
    font-size: 0.70rem; /* 🔹 tamaño más pequeño */
    font-weight: 500; /* opcional: un poco más fino */
    pointer-events: none;
    background-color: transparent;
    opacity: 0.9;
}