﻿
html, body {
    font-family: 'Roboto', sans-serif !important;
}

.container.body-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* HEADER */
.app-header {
    background: var(--header-bg);
    height: 72px;
    border-bottom: 1px solid var(--header-border);
    box-shadow: var(--header-shadow);
    position: sticky;
    top: 0;
    z-index: 999;
}

.app-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    padding: 0 24px;
    gap: 20px;
}

/* LOGO */
.app-header__brand {
    flex: 0 0 auto;
}

.app-header__logo {
    height: 42px;
    width: auto;
    display: block;
}

.app-header__logo-link {
    display: block;
}

/* NAV */
.app-header__nav {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.app-header__link {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: 10px 14px;
    color: var(--text-main);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.2s ease;
}

    .app-header__link:hover {
        color: var(--accent);
        text-decoration: none;
    }

    .app-header__link::after {
        content: "";
        position: absolute;
        left: 14px;
        right: 14px;
        bottom: 4px;
        height: 2px;
        background: var(--accent);
        border-radius: 999px;
        transform: scaleX(0);
        transform-origin: center;
        transition: transform 0.2s ease;
    }

    .app-header__link:hover::after {
        transform: scaleX(1);
    }

.app-header__brand,
.app-header__actions {
    min-width: 255px;
}

/* ACCIONES */
.app-header__actions {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* AVATAR */
.app-header__user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.app-header__avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.app-header__user-name {
    color: var(--text-main);
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}

/* BOTÓN CERRAR SESIÓN */
.app-header__logout {
    background: #ffffff;
    color: var(--accent);
    border: 1px solid var(--accent);
    border-radius: 25px;
    padding: 9px 14px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}

    .app-header__logout:hover {
        background: var(--danger-soft);
        color: var(--danger-text) !important;
        border-color: var(--danger-text);
        text-decoration: none;
    }

.app-header__nav .app-header__logout-movil {
    display: none !important;
}

/* BOTÓN HAMBURGUESA */
.app-header__menu-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
    cursor: pointer;
    color: #475569;
    transition: all 0.2s ease;
}

    .app-header__menu-btn:hover {
        color: var(--accent);
        border-color: var(--accent);
    }

@media (max-width: 1056px) {
    .app-header__brand {
        min-width: 160px;
    }
}

@media (max-width: 1000px) {
    .app-header {
        height: 68px;
    }

    .app-header__logo {
        height: 36px;
    }

    .app-header__menu-btn {
        display: inline-flex;
    }

    .app-header__nav {
        display: none;
        position: absolute;
        top: 76px;
        right: 16px;
        min-width: 220px;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        padding: 10px;
        background: #ffffff;
        border: 1px solid #e2e8f0;
        border-radius: 14px;
        box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
        z-index: 1000;
    }

        .app-header__nav.abierto {
            display: flex;
        }

    .app-header__link {
        width: 100%;
        justify-content: flex-start;
        padding: 12px 14px;
    }

        .app-header__link::after {
            display: none;
        }
}

@media (max-width: 900px) {
    .app-header__nav .app-header__logout-movil {
        display: flex !important;
        color: var(--danger-text) !important;
        border-top: 1px solid var(--header-border);
        margin-top: 4px;
        padding-top: 12px;
    }

    .app-header__actions {
        flex: 1 1 auto;
        justify-content: flex-end;
    }
}

@media (max-width: 640px) {
    .app-header__user {
        display: none;
    }

    .app-header__logout {
        display: none;
    }

    .app-header__actions {
        flex: 1 1 auto;
        justify-content: flex-end;
    }

    .app-header__nav .app-header__logout-movil {
        display: flex !important;
        color: var(--danger-text) !important;
        border-top: 1px solid var(--header-border);
        margin-top: 4px;
        padding-top: 12px;
    }
}

/* TIPOGRAFÍA GLOBAL */
h1, h2, h3, h4, h5, h6, p,
a:not([class*="fa-"]):not(.fa):not(.fas):not(.far):not(.fab),
span:not([class*="fa-"]):not(.fa):not(.fas):not(.far):not(.fab):not([class*="icon"]),
div:not([class*="icon"]),
section, article, aside, header, footer, nav,
table, thead, tbody, tfoot, tr, th, td,
ul, ol, li, dl, dt, dd, label,
input:not([type="button"]):not([type="submit"]),
select, textarea, button, .btn, .form-control,
.dx-datagrid td, .dx-datagrid th,
.dx-texteditor-input, .dx-button-text {
    font-family: 'Roboto', sans-serif !important;
}

@media (max-width: 1000px) {
    .app-header__brand,
    .app-header__actions {
        min-width: unset;
    }
}
