*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: Inter, Arial, sans-serif;
    background: #eef2f7;
    color: #0f172a;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 280px 1fr;
}

.sidebar {
    background: #edf0f6;
    color: #334155;
    border-right: 1px solid #d8dee9;
    padding: 22px 18px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    min-height: 100vh;
    position: sticky;
    top: 0;
    box-shadow: 8px 0 24px rgba(15, 23, 42, 0.04);
}

.sidebar__brand {
    border: 1px solid #dde4ef;
    border-radius: 16px;
    padding: 12px;
}

.sidebar__brand-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.sidebar__logo {
    width: 150px;
    height: auto;
}

.sidebar__nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar__footer {
    margin-top: auto;
}

.sidebar__link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 14px;
    border-radius: 14px;
    color: #334155;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    transition: background-color 0.25s ease, color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.sidebar__link:hover {
    background: #ffffff;
    color: #0f172a;
    transform: translateX(2px);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
}

.sidebar__link.is-active {
    background: #2563eb;
    color: #ffffff;
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.25);
}

.sidebar__link--logout {
    color: #991b1b;
}

.sidebar__link--logout:hover {
    background: #fee2e2;
    color: #7f1d1d;
    box-shadow: none;
}

.sidebar__icon {
    width: 20px;
    text-align: center;
    flex: 0 0 20px;
    font-size: 16px;
}

.sidebar__text {
    flex: 1;
}

.main-content {
    min-width: 0;
    padding: 0;
}

@media (max-width: 1024px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: relative;
        min-height: auto;
        border-right: 0;
        border-bottom: 1px solid #d8dee9;
        box-shadow: none;
    }

    .sidebar__nav {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sidebar__footer {
        margin-top: 0;
    }
}

@media (max-width: 640px) {
    .sidebar {
        padding: 16px 12px;
    }

    .sidebar__logo {
        width: 130px;
    }

    .sidebar__nav {
        grid-template-columns: 1fr;
    }

    .sidebar__link {
        padding: 11px 12px;
        font-size: 14px;
    }
}
/* Selector de idioma dentro del gestor */
.language-switcher {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 8px 0 0;
}

.language-switcher__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 7px 11px;
    border: 1px solid #d8dee9;
    border-radius: 999px;
    background: #ffffff;
    color: #475569;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.language-switcher__link:hover {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
}

.language-switcher__link.is-active {
    background: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.18);
}
