/* Estilos generales compartidos y encabezado común */

.main-header {
    background: linear-gradient(135deg, #8bb8d1 0%, #cfe4ee 100%);
    color: #17324a;
    padding: 20px 24px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.16);
    border-bottom: 1px solid rgba(23, 50, 74, 0.12);
}

.main-header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.header-branding {
    display: flex;
    align-items: center;
    gap: 18px;
    flex: 1;
    min-width: 300px;
}

.header-logo {
    height: 90px;
    width: auto;
    object-fit: contain;
}

.header-title-box {
    flex: 1;
    text-align: center;
}

.header-title {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #17324a;
}

.header-subtitle {
    font-size: 13px;
    opacity: 0.85;
    margin-top: 5px;
}

.header-version {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #17324a;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(23, 50, 74, 0.2);
    margin-top: 8px;
}

.header-user-area {
    text-align: right;
}

.header-user-info {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin-bottom: 8px;
    font-weight: 600;
}

.header-user-name {
    font-size: 15px;
}

.header-settings-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
    text-decoration: none;
    font-size: 18px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.header-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.header-nav-link {
    padding: 8px 12px;
    border-radius: 999px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.58);
    color: #17324a;
    white-space: nowrap;
    transition: background 0.15s ease;
}

.header-nav-link.active,
.header-nav-link.header-logout-link {
    background: #ffffff;
}

.header-nav-link.active {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Adaptación responsive para móviles */
@media (max-width: 768px) {
    .main-header {
        padding: 12px 14px;
    }

    .main-header-container {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .header-branding {
        min-width: 0;
        gap: 12px;
    }

    .header-logo {
        height: 55px;
    }

    .header-title-box {
        text-align: left;
    }

    .header-title {
        font-size: 19px;
    }

    .header-subtitle {
        font-size: 11px;
    }

    .header-user-area {
        text-align: left;
    }

    .header-user-info {
        justify-content: space-between;
        margin-bottom: 6px;
    }

    .header-nav {
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: flex-start;
        padding-bottom: 4px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .header-nav::-webkit-scrollbar {
        display: none;
    }

    .header-nav-link {
        padding: 6px 11px;
        font-size: 12px;
        flex-shrink: 0;
    }
}
